Chaste
Release::3.4
|
#include <CellProperties.hpp>
Private Member Functions | |
void | CalculateProperties () |
std::vector< double > | CalculateActionPotentialDurations (const double percentage) |
void | CheckExceededThreshold (void) |
void | CheckReturnedToThreshold (void) |
Private Attributes | |
const std::vector< double > & | mrVoltage |
const std::vector< double > & | mrTime |
bool | mUnfinishedActionPotentials |
double | mThreshold |
std::vector< double > | mOnsets |
std::vector< double > | mRestingValues |
std::vector< double > | mCycleLengths |
std::vector< double > | mPeakValues |
std::vector< double > | mMaxUpstrokeVelocities |
std::vector< double > | mTimesAtMaxUpstrokeVelocity |
std::vector< unsigned > | mCounterOfPlateauDepolarisations |
Class to calculate various physiological properties from the results of a cardiac simulation.
It will calculate for a single cell: All the Action potential durations (at any percentage) Max. upstroke velocity for each AP Action potential amplitudes for each AP Peak & Resting membrane potentials for all AP Cycle lengths (time between onset of APs)
Definition at line 54 of file CellProperties.hpp.
|
inline |
Constructor sets the data and calls CalculateProperties
&rVoltage | a reference to the vector of voltages |
&rTime | a reference to the vector of times |
threshold | is the threshold for determining if an AP started, defaults to -30 |
Definition at line 132 of file CellProperties.hpp.
References CalculateProperties().
|
private |
Actually calculate APD.
target voltage = resting +'percentage'*(amplitude-resting).
APD is taken to be the time from when the target voltage is crossed upwards to the time voltage crosses the target voltage downwards.
percentage | The percentage of the amplitude to calculate for. |
Definition at line 210 of file CellProperties.cpp.
References CheckExceededThreshold(), EXCEPTION, mPeakValues, mRestingValues, mrTime, and mrVoltage.
Referenced by GetAllActionPotentialDurations(), and GetLastActionPotentialDuration().
|
private |
Calculate all the cacheable values.
Definition at line 46 of file CellProperties.cpp.
References EXCEPTION, mCounterOfPlateauDepolarisations, mCycleLengths, mMaxUpstrokeVelocities, mOnsets, mPeakValues, mRestingValues, mrTime, mrVoltage, mThreshold, mTimesAtMaxUpstrokeVelocity, and mUnfinishedActionPotentials.
Referenced by CellProperties().
|
private |
Throw an exception if we are asking for information which is not present, because upstroke was never detected (the voltage trace never exceeded the threshold voltage).
Definition at line 286 of file CellProperties.cpp.
References EXCEPTION, and mOnsets.
Referenced by CalculateActionPotentialDurations(), GetActionPotentialAmplitudes(), and GetRestingPotentials().
|
private |
Throw an exception if we are asking for information which is not present, because an AP was never detected (the voltage trace never exceeded the threshold voltage and then returned past it).
Definition at line 297 of file CellProperties.cpp.
References EXCEPTION, and mMaxUpstrokeVelocities.
Referenced by GetLastCompleteMaxUpstrokeVelocity(), GetLastCompletePeakPotential(), GetLastMaxUpstrokeVelocity(), GetLastPeakPotential(), GetMaxUpstrokeVelocities(), GetPeakPotentials(), GetTimeAtLastCompleteMaxUpstrokeVelocity(), GetTimeAtLastMaxUpstrokeVelocity(), and GetTimesAtMaxUpstrokeVelocity().
std::vector< double > CellProperties::GetActionPotentialAmplitudes | ( | ) |
Returns the amplitude of all the action potentials calculated.
Definition at line 269 of file CellProperties.cpp.
References CheckExceededThreshold(), mPeakValues, and mRestingValues.
Referenced by GetLastActionPotentialAmplitude().
Returns all the action potentials durations
percentage | is the repolarisation percentage that the APD will be calculated for. e.g. percentage = 90 for APD90. |
Definition at line 340 of file CellProperties.cpp.
References CalculateActionPotentialDurations().
Referenced by PropagationPropertiesCalculator::CalculateAllActionPotentialDurations(), and PropagationPropertiesCalculator::CalculateAllActionPotentialDurationsForNodeRange().
std::vector< double > CellProperties::GetCycleLengths | ( | ) |
Returns the cycle lengths for all APs.
Definition at line 311 of file CellProperties.cpp.
References mCycleLengths.
double CellProperties::GetLastActionPotentialAmplitude | ( | ) |
Returns the amplitude of the last action potential that was recorded.
Definition at line 281 of file CellProperties.cpp.
References GetActionPotentialAmplitudes().
Returns the amplitude of the last action potential generated. Throws an exception if no AP is generated.
percentage | is the repolarisation percentage that the APD will be calculated for. e.g. percentage = 90 for APD90. |
Definition at line 428 of file CellProperties.cpp.
References CalculateActionPotentialDurations().
Referenced by PropagationPropertiesCalculator::CalculateActionPotentialDuration().
double CellProperties::GetLastCompleteMaxUpstrokeVelocity | ( | ) |
Returns the maximum upstroke velocity for the last complete AP. If the threshold is never crossed, it throws an exception.
Definition at line 384 of file CellProperties.cpp.
References CheckReturnedToThreshold(), EXCEPTION, mMaxUpstrokeVelocities, and mUnfinishedActionPotentials.
double CellProperties::GetLastCompletePeakPotential | ( | ) |
Returns the last complete AP's peak potential.
Definition at line 359 of file CellProperties.cpp.
References CheckReturnedToThreshold(), EXCEPTION, mPeakValues, and mUnfinishedActionPotentials.
double CellProperties::GetLastMaxUpstrokeVelocity | ( | ) |
Returns the maximum upstroke velocity for the last AP. If only one incomplete AP is generated, it returns the maximal upstroke so far. If the threshold is never crossed, it throws an exception.
Definition at line 378 of file CellProperties.cpp.
References CheckReturnedToThreshold(), and mMaxUpstrokeVelocities.
Referenced by PropagationPropertiesCalculator::CalculateMaximumUpstrokeVelocity().
double CellProperties::GetLastPeakPotential | ( | ) |
Returns the last peak potential.
Definition at line 353 of file CellProperties.cpp.
References CheckReturnedToThreshold(), and mPeakValues.
double CellProperties::GetLastRestingPotential | ( | ) |
Returns the last resting potential (that would be the last entry of vector returned by GetRestingPotentials())
Definition at line 439 of file CellProperties.cpp.
References GetRestingPotentials().
std::vector< double > CellProperties::GetMaxUpstrokeVelocities | ( | ) |
Returns the maximum upstroke velocity for all APs.
Definition at line 328 of file CellProperties.cpp.
References CheckReturnedToThreshold(), and mMaxUpstrokeVelocities.
Referenced by PropagationPropertiesCalculator::CalculateAllMaximumUpstrokeVelocities(), and PropagationPropertiesCalculator::CalculateConductionVelocity().
std::vector< unsigned > CellProperties::GetNumberOfAboveThresholdDepolarisationsForAllAps | ( | ) |
Definition at line 345 of file CellProperties.cpp.
References mCounterOfPlateauDepolarisations.
Referenced by PropagationPropertiesCalculator::CalculateAllAboveThresholdDepolarisations().
unsigned CellProperties::GetNumberOfAboveThresholdDepolarisationsForLastAp | ( | ) |
Definition at line 434 of file CellProperties.cpp.
References mCounterOfPlateauDepolarisations.
Referenced by PropagationPropertiesCalculator::CalculateAboveThresholdDepolarisationsForLastAp().
std::vector< double > CellProperties::GetPeakPotentials | ( | ) |
Returns the peak potentials for all APs.
Definition at line 322 of file CellProperties.cpp.
References CheckReturnedToThreshold(), and mPeakValues.
std::vector< double > CellProperties::GetRestingPotentials | ( | ) |
Returns the minimum resting potential BEFORE each AP.
These are calculated as the point where the derivative of the potential is lowest, i.e. when the profile is flattest in between two APs.
Or just the minimum voltage before an upstroke if we can't find a flat bit.
So this vector should be the same length as the other AP property vectors.
Definition at line 316 of file CellProperties.cpp.
References CheckExceededThreshold(), and mRestingValues.
Referenced by GetLastRestingPotential().
double CellProperties::GetTimeAtLastCompleteMaxUpstrokeVelocity | ( | ) |
Returns the time at which the maximum upstroke velocity for the last complete AP occurred. If the threshold is never crossed, it throws an exception.
Definition at line 409 of file CellProperties.cpp.
References CheckReturnedToThreshold(), EXCEPTION, mTimesAtMaxUpstrokeVelocity, and mUnfinishedActionPotentials.
double CellProperties::GetTimeAtLastMaxUpstrokeVelocity | ( | ) |
Returns the time at which the maximum upstroke velocity for the last AP occurred. If only one incomplete AP is generated, it returns the time of the maximal upstroke so far. If the threshold is never crossed, it throws an exception.
Definition at line 403 of file CellProperties.cpp.
References CheckReturnedToThreshold(), and mTimesAtMaxUpstrokeVelocity.
Referenced by PropagationPropertiesCalculator::CalculateConductionVelocity().
std::vector< double > CellProperties::GetTimesAtMaxUpstrokeVelocity | ( | ) |
Returns the time at which the maximum upstroke velocity occurred for all APs.
Definition at line 334 of file CellProperties.cpp.
References CheckReturnedToThreshold(), and mTimesAtMaxUpstrokeVelocity.
Referenced by PropagationPropertiesCalculator::CalculateAllConductionVelocities(), PropagationPropertiesCalculator::CalculateConductionVelocity(), and PropagationPropertiesCalculator::CalculateUpstrokeTimes().
|
private |
Cached vector containing the number of recorded depolarisations while above threshold
Definition at line 88 of file CellProperties.hpp.
Referenced by CalculateProperties(), GetNumberOfAboveThresholdDepolarisationsForAllAps(), and GetNumberOfAboveThresholdDepolarisationsForLastAp().
|
private |
Cached vector containing AP cycle lengths properties
Definition at line 80 of file CellProperties.hpp.
Referenced by CalculateProperties(), and GetCycleLengths().
|
private |
Cached vector containing AP upstroke properties
Definition at line 84 of file CellProperties.hpp.
Referenced by CalculateProperties(), CheckReturnedToThreshold(), GetLastCompleteMaxUpstrokeVelocity(), GetLastMaxUpstrokeVelocity(), and GetMaxUpstrokeVelocities().
|
private |
Cached vector containing AP onset properties
Definition at line 76 of file CellProperties.hpp.
Referenced by CalculateProperties(), and CheckExceededThreshold().
|
private |
Cached vector containing AP peak properties
Definition at line 82 of file CellProperties.hpp.
Referenced by CalculateActionPotentialDurations(), CalculateProperties(), GetActionPotentialAmplitudes(), GetLastCompletePeakPotential(), GetLastPeakPotential(), and GetPeakPotentials().
|
private |
Cached vector containing AP resting properties
Definition at line 78 of file CellProperties.hpp.
Referenced by CalculateActionPotentialDurations(), CalculateProperties(), GetActionPotentialAmplitudes(), and GetRestingPotentials().
|
private |
The simulation results to process, time
Definition at line 60 of file CellProperties.hpp.
Referenced by CalculateActionPotentialDurations(), and CalculateProperties().
|
private |
The simulation results to process, voltage
Definition at line 58 of file CellProperties.hpp.
Referenced by CalculateActionPotentialDurations(), and CalculateProperties().
|
private |
Threshold for determining what counts as an action potential. This is a value part way between the min & max potential, to avoid problems due to 'notches' in an action potential.
Definition at line 73 of file CellProperties.hpp.
Referenced by CalculateProperties().
|
private |
Cached vector containing the times of AP upstrokes
Definition at line 86 of file CellProperties.hpp.
Referenced by CalculateProperties(), GetTimeAtLastCompleteMaxUpstrokeVelocity(), GetTimeAtLastMaxUpstrokeVelocity(), and GetTimesAtMaxUpstrokeVelocity().
|
private |
Whether we have any unfinished action potentials i.e. the trace ends ABOVE_THRESHOLD.
Definition at line 66 of file CellProperties.hpp.
Referenced by CalculateProperties(), GetLastCompleteMaxUpstrokeVelocity(), GetLastCompletePeakPotential(), and GetTimeAtLastCompleteMaxUpstrokeVelocity().