apply_cv

This is a runfile to apply conduction velocities to a reconstructed mesh.

It’s purpose is to provide easy access or terminal-level access to apply conduction velocities to a reconstructed mesh. It uses the CartoMesh class from the carto_mesh module along with its dependencies. If you like more control over this reconstruction process than the settings.ini file and the runfiles reconstruct and apply_cv, then you can also from carto_mesh import * in python and use the class as you please.

The command line arguments can be requested by running python apply_cv.py -h, but are also listed below. These arguments overwrite any setting defined in settings.ini

Command-line arguments:

name: name of the file containing the conduction velocities. The file must be a .csv file containing the columns ‘x’, ‘y’, ‘z’ and ‘speed’

–write_adjust (optional): Whether or not to write an adjustment file for closing off Na2+ channels.

–region_dir (optional): Name of the directory containing .csv files with indices of mesh points that need to be set to a conduction velocity of 0, if this is wanted. By default, it does not look for this directory

–speed_file (optional): Name of the .csv file containing coordinates and conduction velocity values to interpolate. Default = ‘speed.csv’

–ncv (optional): Amount of conduction velocity distributions to calculate based on the given file. If ncv > 1, then random distributions will be calculated based on the input file.

–speed_col (optional): Name of the column in speed.csv that contains the conduction velocity values. Default=’speed’

–writeVTK (optional): write out the reconstructed mesh with its speed values interpolated in .vtk format. These meshes will have a suffix ‘_CV=n’ where n denotes the conduction velocity variation.

Functions

run([meshname, speed_file, region_dir, ...])

Reads in a reconstructed .vtk mesh and interpolates conduction velocities from <speed_file>.