carputils
Doxygen code documentation for the python framework controlling openCARP
Functions | Variables
carputils.ep Namespace Reference

Functions

def model_type_opts (name, depth=None)
 Generate the EP model type openCARP options. More...
 
def fake_ep_opts (stimIdx, act_sequence, pulse_file=None, num_pulses=1, bcl=400.0, stim_duration=2.0)
 Set up a single stimulus for a 'fake EP' eikonal-bidomain simulation. More...
 
def setupPropagation (mode, numStims, stims, actSeq, pulse=None, IDs=None, names=None)
 Set up propagation model. More...
 
def setupPropagation_wHPS (mode, HPS, HPS_ek, numStims, stims, actSeq, pulse=None, IDs=None, names=None)
 Set up propagation model with His-Purkinje system. More...
 
def setup_AP_E (act_seq_file, IDs, names=None)
 Set up AP-E propagation mode where an AP is prescribed to each individual imp_region of a given simulation. More...
 

Variables

list MODEL_TYPES = ['monodomain', 'bidomain', 'pseudo_bidomain']
 
list PROP_TYPES = ['R-D', 'R-E+', 'R-E-', 'AP-E' ]
 

Function Documentation

◆ fake_ep_opts()

def carputils.ep.fake_ep_opts (   stimIdx,
  act_sequence,
  pulse_file = None,
  num_pulses = 1,
  bcl = 400.0,
  stim_duration = 2.0 
)

Set up a single stimulus for a 'fake EP' eikonal-bidomain simulation.

Parameters

act_sequence str Filename of the activation sequence to use pulse_file str or bool, optional Filename, without the '.trc' extension, of a pulse shape to use, or True to use a standard shaped foot

Returns

list List of openCARP command line options to set up the fake EP

◆ model_type_opts()

def carputils.ep.model_type_opts (   name,
  depth = None 
)

Generate the EP model type openCARP options.

Parameters

name str The name of the EP model type

Returns

list List of openCARP command line options to set up this model type

◆ setup_AP_E()

def carputils.ep.setup_AP_E (   act_seq_file,
  IDs,
  names = None 
)

Set up AP-E propagation mode where an AP is prescribed to each individual imp_region of a given simulation.

Note that the lists IDs and names (if given) must be of the same length or longer as any imp_region defined in the input parameter file

Parameters

actSeq str Filename, without the '.trc' extension, of a pulse shape to use, or True to use a standard shaped foot IDs list of integers list of unique AP ID for each imp_region. As example, if there are three imp_regions, and we use the list IDs=[10, 20, 30], AP's must be stored in files named AP_10.trc, AP_20.trc and AP_30.trc. names list (optional) names of imp_regions

Returns

AP_E_Opts list List of openCARP command line options to set up AP-E propagation model

◆ setupPropagation()

def carputils.ep.setupPropagation (   mode,
  numStims,
  stims,
  actSeq,
  pulse = None,
  IDs = None,
  names = None 
)

Set up propagation model.

Parameters

mode str Name of propagation mode, either R-D, R-E+ or R-E-, or AP-E numStims int Current number of stimuli already added to a simulation setup stims list list holding all information on previously added stimulus definitions actSeq str Filename of a precomputed activation sequence to use IDs list of integers (optional, only for setting up AP-E mode) list of region IDs for each imp_region names list (optional, only for setting up AP-E mode) names of imp_regions

Returns
-------

propOpts list List of openCARP command line options to set up propagation model numStims int updated number of stimuli stims list list of stimuli commands needed for setting up the propagation model

◆ setupPropagation_wHPS()

def carputils.ep.setupPropagation_wHPS (   mode,
  HPS,
  HPS_ek,
  numStims,
  stims,
  actSeq,
  pulse = None,
  IDs = None,
  names = None 
)

Set up propagation model with His-Purkinje system.

Parameters

mode str Name of propagation mode, either R-D, R-E+ or R-E-, or AP-E HPS list HPS version used for R-D simulations HPS_ek list HPS version used for R-E simulations (often a coarser version of the R-D HPS) numStims int Current number of stimuli already added to a simulation setup stims list list holding all information on previously added stimulus definitions actSeq str Filename, without the '.trc' extension, of a pulse shape to use, or True to use a standard shaped foot

Returns

propOpts list List of openCARP command line options to set up propagation model numStims int updated number of stimuli stims list list of stimuli commands needed for setting up the propagation model

Variable Documentation

◆ MODEL_TYPES

list carputils.ep.MODEL_TYPES = ['monodomain', 'bidomain', 'pseudo_bidomain']

◆ PROP_TYPES

list carputils.ep.PROP_TYPES = ['R-D', 'R-E+', 'R-E-', 'AP-E' ]