|
carputils
Doxygen code documentation for the python framework controlling openCARP
|
Functions | |
| def | stimulate_to_find_if_persistent (args, cmd_ref, job, mesh_name, simid, start_S2, stim) |
| Stimulates starting at the start_S2 +300 timepoint until +1500 to see if the arrythmia is persistent. More... | |
| def | get_last_act_index (vm) |
| Gets the time index of the last ACT. More... | |
| def | pacing_s1_sinus_s2_stim_point (args, cmd, job, mesh_name, simid, sinus, start_S2, start_state_file, stim_point, tsav_state) |
| Pace at first from the sinus node and then from the stimulation point after start_S2 ms. More... | |
| def | get_element_from_dat (dat_file, index_node) |
| Gets float value for a single point in a dat file. More... | |
| def | get_ring_around_stim_point (args, stim_point_index, mesh_name, stim_point, tag_str) |
| Generates a ring of size 2*stim_size < x < 3*stim_size around the stimulation point. More... | |
| def | update_refactory_window_bounds (M2, OptimizationTimePoints time_pts, simid, tsav_state) |
| def | update_lower_bound_when_refractory (simid, float start_S2, new_offset=60) |
| Updates the lower bound which happens when the simulation is refactory (Low M2). More... | |
| def | update_upper_bound_non_refractory (simid, float start_S2, new_offset=60) |
| Updates the upper bound of the search window if the previous S2 stimuli did create a depolarizing wave (non-refractory) More... | |
| def | compute_apd (apd_file_name, args, job, steady_state_dir) |
| def | store_init_arrhythmia_to_file (index_node, job, n_beat, simid, start_S2) |
| Saves the current arrhythmia at the index_node to saved.txt and also stores the corresponding .igb file. More... | |
| def | get_closest_tsav_to_act (last_ACT_i, tsav_states) |
| Get the closest openCARP save state to the last ACT. More... | |
| def | write_convergence_data (str simid, OptimizationTimePoints time_pts, int iterations, time_taken, M2, M2_mean) |
| def | create_debug_csv () |
| def | define_save_states_for_stim (stim_start, times_array) |
| def | store_reentry (index_node, job, n_beat, start_S2) |
| def | store_non_reentry (index_node, job, n_beat, start_S2) |
| def | get_id_of_stimulation_point (mesh_name, simid, stim_point) |
| def carputils.model.protocols.PEERP_subroutines.compute_apd | ( | apd_file_name, | |
| args, | |||
| job, | |||
| steady_state_dir | |||
| ) |
| def carputils.model.protocols.PEERP_subroutines.create_debug_csv | ( | ) |
| def carputils.model.protocols.PEERP_subroutines.define_save_states_for_stim | ( | stim_start, | |
| times_array | |||
| ) |
| def carputils.model.protocols.PEERP_subroutines.get_closest_tsav_to_act | ( | last_ACT_i, | |
| tsav_states | |||
| ) |
Get the closest openCARP save state to the last ACT.
| last_ACT_i | |
| tsav_states | Array of tsav times :return: |
| def carputils.model.protocols.PEERP_subroutines.get_element_from_dat | ( | dat_file, | |
| index_node | |||
| ) |
Gets float value for a single point in a dat file.
| dat_file | Corresponding .dat file |
| index_node | The index of the node in the dat file :return: |
| def carputils.model.protocols.PEERP_subroutines.get_id_of_stimulation_point | ( | mesh_name, | |
| simid, | |||
| stim_point | |||
| ) |
| def carputils.model.protocols.PEERP_subroutines.get_last_act_index | ( | vm | ) |
Gets the time index of the last ACT.
| vm | :return: |
| def carputils.model.protocols.PEERP_subroutines.get_ring_around_stim_point | ( | args, | |
| stim_point_index, | |||
| mesh_name, | |||
| stim_point, | |||
| tag_str | |||
| ) |
Generates a ring of size 2*stim_size < x < 3*stim_size around the stimulation point.
Whole connecting tissue is stored in {mesh_name}_tag_{stim_point_index}.surf.vtx. Ring around the stim point is stored in {mesh_name}_node_{stim_point_index}.vtx
| args | Has to contain args.stim_size |
| stim_point_index | The index of the stimulation point |
| mesh_name | The name of the main mesh |
| stim_point | The coordinates of the stimulation point |
| tag_str | Element tags of the atrial surface :return: |
| def carputils.model.protocols.PEERP_subroutines.pacing_s1_sinus_s2_stim_point | ( | args, | |
| cmd, | |||
| job, | |||
| mesh_name, | |||
| simid, | |||
| sinus, | |||
| start_S2, | |||
| start_state_file, | |||
| stim_point, | |||
| tsav_state | |||
| ) |
Pace at first from the sinus node and then from the stimulation point after start_S2 ms.
| args | |
| cmd | |
| job | |
| mesh_name | |
| simid | |
| sinus | The sinus region defined as -stimulius[0].geometry, >sinus node id< |
| start_S2 | Start time of the S2 stimulus |
| start_state_file | |
| stim_point | The stimulation point for the S2 stimulus |
| tsav_state | First save point. Also start_S2-1 and start_S2+60 are saved :return: |
| def carputils.model.protocols.PEERP_subroutines.stimulate_to_find_if_persistent | ( | args, | |
| cmd_ref, | |||
| job, | |||
| mesh_name, | |||
| simid, | |||
| start_S2, | |||
| stim | |||
| ) |
Stimulates starting at the start_S2 +300 timepoint until +1500 to see if the arrythmia is persistent.
| args | Has to include args.M_lump for mass lumping option |
| cmd_ref | |
| job | Job object for executing on cmd |
| mesh_name | |
| simid | Simulation ID for openCARP |
| start_S2 | |
| stim | Stimulation parameters. Should be a stimulus without a current, to just see the result of the previous S2 stimuli :return: |
| def carputils.model.protocols.PEERP_subroutines.store_init_arrhythmia_to_file | ( | index_node, | |
| job, | |||
| n_beat, | |||
| simid, | |||
| start_S2 | |||
| ) |
Saves the current arrhythmia at the index_node to saved.txt and also stores the corresponding .igb file.
| index_node | |
| job | |
| n_beat | |
| simid | |
| start_S2 | :return: |
| def carputils.model.protocols.PEERP_subroutines.store_non_reentry | ( | index_node, | |
| job, | |||
| n_beat, | |||
| start_S2 | |||
| ) |
| def carputils.model.protocols.PEERP_subroutines.store_reentry | ( | index_node, | |
| job, | |||
| n_beat, | |||
| start_S2 | |||
| ) |
| def carputils.model.protocols.PEERP_subroutines.update_lower_bound_when_refractory | ( | simid, | |
| float | start_S2, | ||
new_offset = 60 |
|||
| ) |
Updates the lower bound which happens when the simulation is refactory (Low M2).
| simid | Main working directoryold_file = os.path.join(str(simid), 'vm.igb') |
| start_S2 | Start of the S2 stimulus in ms |
| new_offset | Offset of the S2 stimulus in ms which will be stored in state_upper_bound.roe :return: |
| def carputils.model.protocols.PEERP_subroutines.update_refactory_window_bounds | ( | M2, | |
| OptimizationTimePoints | time_pts, | ||
| simid, | |||
| tsav_state | |||
| ) |
| def carputils.model.protocols.PEERP_subroutines.update_upper_bound_non_refractory | ( | simid, | |
| float | start_S2, | ||
new_offset = 60 |
|||
| ) |
Updates the upper bound of the search window if the previous S2 stimuli did create a depolarizing wave (non-refractory)
| simid | Main working directoryold_file = os.path.join(str(simid), 'vm.igb') |
| start_S2 | Start of the S2 stimulus in ms |
| new_offset | Offset of the S2 stimulus in ms which will be stored in state_upper_bound.roe :return: |
| def carputils.model.protocols.PEERP_subroutines.write_convergence_data | ( | str | simid, |
| OptimizationTimePoints | time_pts, | ||
| int | iterations, | ||
| time_taken, | |||
| M2, | |||
| M2_mean | |||
| ) |