Interface Methods¶
Here you will find some information on the data and classes that are available after loading a CARTO3 study.
cartoreader_lite.CartoStudy is the high level entry point to read CARTO3 studies.
- class cartoreader_lite.CartoStudy(arg1, arg2=None, ablation_sites_kwargs=None, carto_map_kwargs=None)¶
High level class to easily read Carto3 archives, directories or buffered studies.
- Parameters
arg1 (str) –
A path to either
A directory containing the study
A zip file with the study inside
A path to a previously saved study
arg2 (str, optional) – The name of the study to load, contained inside the directory or zip file. Has to be None when loading a pickled study. Will default to either the zip name, bottom most directory name or None, depending on your choice of arg1.
ablation_sites_kwargs (Dict) – Optional keyword arguments to be passed to
AblationSitescarto_map_kwargs (Dict) – Optional keyword arguments to be passed to
CartoMap
- name: str¶
The name of the study
- ablation_data: cartoreader_lite.high_level.study.AblationSites¶
Detailed information about the ablation sites and their readings over time
- maps: List[cartoreader_lite.high_level.study.CartoMap]¶
All recorded maps associated with this study
- aux_meshes: List[cartoreader_lite.low_level.study.CartoAuxMesh]¶
Auxiliary meshes generated by the CARTO system, not associated with any specific map, e.g. CT segmentations from CARTOSeg.
- aux_mesh_reg_mat: numpy.ndarray¶
4x4 affine registration matrix to map the auxiliary meshes.
- save(file: Optional[Union[IO, os.PathLike]] = None)¶
Backup the current study into a pickled and compressed file or buffer.
- Parameters
file (Union[IO, PathLike], optional) –
Target to write the study to. Can be on of the following:
Name of the file which the study will be written to
A file, or buffer handle to write to
Will default to the study name with the ending .pkl.gz
- static load_pickled_study(file: Union[IO, os.PathLike]) cartoreader_lite.high_level.study.CartoStudy¶
Will load a pickled study either from
- Parameters
file (Union[IO, PathLike]) – [description]
- Returns
[description]
- Return type
Internal High Level Classes¶
These classes do not need to be manually created, but should be automatically created when generating a CartoStudy.
Their most important members are described below.
- class cartoreader_lite.CartoMap(ll_map: cartoreader_lite.low_level.study.CartoLLMap, *simplify_args, **simplify_kwargs)¶
High level container for carto maps with the associated point data and mesh.
- Parameters
ll_map (CartoLLMap) – The low level study to load and simplify
- points: pandas.core.frame.DataFrame¶
Recorded point data associated with this map. The column detail returns the associated
CartoPointDetailDatawhere the ECGs and EGMs can be found.
- mesh: pyvista.core.pointset.UnstructuredGrid¶
Mesh associated with the map
- class cartoreader_lite.CartoPointDetailData(main_data: pandas.core.series.Series, raw_data: Tuple[Dict[str, Dict], Dict[str, Dict]], remove_egm_header_numbers=True)¶
Detailed data associated to a CARTO3 point.
- Parameters
main_data (pd.Series) – Metadata of the point, such as ID and mean position
raw_data (Tuple[Dict[str, Dict], Dict[str, Dict]]) – Raw data provided by
cartoreader_lite.low_level.study.CartoLLMap, including details such as EGMs.remove_egm_header_numbers (bool, optional) – If true, the EGM header numbers will be discarded (e.g. I(110) -> I). By default True
- id: int¶
Carto generated ID of the point
- pos: numpy.ndarray¶
Position of the point in 3D
- cath_orientation: numpy.ndarray¶
3D-Orientation of the catheter while recording the point
- cath_id: int¶
ID of the Catheter
- start_time: int¶
System start time of the recording
- ref_annotation: int¶
Reference annotation to synchronize all recordings
- uni_volt: float¶
Unipolar voltage magnitdue
- bip_volt: float¶
Bipolar voltage magnitdue
- connectors: List[str]¶
List of the recorded connector names
- surface_ecg: pandas.core.frame.DataFrame¶
Recorded surface ECG. Has type np.int16 and needs to be multiplied by
ecg_gainto get the ECG in Volts
- egm: pandas.core.frame.DataFrame¶
Recorded electrograms at the point through the connectors. Naming and columns differ for each setup
- class cartoreader_lite.AblationSites(visitag_data: Dict[str, pandas.core.frame.DataFrame], resample_unified_time=True, position_to_vec=True)¶
High level class for easily referencing ablation sites read from the visitag files. Automatically generated from
CartoStudy.- Parameters
visitag_data (Dict[str, pd.DataFrame]) – Visitag data read by the low level function .low_level.visitags.read_visitag_dir.
resample_unified_time (bool, optional) – If true, the visitag file with different time intervals and frequencies will be resampled into a single pandas Dataframe with unified time steps. By default True
position_to_vec (bool, optional) – If true, the entries X, Y, Z of the dataframes will be unified in the resulting tables to a single 3D vector pos. By default, True
- session_rf_data: List[Tuple[int, pandas.core.frame.DataFrame]] = None¶
Ablation data (impedance, power, temperature, …) provided by the low level classes. Only present if resample_unified_time was False
- session_force_data: List[Tuple[int, pandas.core.frame.DataFrame]] = None¶
Force data provided by the low level classes. Only present if resample_unified_time was False
- session_avg_data: pandas.core.frame.DataFrame¶
Contains average data of each ablation session, such as RFIndex, average force and position
- session_time_data: List[Tuple[int, pandas.core.frame.DataFrame]]¶
List of time data associated with each Ablation session. Each item contains the session ID + the ablation data over the course of the session
- class cartoreader_lite.CartoAuxMesh(xml_h: xml.etree.ElementTree.Element, path_prefix: str, load=True)¶
Class that holds auxiliary meshes of the CARTO system, e.g. generated by CartoSeg.
- Parameters
xml_h (Element) – XML entry point from where to read the auxiliary meshes
path_prefix (str) – Path prefix pointing to the directory to read from
load (bool, optional) – If true, the meshes will be read and buffered immediately. If false, only the names will be loaded and
load_mesh()will need to be called later. By default True
- mesh_data: pyvista.core.pointset.UnstructuredGrid¶
The loaded mesh
- metadata: Dict[str, str]¶
Metadata associated with the mesh, given by the XML tags
- affine: numpy.ndarray¶
4x4 affine transformation matrix given by CARTO
- mesh_path: str¶
Full path to the mesh file
- name: str¶
Name of the mesh
- load_mesh()¶
Loads the mesh with the given name into the memory