CellProperties Class Reference

#include <CellProperties.hpp>

Collaboration diagram for CellProperties:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CellProperties (std::vector< double > &rVoltage, std::vector< double > &rTime, double threshold=-30.0)
std::vector< double > GetMaxUpstrokeVelocities ()
double GetLastMaxUpstrokeVelocity ()
double GetLastCompleteMaxUpstrokeVelocity ()
std::vector< double > GetTimesAtMaxUpstrokeVelocity ()
double GetTimeAtLastMaxUpstrokeVelocity ()
double GetTimeAtLastCompleteMaxUpstrokeVelocity ()
std::vector< double > GetCycleLengths ()
std::vector< double > GetPeakPotentials ()
double GetLastPeakPotential ()
double GetLastCompletePeakPotential ()
std::vector< double > GetRestingPotentials ()
std::vector< double > GetAllActionPotentialDurations (const double percentage)
double GetLastActionPotentialDuration (const double percentage)
std::vector< double > GetActionPotentialAmplitudes ()
std::vector< unsigned > GetNumberOfAboveThresholdDepolarisationsForAllAps ()
unsigned GetNumberOfAboveThresholdDepolarisationsForLastAp ()

Private Member Functions

void CalculateProperties ()
std::vector< double > CalculateActionPotentialDurations (const double percentage)
void CheckExceededThreshold (void)
void CheckReturnedToThreshold (void)

Private Attributes

std::vector< double > & mrVoltage
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


Detailed Description

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 48 of file CellProperties.hpp.


Constructor & Destructor Documentation

CellProperties::CellProperties ( std::vector< double > &  rVoltage,
std::vector< double > &  rTime,
double  threshold = -30.0 
) [inline]

Constructor sets the data and calls CalculateProperties

Parameters:
&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 126 of file CellProperties.hpp.

References CalculateProperties().


Member Function Documentation

void CellProperties::CalculateProperties (  )  [private]

Calculate all the cacheable values.

Todo:
#1495 a horrible magic number but seems to work OK.

Definition at line 39 of file CellProperties.cpp.

References EXCEPTION, mCounterOfPlateauDepolarisations, mCycleLengths, mMaxUpstrokeVelocities, mOnsets, mPeakValues, mRestingValues, mrTime, mrVoltage, mThreshold, mTimesAtMaxUpstrokeVelocity, and mUnfinishedActionPotentials.

Referenced by CellProperties().

std::vector< double > CellProperties::CalculateActionPotentialDurations ( const double  percentage  )  [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.

Parameters:
percentage The percentage of the amplitude to calculate for.
Returns:
a vector containing the APDs.

Definition at line 205 of file CellProperties.cpp.

References CheckExceededThreshold(), EXCEPTION, mPeakValues, mRestingValues, mrTime, and mrVoltage.

Referenced by GetAllActionPotentialDurations(), and GetLastActionPotentialDuration().

void CellProperties::CheckExceededThreshold ( void   )  [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 276 of file CellProperties.cpp.

References EXCEPTION, and mOnsets.

Referenced by CalculateActionPotentialDurations(), GetActionPotentialAmplitudes(), and GetRestingPotentials().

void CellProperties::CheckReturnedToThreshold ( void   )  [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 287 of file CellProperties.cpp.

References EXCEPTION, and mMaxUpstrokeVelocities.

Referenced by GetLastCompleteMaxUpstrokeVelocity(), GetLastCompletePeakPotential(), GetLastMaxUpstrokeVelocity(), GetLastPeakPotential(), GetMaxUpstrokeVelocities(), GetPeakPotentials(), GetTimeAtLastCompleteMaxUpstrokeVelocity(), GetTimeAtLastMaxUpstrokeVelocity(), and GetTimesAtMaxUpstrokeVelocity().

std::vector< double > CellProperties::GetMaxUpstrokeVelocities (  ) 

Returns the maximum upstroke velocity for all APs.

Returns:
a vector containing the maximum upstroke velocity for all APs

Definition at line 318 of file CellProperties.cpp.

References CheckReturnedToThreshold(), and mMaxUpstrokeVelocities.

Referenced by PropagationPropertiesCalculator::CalculateAllMaximumUpstrokeVelocities(), and PropagationPropertiesCalculator::CalculateConductionVelocity().

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.

Returns:
the upstroke velocity of the last AP

Definition at line 368 of file CellProperties.cpp.

References CheckReturnedToThreshold(), and mMaxUpstrokeVelocities.

Referenced by PropagationPropertiesCalculator::CalculateMaximumUpstrokeVelocity().

double CellProperties::GetLastCompleteMaxUpstrokeVelocity (  ) 

Returns the maximum upstroke velocity for the last complete AP. If the threshold is never crossed, it throws an exception.

Returns:
the upstroke velocity of the last complete AP

Definition at line 374 of file CellProperties.cpp.

References CheckReturnedToThreshold(), EXCEPTION, mMaxUpstrokeVelocities, and mUnfinishedActionPotentials.

std::vector< double > CellProperties::GetTimesAtMaxUpstrokeVelocity (  ) 

Returns the time at which the maximum upstroke velocity occurred for all APs.

Returns:
a vector containing the times of maximum upstroke velocity for all APs

Definition at line 324 of file CellProperties.cpp.

References CheckReturnedToThreshold(), and mTimesAtMaxUpstrokeVelocity.

Referenced by PropagationPropertiesCalculator::CalculateAllConductionVelocities(), PropagationPropertiesCalculator::CalculateConductionVelocity(), and PropagationPropertiesCalculator::CalculateUpstrokeTimes().

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.

Returns:
the time of the upstroke velocity of the last AP

Definition at line 393 of file CellProperties.cpp.

References CheckReturnedToThreshold(), and mTimesAtMaxUpstrokeVelocity.

Referenced by PropagationPropertiesCalculator::CalculateConductionVelocity().

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.

Returns:
the time of the upstroke velocity of the last full AP

Definition at line 399 of file CellProperties.cpp.

References CheckReturnedToThreshold(), EXCEPTION, mTimesAtMaxUpstrokeVelocity, and mUnfinishedActionPotentials.

std::vector< double > CellProperties::GetCycleLengths (  ) 

Returns the cycle lengths for all APs.

Returns:
a vector containing the cycle lengths for all APs

Definition at line 301 of file CellProperties.cpp.

References mCycleLengths.

std::vector< double > CellProperties::GetPeakPotentials (  ) 

Returns the peak potentials for all APs.

Returns:
a vector containing the peak potentials for all APs

Definition at line 312 of file CellProperties.cpp.

References CheckReturnedToThreshold(), and mPeakValues.

double CellProperties::GetLastPeakPotential (  ) 

Returns the last peak potential.

Returns:
last peak potential V_max

Definition at line 343 of file CellProperties.cpp.

References CheckReturnedToThreshold(), and mPeakValues.

double CellProperties::GetLastCompletePeakPotential (  ) 

Returns the last complete AP's peak potential.

Returns:
last peak potential V_max

Definition at line 349 of file CellProperties.cpp.

References CheckReturnedToThreshold(), EXCEPTION, mPeakValues, and mUnfinishedActionPotentials.

std::vector< double > CellProperties::GetRestingPotentials (  ) 

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.

Returns:
a vector containing the resting potentials for all APs

Definition at line 306 of file CellProperties.cpp.

References CheckExceededThreshold(), and mRestingValues.

std::vector< double > CellProperties::GetAllActionPotentialDurations ( const double  percentage  ) 

Returns all the action potentials durations

Parameters:
percentage is the repolarisation percentage that the APD will be calculated for. e.g. percentage = 90 for APD90.
Returns:
a vector containing all the APDs

Definition at line 330 of file CellProperties.cpp.

References CalculateActionPotentialDurations().

Referenced by PropagationPropertiesCalculator::CalculateAllActionPotentialDurations().

double CellProperties::GetLastActionPotentialDuration ( const double  percentage  ) 

Returns the amplitude of the last action potential generated. Throws an exception if no AP is generated.

Parameters:
percentage is the repolarisation percentage that the APD will be calculated for. e.g. percentage = 90 for APD90.
Returns:
the APD of the last AP

Definition at line 418 of file CellProperties.cpp.

References CalculateActionPotentialDurations().

Referenced by PropagationPropertiesCalculator::CalculateActionPotentialDuration().

std::vector< double > CellProperties::GetActionPotentialAmplitudes (  ) 

Returns the amplitude of all the action potentials calculated.

Returns:
a vector containing all the AP amplitudes

Definition at line 264 of file CellProperties.cpp.

References CheckExceededThreshold(), mPeakValues, and mRestingValues.

std::vector< unsigned > CellProperties::GetNumberOfAboveThresholdDepolarisationsForAllAps (  ) 

Returns:
a vector containing the number of above-threshold depolarisations for each Ap.

Definition at line 335 of file CellProperties.cpp.

References mCounterOfPlateauDepolarisations.

Referenced by PropagationPropertiesCalculator::CalculateAllAboveThresholdDepolarisations().

unsigned CellProperties::GetNumberOfAboveThresholdDepolarisationsForLastAp (  ) 

Returns:
the number of above-threshold depolarisations for the last Ap.

Definition at line 425 of file CellProperties.cpp.

References mCounterOfPlateauDepolarisations.

Referenced by PropagationPropertiesCalculator::CalculateAboveThresholdDepolarisationsForLastAp().


Member Data Documentation

std::vector<double>& CellProperties::mrVoltage [private]

The simulation results to process, voltage

Definition at line 52 of file CellProperties.hpp.

Referenced by CalculateActionPotentialDurations(), and CalculateProperties().

std::vector<double>& CellProperties::mrTime [private]

The simulation results to process, time

Definition at line 54 of file CellProperties.hpp.

Referenced by CalculateActionPotentialDurations(), and CalculateProperties().

Whether we have any unfinished action potentials i.e. the trace ends ABOVE_THRESHOLD.

Definition at line 60 of file CellProperties.hpp.

Referenced by CalculateProperties(), GetLastCompleteMaxUpstrokeVelocity(), GetLastCompletePeakPotential(), and GetTimeAtLastCompleteMaxUpstrokeVelocity().

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 67 of file CellProperties.hpp.

Referenced by CalculateProperties().

std::vector<double> CellProperties::mOnsets [private]

Cached vector containing AP onset properties

Definition at line 70 of file CellProperties.hpp.

Referenced by CalculateProperties(), and CheckExceededThreshold().

std::vector<double> CellProperties::mRestingValues [private]

Cached vector containing AP resting properties

Definition at line 72 of file CellProperties.hpp.

Referenced by CalculateActionPotentialDurations(), CalculateProperties(), GetActionPotentialAmplitudes(), and GetRestingPotentials().

std::vector<double> CellProperties::mCycleLengths [private]

Cached vector containing AP cycle lengths properties

Definition at line 74 of file CellProperties.hpp.

Referenced by CalculateProperties(), and GetCycleLengths().

std::vector<double> CellProperties::mPeakValues [private]

std::vector<double> CellProperties::mMaxUpstrokeVelocities [private]

Cached vector containing AP upstroke properties

Definition at line 78 of file CellProperties.hpp.

Referenced by CalculateProperties(), CheckReturnedToThreshold(), GetLastCompleteMaxUpstrokeVelocity(), GetLastMaxUpstrokeVelocity(), and GetMaxUpstrokeVelocities().

std::vector<double> CellProperties::mTimesAtMaxUpstrokeVelocity [private]

Cached vector containing the times of AP upstrokes

Definition at line 80 of file CellProperties.hpp.

Referenced by CalculateProperties(), GetTimeAtLastCompleteMaxUpstrokeVelocity(), GetTimeAtLastMaxUpstrokeVelocity(), and GetTimesAtMaxUpstrokeVelocity().

std::vector<unsigned> CellProperties::mCounterOfPlateauDepolarisations [private]

Cached vector containing the number of recorded depolarisations while above threshold

Definition at line 82 of file CellProperties.hpp.

Referenced by CalculateProperties(), GetNumberOfAboveThresholdDepolarisationsForAllAps(), and GetNumberOfAboveThresholdDepolarisationsForLastAp().


The documentation for this class was generated from the following files:

Generated on Mon Apr 18 11:36:42 2011 for Chaste by  doxygen 1.5.5