You will need openCARP installed.
Firstly, compile the stan programs in the directory "stanmodels" by calling python <filename>.py
.
Then move the resulting .pkl files to the mmserp/data directory.
Then install with python setup.py install
from the top-level folder.
Dependancies should reveal themselves when attempting to run code.
For convenience, this project is organized via scripts, which should be accesible from the Python environment after installation.
Most scripts can be called as mmserp_scriptName --help
to see the available input arguments.
The rest of this README explains how to use these scripts.
HDF5 files are use to keep everything organized.
mmserp_meshToHDF5
- save a mesh into a new HDF5 filemmserp_browseHDF5
- graphically browse the HDF5 filemmserp_duplicateHDF5
- create a new HDF5 file, containing only mesh related data, from an existing HDF5 file (requires that the eigenproblem has been solved)
The calibration utilizes Gaussian Process Manifold Interpolation (GPMI)
mmserp_viewMesh
- plot the mesh colored by Universal Atrial Coordinates (UACs)mmserp_decimateMesh
- create a lower resolution mesh, and solve Laplacian eigenproblem- use
--loc
,--num
, and--runs
to determine vertices of lower resolution mesh - use
--tri
to triangulate these vertices - use
--holes
,--layers
,--eigs
,--numeigs
to solve eigenproblem
- use
mmserp_viewEigs
- plot the mesh colored by a specified eigenvector
mmserp_generateFields
- generate and store random spatially-correlated parameter fieldsmmserp_createStimulus
- define a set of vertices to use for stimulus in simulations, and save them with a specific namemmserp_createCARPfiles
- create a directory of files for running the CARP simulationsrunCARP.sh
- run simulations from the directory created abovemmserp_getSimResults
- get simulation results from the directory created above
mmserp_inference
- perform inference using a virtual experimental design- use
--params
to specify the name of parameters as specified in the HDF5 file - use
--obs
and--num
to create and save a design of observation locations - use
--deltaS2
to define the resolution of the S1S2(S3) pacing - use
--inference
and--basis
to do MCMC inference of the parameter fields - use
--plotGroundTruth
,--plotAPD
(with--pacesite
), and--plotInferred
for plotting
- use