Skip to content

carto_reader

CartoReader

CartoReader can load and parse any type of data from the CARTO mapping system.

load(filepath, cutout=True) staticmethod

Load coordinates, triangles and scalars.

Parameters:

Name Type Description Default
filepath str

The path to the mesh file.

required
cutout bool

Remove annotated cutouts or not. Defaults to True.

True

Returns:

Name Type Description
tuple tuple[ndarray, ndarray, ndarray]

A tuple containing a list of coordinates, triangle idx and scalars

load_ablation(filepath_coord, filepath_time) staticmethod

Parse exported ablation data.

Parameters:

Name Type Description Default
filepath_coord str

Filepath to the ablation coordinates file.

required
filepath_time str

Filepath to the ablation timestamps file.

required

Returns:

Type Description
DataFrame

dataframe with coordinates and timestamps of ablation points.

load_car_file(filepath, columns=None) staticmethod

Load and parse CARTO _car file.

Parameters:

Name Type Description Default
filepath str

The path to the mesh file.

required

Returns:

Type Description
DataFrame

dataframe containing point and map data.

load_map(data, map_name) staticmethod

Load map data from xml. Measured points, ppi and scar.

load_meshfile(filepath) staticmethod

Load mesh data from a file into vertices and triangles.

Parameters:

Name Type Description Default
filepath str

The path to the mesh file.

required

Returns:

Name Type Description
tuple tuple[DataFrame, DataFrame]

A tuple containing two DataFrames: - vertices: Vertex data with coordinates, normals, and group IDs. - triangles: Triangle data with vertex indices, normals, and group IDs.

load_signal(filepath, gain=1, channels=None) staticmethod

Load signal electrograms of a single point.

Parameters:

Name Type Description Default
filepath str

Path of the file to parse.

required
gain float

Raw ECG to mV converting coefficient.

1
channels dict

Channels names and columns names.

None

Returns:

Type Description
DataFrame

pd.DataFrame[N, 5]: Unipolar, Bipolar, ECG, CS. Data is sourced from

DataFrame

specified reference channels in files header, if indicated.

load_signals(root, tag, idx, gain=1, channels=None) staticmethod

Load signals for all points in the id list

Parameters:

Name Type Description Default
root str

Root folder of the exported point signal files.

required
tag str

Map name of the point signal files.

required
idx list

List of points idx.

required
gain int

Raw ECG to mV converting coefficient. Defaults to 1.

1
channels dict

Channels names and columns names.

None

load_study_file(filepath) staticmethod

load_tag_info(data) staticmethod

Get tags name, color, etc.

Parameters:

Name Type Description Default
data dict

CARTO XML data.

required

Returns:

Type Description
DataFrame

pd.DataFrame: Tags name, color, etc.