Loading datasets — openep.io.readers

This module contains functions to load an OpenEP dataset.

Note

openep-py is currently only able to load:
  • data exported from the MATLAB implementation of OpenEP. Further, the

rfindex data is not yet loaded.

  • data from an openCARP simulation

Example of loading a dataset

Case data can be loaded as follows:

import openep
from openep._datasets.openep_datasets import DATASET_2_V73

case = openep.load_openep_mat(DATASET_2_V73)

This will load the dataset and store the information in a Case object. See openep.data_structures.case.Case for information on the attributes and methods of Case.

openep.io.readers.load_openep_mat(filename, name=None)[source]

Load a Case object from a MATLAB file.

Currently, cases can only be loaded from files created using the MATLAB implementation of OpenEP.

Parameters
  • filename (str) – path to MATLAB file to be loaded (including the .mat extension.)

  • name (str) – name to give this dataset. The default is None, in which case the filename is used at the name.

Returns

case (Case)

an OpenEP Case object that contains the surface, electric and

ablation data.

openep.io.readers.load_opencarp(points, indices, name=None)[source]

Load data from an OpenCARP simulation.

Parameters
  • points (str) – Path to the openCARP points file.

  • indices (str) – Path to the openCARP element file. Currently, only triangular meshes are supported.

  • name (str, optional) – Name of the dataset. If None, the basename of the points file will be used as the name.

Returns

case (Case) – an OpenEP Case object that contains the points and indices.

Note

All other attributes of the Case object will be empty numpy arrays.