PropagationPropertiesCalculator Class Reference

#include <PropagationPropertiesCalculator.hpp>

Collaboration diagram for PropagationPropertiesCalculator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PropagationPropertiesCalculator (Hdf5DataReader *pDataReader, const std::string voltageName="V")
virtual ~PropagationPropertiesCalculator ()
double CalculateMaximumUpstrokeVelocity (unsigned globalNodeIndex)
std::vector< doubleCalculateAllMaximumUpstrokeVelocities (unsigned globalNodeIndex, double threshold)
std::vector< doubleCalculateUpstrokeTimes (unsigned globalNodeIndex, double threshold)
double CalculateConductionVelocity (unsigned globalNearNodeIndex, unsigned globalFarNodeIndex, const double euclideanDistance)
std::vector< doubleCalculateAllConductionVelocities (unsigned globalNearNodeIndex, unsigned globalFarNodeIndex, const double euclideanDistance)
double CalculateActionPotentialDuration (const double percentage, unsigned globalNodeIndex)
double CalculatePeakMembranePotential (unsigned globalNodeIndex)
std::vector< doubleCalculateAllActionPotentialDurations (const double percentage, unsigned globalNodeIndex, double threshold)
std::vector< std::vector
< double > > 
CalculateAllActionPotentialDurationsForNodeRange (const double percentage, unsigned lowerNodeIndex, unsigned upperNodeIndex, double threshold)
std::vector< unsignedCalculateAllAboveThresholdDepolarisations (unsigned globalNodeIndex, double threshold)
unsigned CalculateAboveThresholdDepolarisationsForLastAp (unsigned globalNodeIndex, double threshold)

Private Member Functions

std::vector< double > & rCacheVoltages (unsigned globalNodeIndex)

Private Attributes

Hdf5DataReadermpDataReader
const std::string mVoltageName
std::vector< doublemTimes
unsigned mCachedNodeGlobalIndex
std::vector< doublemCachedVoltages

Detailed Description

Calculate physiological properties at given global mesh indices

Definition at line 46 of file PropagationPropertiesCalculator.hpp.


Constructor & Destructor Documentation

PropagationPropertiesCalculator::PropagationPropertiesCalculator ( Hdf5DataReader pDataReader,
const std::string  voltageName = "V" 
)

Constructor.

Parameters:
pDataReader Pointer to the data reader containing the simulation.
voltageName Optionally the name of the variable representing the membrane potential. Defaults to "V".

Definition at line 36 of file PropagationPropertiesCalculator.cpp.

PropagationPropertiesCalculator::~PropagationPropertiesCalculator (  )  [virtual]

Destructor

Definition at line 44 of file PropagationPropertiesCalculator.cpp.


Member Function Documentation

unsigned PropagationPropertiesCalculator::CalculateAboveThresholdDepolarisationsForLastAp ( unsigned  globalNodeIndex,
double  threshold 
)

Calculates the depolarisations that occur above threshold at a single cell during the last recorded Ap

Parameters:
globalNodeIndex the cell at which to calculate
threshold the threshold above which the depolarisations are counted

Definition at line 293 of file PropagationPropertiesCalculator.cpp.

References CellProperties::GetNumberOfAboveThresholdDepolarisationsForLastAp(), mTimes, and rCacheVoltages().

double PropagationPropertiesCalculator::CalculateActionPotentialDuration ( const double  percentage,
unsigned  globalNodeIndex 
)

Calculate the action potential duration at a single cell. We calculate for the last AP found in the simulation data.

Parameters:
percentage The percentage of the amplitude to calculate for.
globalNodeIndex The cell at which to calculate.

Definition at line 70 of file PropagationPropertiesCalculator.cpp.

References EXCEPTION, CellProperties::GetLastActionPotentialDuration(), mTimes, and rCacheVoltages().

Referenced by AbstractConvergenceTester< CELL, CARDIAC_PROBLEM, DIM, PROBLEM_DIM >::Converge().

std::vector< unsigned > PropagationPropertiesCalculator::CalculateAllAboveThresholdDepolarisations ( unsigned  globalNodeIndex,
double  threshold 
)

Calculates all the depolarisations that occur above threshold at a single cell.

Parameters:
globalNodeIndex the cell at which to calculate
threshold the threshold above which the depolarisations are counted

Definition at line 285 of file PropagationPropertiesCalculator.cpp.

References CellProperties::GetNumberOfAboveThresholdDepolarisationsForAllAps(), mTimes, and rCacheVoltages().

Referenced by PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteAboveThresholdDepolarisationFile().

std::vector< double > PropagationPropertiesCalculator::CalculateAllActionPotentialDurations ( const double  percentage,
unsigned  globalNodeIndex,
double  threshold 
)

Calculate all the action potentials duration at a single cell.

Parameters:
percentage The percentage of the amplitude to calculate for.
globalNodeIndex The cell at which to calculate.
threshold The voltage threshold for APD calculation (we count this as the start of an AP)

Definition at line 82 of file PropagationPropertiesCalculator.cpp.

References CellProperties::GetAllActionPotentialDurations(), mTimes, and rCacheVoltages().

std::vector< std::vector< double > > PropagationPropertiesCalculator::CalculateAllActionPotentialDurationsForNodeRange ( const double  percentage,
unsigned  lowerNodeIndex,
unsigned  upperNodeIndex,
double  threshold 
)

Calculate all the action potentials duration at a cells [lowerNodeIndex, upperNodeIndex-1].

Parameters:
percentage The percentage of the amplitude to calculate for.
lowerNodeIndex First cell at which to calculate.
upperNodeIndex One past the last cell at which to calculate.
threshold The voltage threshold for APD calculation (we count this as the start of an AP)

Definition at line 91 of file PropagationPropertiesCalculator.cpp.

References CellProperties::GetAllActionPotentialDurations(), Exception::GetShortMessage(), Hdf5DataReader::GetVariableOverTimeOverMultipleNodes(), mpDataReader, mTimes, and mVoltageName.

Referenced by PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteApdMapFile().

std::vector< double > PropagationPropertiesCalculator::CalculateAllConductionVelocities ( unsigned  globalNearNodeIndex,
unsigned  globalFarNodeIndex,
const double  euclideanDistance 
)

Calculate all the conduction velocities between two cells, i.e. the time taken for all APs to propagate from one to the other. It returns a vector containing all the conduction velocities for each of the APs that reached the two nodes (only the APs that reached both nodes). Throws exceptions if an AP never reached one of the nodes.

Parameters:
globalNearNodeIndex The cell to measure from.
globalFarNodeIndex The cell to measure to.
euclideanDistance The distance the AP travels between the cells, along the tissue.

Todo:
remove magic number? (#1884)

Definition at line 220 of file PropagationPropertiesCalculator.cpp.

References CellProperties::GetTimesAtMaxUpstrokeVelocity(), Hdf5DataReader::GetVariableOverTime(), mpDataReader, mTimes, mVoltageName, and rCacheVoltages().

Referenced by PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteConductionVelocityMap().

std::vector< double > PropagationPropertiesCalculator::CalculateAllMaximumUpstrokeVelocities ( unsigned  globalNodeIndex,
double  threshold 
)

Calculate the maximum upstroke velocity at a single cell. We return all the max upstroke velocities for all APs.

Parameters:
globalNodeIndex The cell at which to calculate.
threshold The voltage threshold (we use this for marking the end of an AP)

Definition at line 56 of file PropagationPropertiesCalculator.cpp.

References CellProperties::GetMaxUpstrokeVelocities(), mTimes, and rCacheVoltages().

Referenced by PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteAboveThresholdDepolarisationFile(), and PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteMaxUpstrokeVelocityMap().

double PropagationPropertiesCalculator::CalculateConductionVelocity ( unsigned  globalNearNodeIndex,
unsigned  globalFarNodeIndex,
const double  euclideanDistance 
)

Calculate the conduction velocity between two cells, i.e. the time taken for an AP to propagate from one to the other. It returns the value of conduction velocity of the LAST action potential that reached both nodes. Throws exceptions if an AP never reached one of the nodes.

Parameters:
globalNearNodeIndex The cell to measure from.
globalFarNodeIndex The cell to measure to.
euclideanDistance The distance the AP travels between the cells, along the tissue.

Todo:
remove magic number? (#1884)

Definition at line 164 of file PropagationPropertiesCalculator.cpp.

References CellProperties::GetMaxUpstrokeVelocities(), CellProperties::GetTimeAtLastMaxUpstrokeVelocity(), CellProperties::GetTimesAtMaxUpstrokeVelocity(), Hdf5DataReader::GetVariableOverTime(), mpDataReader, mTimes, mVoltageName, and rCacheVoltages().

Referenced by AbstractConvergenceTester< CELL, CARDIAC_PROBLEM, DIM, PROBLEM_DIM >::Converge().

double PropagationPropertiesCalculator::CalculateMaximumUpstrokeVelocity ( unsigned  globalNodeIndex  ) 

Calculate the maximum upstroke velocity at a single cell. We calculate for the last upstroke found in the simulation data.

Parameters:
globalNodeIndex The cell at which to calculate.

Definition at line 49 of file PropagationPropertiesCalculator.cpp.

References CellProperties::GetLastMaxUpstrokeVelocity(), mTimes, and rCacheVoltages().

double PropagationPropertiesCalculator::CalculatePeakMembranePotential ( unsigned  globalNodeIndex  ) 

Calculate the maximum transmembrane potential (maximum systolic potential) at a single cell. We calculate for the last AP found in the simulation data.

Parameters:
globalNodeIndex The cell at which to calculate.

Definition at line 150 of file PropagationPropertiesCalculator.cpp.

References rCacheVoltages().

std::vector< double > PropagationPropertiesCalculator::CalculateUpstrokeTimes ( unsigned  globalNodeIndex,
double  threshold 
)

Calculate the times of upstroke at a single cell. We return all the times of upstroke velocities for all APs.

Parameters:
globalNodeIndex The cell at which to calculate.
threshold The voltage threshold for APD calculation (we count this as the start of an AP)

Definition at line 63 of file PropagationPropertiesCalculator.cpp.

References CellProperties::GetTimesAtMaxUpstrokeVelocity(), mTimes, and rCacheVoltages().

Referenced by PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteUpstrokeTimeMap().

std::vector< double > & PropagationPropertiesCalculator::rCacheVoltages ( unsigned  globalNodeIndex  )  [private]

Read the voltages vector for the given node and cache it, returning a reference to the cached vector. If subsequently called with the same index, will return the cached vector without re-reading from file.

Note: will only cache the last node index used.

Parameters:
globalNodeIndex the index of the node to cache voltages for

Definition at line 301 of file PropagationPropertiesCalculator.cpp.

References Hdf5DataReader::GetVariableOverTime(), mCachedNodeGlobalIndex, mCachedVoltages, mpDataReader, and mVoltageName.

Referenced by CalculateAboveThresholdDepolarisationsForLastAp(), CalculateActionPotentialDuration(), CalculateAllAboveThresholdDepolarisations(), CalculateAllActionPotentialDurations(), CalculateAllConductionVelocities(), CalculateAllMaximumUpstrokeVelocities(), CalculateConductionVelocity(), CalculateMaximumUpstrokeVelocity(), CalculatePeakMembranePotential(), and CalculateUpstrokeTimes().


Member Data Documentation

Which node voltages have been cached for, if any

Definition at line 56 of file PropagationPropertiesCalculator.hpp.

Referenced by rCacheVoltages().

The cached voltages vector

Definition at line 58 of file PropagationPropertiesCalculator.hpp.

Referenced by rCacheVoltages().

Reader to get the data from which we use to calculate properties.

Definition at line 50 of file PropagationPropertiesCalculator.hpp.

Referenced by CalculateAllActionPotentialDurationsForNodeRange(), CalculateAllConductionVelocities(), CalculateConductionVelocity(), and rCacheVoltages().

const std::string PropagationPropertiesCalculator::mVoltageName [private]

Name of the variable representing the membrane potential.

Definition at line 52 of file PropagationPropertiesCalculator.hpp.

Referenced by CalculateAllActionPotentialDurationsForNodeRange(), CalculateAllConductionVelocities(), CalculateConductionVelocity(), and rCacheVoltages().


The documentation for this class was generated from the following files:
Generated on Thu Dec 22 13:07:23 2011 for Chaste by  doxygen 1.6.3