carputils
Doxygen code documentation for the python framework controlling openCARP
Functions
carputils.model.helper_methods Namespace Reference

Functions

def create_dir (directory)
 Creates a directory for the defined path and checks for errors. More...
 
def extract_last_ms_from_igb (job, nodes_to_check_str, simid, last_ms, igb_file='/vm.igb', out_file="/out")
 Uses igbextract to extract nodes from an igb file. More...
 
def get_cmd_for_one_stimulus (args, start, stimulation_node, duration=2, npls=1, bcl=None)
 Initializes a cmd prompt to create a stimulus for a given startpoint and duration at a given stimulation node. More...
 

Function Documentation

◆ create_dir()

def carputils.model.helper_methods.create_dir (   directory)

Creates a directory for the defined path and checks for errors.

Parameters
directory:return:

◆ extract_last_ms_from_igb()

def carputils.model.helper_methods.extract_last_ms_from_igb (   job,
  nodes_to_check_str,
  simid,
  last_ms,
  igb_file = '/vm.igb',
  out_file = "/out" 
)

Uses igbextract to extract nodes from an igb file.

Parameters
jobJob object to execute commands.
nodes_to_check_str
simidThe current working directory for the simulation.
last_msSets the start to the last x ms.
igb_fileIGB input file. Ends with .igb.
out_fileOutput file from the extraction. :return:

◆ get_cmd_for_one_stimulus()

def carputils.model.helper_methods.get_cmd_for_one_stimulus (   args,
  start,
  stimulation_node,
  duration = 2,
  npls = 1,
  bcl = None 
)

Initializes a cmd prompt to create a stimulus for a given startpoint and duration at a given stimulation node.

Parameters
argsHas to contain the stimulus strength (args.strength) in mV and stimulation size (args.size)
startStart time of the stimulus
stimulation_node3D coordinates of the stimulation node
durationDuration of the stimulus in ms
nplsNumber of pulses per stimulus
bclBasic cycle length in ms. If not set the default in openCARP is (t_end-start) :return: