Skip to main content

Cartoreader-lite provides a simplified and easy low-level access to CARTO3 studies.

Project description

CARTOreader - lite

CI Tests codecov

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.

openep-example

Documentation

https://cartoreader-lite.readthedocs.io/en/latest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cartoreader-lite-1.0.1.tar.gz (28.8 kB view details)

Uploaded Source

File details

Details for the file cartoreader-lite-1.0.1.tar.gz.

File metadata

  • Download URL: cartoreader-lite-1.0.1.tar.gz
  • Upload date:
  • Size: 28.8 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for cartoreader-lite-1.0.1.tar.gz
Algorithm Hash digest
SHA256 c4a408d7158659ca2038103024a1da2a9d0935f04d499a77e5c53e1cdb4b61f1
MD5 efbd5c1fa3df86bbb726855b770f6779
BLAKE2b-256 379d757d40edec48efa93958fa9381ca0e70d2a25bd37e996d3486bc4eec866a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page