CARTOreader - lite
This repository is an inofficial reader to easily process exported CARTO3 data in Python. It does not provide the more extensive capabilities to analyze the signals, such as OpenEP, but is rather meant as a simple reader to import CARTO data. The loaded time data is imported in pandas and the meshes in VTK provided through PyVista, allowing for easy access, export and interoperatibility with existing software.
Installation
To install cartoreader_lite, you have to clone the repository and install the libary using pip.
git clone https://github.com/thomgrand/cartoreader-lite
cd cartoreader-lite
pip install -e .
Usage
To test the library, you first need to get CARTO3 data. None is provided with this repository, but you can download the testing data provided by OpenEP to quickly try out the library (make sure the libary was installed first):
python tests/generate_test_data.py
from cartoreader_lite import CartoStudy
import pyvista as pv
import numpy as np
study_dir = "openep-testingdata/Carto/Export_Study-1-11_25_2021-15-01-32"
study_name = "Study 1 11_25_2021 15-01-32.xml"
study = CartoStudy(study_dir, study_name,
carto_map_kwargs={"discard_invalid_points": False} #All points of the example are outside the WOI, which would be by default discarded
)
ablation_points = pv.PolyData(np.stack(study.ablation_data.session_avg_data["pos"].to_numpy()))
ablation_points.point_data["RFIndex"] = study.ablation_data.session_avg_data["RFIndex"]
plotter = pv.Plotter()
plotter.add_mesh(ablation_points, cmap="jet")
plotter.add_mesh(study.maps[2].mesh)
plotter.show()
You should see the recorded map of the OpenEP example, together with its recorded points like below.
Documentation
Metadata
Release files for cartoreader-lite 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cartoreader-lite-1.0.1.tar.gz | 28.8 kB | Details |
Release files / cartoreader-lite-1.0.1.tar.gz
| Download URL | cartoreader-lite-1.0.1.tar.gz |
|---|---|
| Size | 28.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c4a408d7158659ca2038103024a1da2a9d0935f04d499a77e5c53e1cdb4b61f1
|
|
BLAKE2b-256 checksum How to use checksums |
379d757d40edec48efa93958fa9381ca0e70d2a25bd37e996d3486bc4eec866a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
|