#include <CellProperties.hpp>
Public Member Functions | |
CellProperties (std::vector< double > &rVoltage, std::vector< double > &rTime, double threshold=-30.0) | |
std::vector< double > | GetMaxUpstrokeVelocities () |
double | GetLastMaxUpstrokeVelocity () |
std::vector< double > | GetTimesAtMaxUpstrokeVelocity () |
double | GetTimeAtLastMaxUpstrokeVelocity () |
std::vector< double > | GetCycleLengths () |
std::vector< double > | GetPeakPotentials () |
std::vector< double > | GetRestingPotentials () |
std::vector< double > | GetAllActionPotentialDurations (const double percentage) |
double | GetLastActionPotentialDuration (const double percentage) |
std::vector< double > | GetActionPotentialAmplitudes () |
Private Member Functions | |
void | CalculateProperties () |
std::vector< double > | CalculateActionPotentialDurations (const double percentage, std::vector< double > &rOnsets, std::vector< double > &rRestingPotentials, std::vector< double > &rPeakPotentials) |
Private Attributes | |
std::vector< double > & | mrVoltage |
std::vector< double > & | mrTime |
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 |
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 48 of file CellProperties.hpp.
CellProperties::CellProperties | ( | std::vector< double > & | rVoltage, | |
std::vector< double > & | rTime, | |||
double | threshold = -30.0 | |||
) | [inline] |
Constructor sets the data and calls CalculateProperties
Definition at line 100 of file CellProperties.hpp.
References CalculateProperties().
void CellProperties::CalculateProperties | ( | ) | [private] |
Calculate all the cacheable values.
Definition at line 38 of file CellProperties.cpp.
References mOnsets, mrVoltage, and mThreshold.
Referenced by CellProperties().
std::vector< double > CellProperties::CalculateActionPotentialDurations | ( | const double | percentage, | |
std::vector< double > & | rOnsets, | |||
std::vector< double > & | rRestingPotentials, | |||
std::vector< double > & | rPeakPotentials | |||
) | [private] |
Actually calculate APD.
APD is taken to be the time from when the threshold is crossed to the time voltage reaches back to a value of RestingPotential+'percentage'*(amplitude-resting).
percentage | The percentage of the amplitude to calculate for. | |
rOnsets | A vector containg the times at which the upstroke crosses the threshold. | |
rRestingPotentials | A vector containg the resting potentials of all APs. | |
rPeakPotentials | A vector containg the peak potentials of all APs. |
Definition at line 172 of file CellProperties.cpp.
References mrVoltage.
Referenced by GetAllActionPotentialDurations(), and GetLastActionPotentialDuration().
std::vector<double> CellProperties::GetMaxUpstrokeVelocities | ( | ) | [inline] |
Returns the maximum upstroke velocity for all APs.
Definition at line 112 of file CellProperties.hpp.
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 262 of file CellProperties.cpp.
std::vector<double> CellProperties::GetTimesAtMaxUpstrokeVelocity | ( | ) | [inline] |
Returns the time at which the maximum upstroke velocity occured for all APs.
Definition at line 127 of file CellProperties.hpp.
double CellProperties::GetTimeAtLastMaxUpstrokeVelocity | ( | ) |
Returns the time at which the maximum upstroke velocity for the last complete 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 272 of file CellProperties.cpp.
std::vector<double> CellProperties::GetCycleLengths | ( | ) | [inline] |
Returns the cycle lengths for all APs.
Definition at line 141 of file CellProperties.hpp.
std::vector<double> CellProperties::GetPeakPotentials | ( | ) | [inline] |
Returns the peak potentials for all APs.
Definition at line 149 of file CellProperties.hpp.
std::vector<double> CellProperties::GetRestingPotentials | ( | ) | [inline] |
Returns the resting potentials 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.
Definition at line 159 of file CellProperties.hpp.
std::vector< double > CellProperties::GetAllActionPotentialDurations | ( | const double | percentage | ) |
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 215 of file CellProperties.cpp.
References CalculateActionPotentialDurations(), and mOnsets.
double CellProperties::GetLastActionPotentialDuration | ( | const double | percentage | ) |
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 231 of file CellProperties.cpp.
References CalculateActionPotentialDurations(), and mOnsets.
std::vector< double > CellProperties::GetActionPotentialAmplitudes | ( | ) |
Returns the amplitude of all the action potentials calculated.
Definition at line 252 of file CellProperties.cpp.
std::vector<double>& CellProperties::mrVoltage [private] |
The simulation results to process
Definition at line 54 of file CellProperties.hpp.
Referenced by CalculateActionPotentialDurations(), and CalculateProperties().
double CellProperties::mThreshold [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 62 of file CellProperties.hpp.
Referenced by CalculateProperties().
std::vector<double> CellProperties::mOnsets [private] |
Cached vectors containing AP properties
Definition at line 67 of file CellProperties.hpp.
Referenced by CalculateProperties(), GetAllActionPotentialDurations(), and GetLastActionPotentialDuration().