pyCEPS: A cross-platform Electroanatomic Mapping Data to Computational Model Conversion Platform for the Calibration of Digital Twin Models of Cardiac Electrophysiology

Background and Objective: Data from electro-anatomical mapping (EAM) systems are playing an increasingly important role in computational modeling studies for the patient-specific calibration of digital twin models. However, data exported from commercial EAM systems are challenging to access and parse. Converting to data formats that are easily amenable to be viewed and analyzed with commonly used cardiac simulation software tools such as openCARP remains challenging. We therefore developed an open-source platform, pyCEPS, for parsing and converting clinical EAM data conveniently to standard formats widely adopted within the cardiac modeling community. Methods and Results: pyCEPS is an open-source Python-based platform providing the following functions: (i) access and interrogate the EAM data exported from clinical mapping systems; (ii) efficient browsing of EAM data to preview mapping procedures, electrograms (EGMs), and electro-cardiograms (ECGs); (iii) conversion to modeling formats according to the openCARP standard, to be amenable to analysis with standard tools and advanced workflows as used for in silico EAM data. Documentation and training material to facilitate access to this complementary research tool for new users is provided. We describe the technological underpinnings and demonstrate the capabilities of pyCEPS first, and showcase its use in an exemplary modeling application where we use clinical imaging data to build a patient-specific anatomical model. Conclusion: With pyCEPS we offer an open-source framework for accessing EAM data, and converting these to cardiac modeling standard formats. pyCEPS provides the core functionality needed to integrate EAM data in cardiac modeling research. We detail how pyCEPS could be integrated into model calibration workflows facilitating the calibration of a computational model based on EAM data.


Introduction
Computational modeling and simulation of cardiac electrophysiology (CEP) has been playing a pivotal role in basic cardiology research [1] since decades as a unique approach for gaining insight into mechanisms to explain experimental and clinical observations.Significant advances in modeling and imaging technologies made over the past decade have rendered anatomically accurate and biophysically detailed in silico models of human CEP at the organ scale feasible.These models show high promise as a clinical research tool, for device and drug development [2], and even as a complementary clinical modality.
When used as a clinical modality, it could aide in diagnosis, therapy stratification, and planning in future precision cardiology [3].Of particular relevance for clinical therapy planning are CEP models that are calibrated to uniquely replicate like-for-like all available clinical observations for a given patient.Such high fidelity models -referred to as cardiac digital twins (CDTs) [3] -may offer predictive potential to be utilized to predetermine the prognosis of acute therapeutic responses.
A major challenge in using CDTs is the calibration of the model to observable clinical data of a given patient.Beyond the clinical standard 12-lead ECG, EAM data is the most routine and accurate data available of a patient's CEP.EAM data are always acquired during ablation procedures and, increasingly often, during other procedures such as device implants in therapies for example in conduction system pacing (CSP) [4].
While EAM data are abundantly available clinically, they are not easily accessible to be used for the calibration of CDTs for numerous reasons.In terms of data visualization, quick browsing and data previewing of EAM data requires access to clinical software that is, in general, not conveniently available within the wider cardiac modeling community.Immediate process-ing of EAM data with computational modeling tools is limited as data exported from EAM systems are stored in proprietary formats for which reading and parsing can be challenging and time-consuming to implement.Inherent problems with spatiotemporal registration between computational model and EAM data also pose an issue.
In this work we address these issues by introducing the Python-based software pyCEPS [5] providing the following functions: (i) access and interrogate the EAM data exported from EAM systems; (ii) efficient browsing of EAM data to preview mapping procedures, body surface ECG recordings, and intracardially recorded EGMs; (iii) conversion to modeling formats according to the openCARP standard, to be amenable to analysis with the same tools and processing workflows as used for in silico EAM data.One exemplary data set acquired with the Carto3 EAM system is provided for testing, along with documentation and training material to facilitate access to this complementary research tool for new users.We describe the technological underpinnings and demonstrate the capabilities of pyCEPS first, and showcase its integration in a simple exemplary modeling application where clinical imaging data is used to build a patient-specific anatomical model and inform the CEP of the model using pyCEPS converted EAM data.

Data Structure and Implementation
The pyCEPS software in its current implementation provides capabilities to access EAM data from Carto3 EAM systems, preview the entire range of available data types and export and convert these to standard formats used in the cardiac modeling community using the openCARP simulator and the carputils framework.The available data types include anatomical manifolds, measurement point clouds, EGM-derived parameter maps, and ECG and EGM data.The data is stored by EAM systems in proprietary data formats, which are read in by pyCEPS first, and are then saved to disk as single binary serialized object file ("pickling").A hierarchical data structure is used within py-CEPS (see Appendix A, Fig. Appendix A1) that mirrors the hierarchical structure of EAM data sets within Carto3.Namely, each exported data set from an EAM system represents a study, i.e. an interventional procedure.During each procedure, multiple mapping sequences are performed for example during sinus rhythm, pacing or an arrhythmia, or after ablation.Each map is then constructed from multiple EGM recordings at varying locations distributed over the region of interest.Locations at which radio-frequency ablation was performed and where the energy was delivered are recorded and stored.This information is combined with metrics quantifying the ablation performance.
The implementation of pyCEPS was developed based on Python 3 to ascertain usability on a broad range of compute platforms and to ease adoption among the target user groups, i.e. the computational modeling community.Routinely used functions to import, export and view data are accessible via a command line interface.The software basis of pyCEPS has been implemented from scratch, with a clearly defined application focus, to keep the code basis compact and, thus, to facilitate continuous development with limited resources.The pyCEPS software described here is made available under the GNU General Public License 3 (GPLv3).

Clinical Test Data
For developing and testing of pyCEPS, mapping data sets exported from a Carto3 EAM system were used.Typically, such data sets consist of a large number of files (10k+) that contain all information recorded during the mapping procedure.An XML file describing the overall study encodes the organization of data that is required for processing the data set (included maps, mapassociated data such as locations of recording sites, filenames of associated data, ...).All files associated with a study are exported by Carto3 as ZIP compressed archive.pyCEPS can import studies from extracted ZIP archives but also enables import directly from ZIP archives.
The Carto3 study chosen to showcase pyCEPS capabilities in this work stems from a patient suffering from recurrent ventricular tachycardia (VT) episodes who was treated by VT ablation at the University Hospital Graz, Graz, Austria.The exported ZIP archive had a size of ∼2 GB (unzipped archive ∼22 GB) and consisted of ∼36 000 files.Three mapping procedures were performed: one during sinus rhythm (2282 mapping points), one during VT (1728 mapping points), and, one after ablation (63 mapping points).To terminate VT 43 ablation sites were used.EAM data were acquired from patients included in the local ablation registry.This registry was approved by the ethics committee of the Medical University of Graz (reference number 31-036 ex 18/19).

Performance Benchmarking
To benchmark the performance of pyCEPS, two metrics were considered: (i) the time required to read clinical EAM data and convert it to the pyCEPS data structure, and, (ii) the file size of the generated serialized data representation.Both metrics were compared to the performance measured with openEP [6] implemented in MATLAB.Data from 21 Carto3 studies were exported in compressed ZIP format and read by pyCEPS directly from the ZIP archive.All mapping procedures with all recording points and ablation sites were automatically imported.The generated pyCEPS data structure was saved to a file, and file size was determined using Python 3 standard modules.Additionally the time required to convert the pyCEPS data structure in its entirety to openCARP compatible file formats, as described below in Sec.2.5, was measured.This metric also included the time taken to export 12-lead ECG data which is not part of the automatically generated pyCEPS data structure and, therefore, had to be additionally read from the clinical EAM data set.Performance benchmarks were carried out on a standard desktop PC (HP ProDesk, Intel i7-6700 @ 3.4 GHz, 32 GB RAM, 2 TB HDD storage) using Spyder IDE 5.4.3 and Python 3.8.10.

Data Browsing and Visualization
After importing EAM studies and creating pyCEPS data objects these can be conveniently visualized to quickly assess data quality and gain an overview of the procedure.Visualization was implemented in dash and dash_vtk which creates a local HTML page opened in the browser, thus, facilitating the platform-independent visualization of studies.The viewer offers browsing of all included mapping data: The acquired anatomical manifold can be visualized along with all recording points and/or ablation sites.Body surface ECG traces and intracardially recorded EGM traces for individual recording points are shown.EGM-derived surface parameter maps interpolated onto the anatomical manifold such as local activation time (LAT) and uni-or bipolar voltage maps are either shown as exported along with EAM data or parameters are interpolated onto the anatomical manifold using an inverse-distance-weighting algorithm to provide a spatial view.Body surface ECGs (Einthoven, Goldberger, Wilson) are recorded during the entire mapping procedure.Since mapping points are acquired sequentially the body surface ECGs associated to individual recording points vary, depending on the respective acquisition time the mapping point was recorded.To obtain body surface ECGs that are representative for an entire mapping procedure three methods were implemented.Method M1 calculates the median amplitude at each point of time, method M2 selects a recorded signal with the lowest mean-squared-error within a window-of-interest when compared to the median representation obtained by M1, and method M3 selects a recorded signal with the highest crosscorrelation within a window-of-interest compared to the median representation obtained by M1.

Data Conversion to openCARP Modeling Formats
While clinically acquired mapping data (location of recording points, triangulated meshes representing anatomical manifolds, multi-channel time signals, etc.) are structurally similar to simulated data (nodes, meshes, spatio-temporal signals) they are stored in proprietary file formats that are optimized for analysis and display with commercial EAM systems, but are incompatible with commonly used cardiac simulation or visualization software such as openCARP or ParaView.Therefore, to use clinical EAM data in modeling applications two key issues have to be addressed: (i) data must be converted to data formats that are compatible with tools used in simulation workflows; and, (ii) spatio-temporal registration of EAM data with computational anatomies and simulated data is required.pyCEPS addresses the first issue by offering convenient support for format conversion.Either, individual subsets of data can be selected to be read and converted, or, all contained data are imported, and exploded into a set of files that are readable using openCARP tools.Converted data are stored and presented by pyCEPS in a systematic and coherent manner, ensuring easy comprehension and accessibility (see Fig. Appendix B1).
For each mapping procedure, pyCEPS reads and converts the following types of data, using labels in the filename to indicate the data type: - Data corresponding to recording points can be viewed on a point cloud representing the actual recording sites (*.pc.pts), or on a projected point cloud where each recording location is projected onto the closest position at the anatomical manifold (*.ppc.pts).Such data is indicated in the pyCEPS export with the suffix *.pc.*.Note, that pyCEPS, by default, only exports valid data points, i.e. data points for which the EAM system deemed the recording site to be in sufficiently close vicinity to the anatomical manifold, and where the recording position was stable over the recording time window.

Computational Model Building
The use of pyCEPS is demonstrated in an exemplary modeling workflow.A patient suffering from recurrent VT episodes was treated by VT ablation at the University Hospital Graz, Graz, Austria.Prior to the ablation procedure, contrast CT and late gadolinium enhanced (LGE) MRI data were acquired, and during VT ablation therapy comprehensive EAM data were recorded.A previously developed image-to-anatomical model generation workflow was used to build an anatomically accurate model of the patient's heart and torso [8].Image segmentation of the contrast CT was obtained using the deep learning-based Spatial-Configuration Net (SCN) [9,10], which was trained on an in-house dataset.Before being processed by the SCN, the original resolution of the contrast CT (0.39 mm in-plane, 0.7 mm out-of-plane) was resampled to an isotropic resolution of 1.5 mm due to memory constraints during training.The obtained segmentation was resampled to the original resolution and verified by an expert.A volumetric biventricular mesh [11] of the segmented CT images along with rule-based ventricular fiber arrangements [12] and universal ventricular coordinates [13] was generated then using CARPentry Studio (NumeriCor GmbH, Graz, Austria) at an average resolution of 1 mm which is suitable for fast simulations using a reaction-eikonal electrophysiology model [14].

EAM Data Integration with Computational Model
EAM data recorded during an intervention and the computational anatomical model built from imaging data are defined in two different reference coordinate systems.Integration of EAM data with a computational model requires therefore (i) a spatial transformation such that measured and simulated data live in the same space, and a spatial correlation between measured and simulated data points can be established, and, (ii) a transfer operator must be defined for projecting measured data onto a region of interest of the model, and vice versa.Spatial registration can be rigid, keeping the spatial relation between recording locations fixed, or non-rigid, where spatial relation may be altered to some extent, to obtain a better overlap between measurements at a point cloud with the computational model.For the sake of this study, we opted for a rigid affine transformation, M ∈ R 4×4 , to register the anatomical manifold with the left ventricular endocardium.The same transformation M is applied then to all point data in the data set.Shepard's interpolation method [15] was used to transfer data measured on the recording point cloud onto the anatomical manifold, and onto the matching endocardial manifold of the computational model.Local minima of the LAT map were identified and used as earliest activation sites to compute an activation sequence using a reaction-eikonal model of ventricular electrophysiology [14].A lead field approach was used to compute EGMs at selected recording sites.

Results
pyCEPS provides a command line interface for most commonly used functions.In the following sections the commands used are given in verbatim.For detailed usage and examples see the project homepage on PyPI or the software repository on GitHub.

Data Parsing
An overview of the pyCEPS architecture is shown in Fig. 1. pyCEPS can import studies from extracted ZIP archives but also enables import directly from ZIP archives to avoid the cumbersome and disk space consuming task of extracting data first.Importing EAM data starts by specifying the clinical system (--system) and the location of the EAM data set (--study-repository). For Carto3 studies pyCEPS automatically locates the XML file describing the study and lists all available mapping procedures within the study.A particular or all available mapping procedures can subsequently be imported (--import-map).Importing of all relevant data is automated and a pyCEPS data structure is created which can be saved (--save-study) as binary serialized object file.Previously generated serialized objects files can be loaded by pyCEPS (--pkl-file) and additional data can be imported and added at later time.

Performance Benchmark
The data set for performance benchmarking comprised 21 Carto3 studies with 3771 ± 2475 recording points per mapping procedure (range 62-8854).The exported ZIP archives from the EAM system had a size of 1.73 ± 1.05 GB.Data import took 101.0 ± 63.7 s.Import time was increasing with number of recording points with a linear regression slope of 84 ms/point (Fig. 2A).This is approximately by a factor 5 faster than other available tools like the MATLAB-based openEP [6].The generated serialized data objects had a size of 149.8 ± 96.4 MB which was significantly smaller than the exported data from the EAM system.Data size was reduced approximately by a factor of 12 (Fig. 2B).Exporting data to openCARP compatible formats took 45.8 ± 32.2 s.Export timings also include loading additional ECG data per recording point which is not included during standard import of data sets (Fig. 2C).All values are given as median ± median absolute deviation (MAD).

Data Browsing and Visualization
After selecting a pyCEPS serialized data object for visualization with pyceps --system 'carto' \ --pkl-file 'PATH/TO/STUDY.PKL' \ --visualize the user can browse all mapping procedures included in the data object.Capabilities for quick browsing of EAM data are illustrated in Fig. 3.The user can visualize the electro-anatomical manifold approximating the chamber geometry along with recorded EGM and ECG data, interpolated surface parameter maps, and ablation site data.All included mapping procedures in the pyCEPS data object are listed and can be selected (Fig. 3D).The chamber geometry for the selected mapping procedure is shown (Fig. 3A) and voltage and activation maps to be shown on the chamber geometry can be selected and customized (Fig. 3E).Locations where EGM data was recorded can be shown either at their actual recording position or projected onto the closest point on the high-resolution chamber geometry (Fig. 3F).Recording points (blue dots in Fig. 3A) can be selected by the user to visualize recorded EGM time traces for the selected recording site (Fig. 3B).Ablation lesions can be added and are shown with a color-coded ablation index (Fig. 3G).
For each mapping procedure consisting of sequentially recorded points, representative body surface ECG traces are shown (Fig. 3C) that were determined in three different ways as described in Sec.2.4.Note that the "median method" M1 yields an artificial signal while both other methods yield an actually recorded (real) signal that best matches the artificial median signal.The resulting representative ECG traces are illustrated in Fig. 4 for the Einthoven I lead.

Data Conversion to openCARP Modeling Format
After importing EAM data and saving a serialized data structure (see Sec. 3.1), the data structure can be converted to openCARP compatible data formats.The name of a mapping procedure is given (--map) followed by a list of data items to convert by specifying the parameters: These parameters obtain EGMs, ECGs (recorded during point acquisition), EGM-derived parameters, interpolated surface maps, body surface ECGs (representative for the mapping procedure), ablation sites, and anatomical geometries, respectively, when called individually.Example usage would therefore be pyceps --system 'carto' --pkl-file 'PATH/TO/STUDY.PKL' \ --map 'MAP_NAME' \ --dump-mesh For convenience, the function --convert is available, which imports a complete EAM data set and exports all of the above mentioned data items automatically.The standard workflow to import, visualize, and convert data from a Carto3 EAM system is shown in Fig. 5 and would be executed on the console with pyceps --system 'carto' \ --pkl-file 'PATH/TO/STUDY.PKL' \ --convert \ --visualize \ --save-study \ All converted data pertaining to a mapping procedure are stored in sub-directories named after the mapping procedure.Each converted dataset includes then: (i) a triangulated anatomical shell acquired initially during the procedure, (ii) unipolar and bipolar voltage maps and local activation time maps, (iii) unipolar, bipolar and reference electrograms, (iv) a 12-lead electrocardiogram, and, (v) location of ablation sites.The directory tree of a converted mapping procedure is showcased in Fig. Appendix B1.

Integrating EAM data with a computational modeling workflow
The integration of pyCEPS in a representative modeling workflow (see Figs. 6 and 7) is showcased in an exemplary study of building a computational model of an ischemic cardiomyopathy patient treated by VT ablation therapy.The tomographic image  stack was used as a spatial reference for generating the model.After automated segmentation of both ventricles [10], a computational biventricular mesh was generated at a target resolution of 1.2 mm [11,8], and equipped with rule-based fibers [12] and an anatomical reference frame [13].All recorded EAM data comprising two mapping procedures (under normal sinus rhythm and during ongoing VT) were converted to openCARP modeling formats using pyCEPS.The EAM anatomical shell in model format was registered to the left ventricular endocardial surface of the 3D volumetric model, defined as a subset of the full 3D volumetric biventricular mesh, in the image space using an affine transform, M ∈ R 4×4 , which was defined interactively using CARPentry Studio (Numericor GmbH, Graz, Austria) (see Fig. 6).The resulting transformation M was stored and applied to all point clouds in the EAM data set to preserve spatial relation with the recorded anatomical shell.
The EGM-derived surface parameter maps of LAT,  (x r ), unipolar and bipolar voltage magnitudes, (x r ) and Δ(x r ), represented by the nodal data vectors, y mT , y m and y mΔ , were then interpolated onto mesh points of the corresponding endocardial surface, Ω lvendo to obtain the maps  (x s ), (x s ), Δ(x s ), with x r defined on the recorded anatomical manifold and x s defined on the computational mesh respectively.The interpolation operator, I : Ω  → Ω lvendo , was built based on Shepard's interpolation method [15].Thus, the measured data vector of each map, y m , is represented on the endocardial surface of the reference computational mesh by y me = Iy m .These maps defined on Ω lvendo are related to the 3D volumetric mesh  Ω biv by the restriction operator, R : Ω biv → Ω lvendo , which restricts simulated data defined on the entire computational domain, Ω biv , to the endocardial manifold, Ω lvendo .Thus, simulated data on the reference domain Ω lvendo are found by y se = Ry s , or measured data are on Ω lvendo inserted into Ω biv by the injection y s = R ⊤ y se .The surface Ω lvendo serves now as a common reference for comparing data simulated over Ω biv with data measured on Ω m where the difference between measured and simulated data can be expressed now as With all inter-grid transfer operators in place, the LAT map y mT =  (x r ) is transferred to the computational mesh Ω biv by ( ⊤ • I)y m with ( ⊤ • I) : Ω m → Ω biv , and local minima of the LAT map are used as boundary values for a reactioneikonal model [14] to drive a biventricular activation sequence.EGMs in the blood pool of the left ventricle were computed using a lead-field approach [16].The differences in endocardial activation sequences and in EGMs are illustrated in Fig. 7.This constitutes only a first step of model calibration problem where model parameters  must be inferred by minimizing the loss L ().

Discussion
The use of clinical EAM data in computational modeling studies relies on the ability to read and browse the proprietary datasets produced by clinical EAM systems, and to register these datasets with a computational model, to facilitate a comparison between clinical observations and computed model predictions.
In this study we report on a new software for these tasks.Our implementation of pyCEPS supports reading and parsing EAM data sets as generated by two widely used clinical EAM systems, Carto3 (Biosense Webster) and enSite Precision (Abbott).Basic visualization capabilities using a standard web browser are built in to allow for a quick review and inspection of clinical data sets.The main functionality of pyCEPS is the conversion from proprietary EAM data formats to standard modeling data formats as used within the openCARP community, to facilitate a seamless integration within standard processing workflows used in the computational modeling domains.pyCEPS is implemented in Python 3, the most widely used language in the cardiac modeling community for data analysis, and is available in source code under an open-source license (GPLv3), along with basic documentation and one example data set.Current functionality of pyCEPS is restricted on data format conversion.However, being implemented in Python 3, pyCEPS is readily extensible to be used for data analysis in both modeling and clinical research using EAM data.We demonstrate the use of pyCEPS in one simple exemplary application of the software where we showcase the integration of pyCEPS in a clinical modeling workflow for modeling an ischemic cardiomyopathy patient undergoing VT ablation.

Related software
Reading and viewing clinical EAM data sets relies mostly on commercial software provided by the vendors of clinical EAM systems, which is not readily available outside of clinical cardiology departments.Clinical research on EAM data cannot be carried out within these closed EAM software ecosystem, but is supported by options to export data in various formats.In clinical research carried out by cardiology fellows simpler formats readily accessible to be read and analyzed with MATLAB are preferred.Research software supporting the systematic processing of entire EAM datasets is scarce.A notable exception is the software openEP [6] which fills this gap.openEP targets clinical research on EAM data analysis, and is implemented in MATLAB as the most common data analysis software used in the clinical research domain.Specifically, openEP also offers capabilities for reading and parsing of clinical EAM data sets, it implements advanced data analysis algorithms, and supports a range of visualization techniques.However, in contrast to pyCEPS, openEP is clearly more geared towards clinical users with interest in advanced data analysis of clinical data, and not for computational modeling communities mainly interested in making clinical data sets accessible in modeling applications.The main focus of pyCEPS is the conversion of data into formats that are accessible with the many advanced data processing tools developed within the modeling communities for analyzing simulated data.Specifically, pyCEPS converts EAM data seamlessly to openCARP formats that are compatible with the various workflows implemented in the openCARP modeling ecosystem.Further, pyCEPS is written in Python 3 which is much more widely used and adopted in the cardiac modeling community whereas openEP is implemented in MATLAB which might be more convenient to use in clinical research but is not free of charge.In principle, both approaches pyCEPS and openEP can be used interchangeably, with openEP offering additional EAM analysis methods such as more advanced data interpolation and analysis techniques, while pyCEPS is more tailored for being integrated in a modeling workflow.However, as many data analysis algorithms for EAM data sets have been developed in Python [17,18] these are straight forward to integrate in pyCEPS to expand the data analysis capabilities.

Limitations
In its current implementation pyCEPS best supports the handling of EAM data acquired with Carto3 systems, as the vast majority of data sets used for testing were acquired with this system.Our access to Abbott enSite Precision data was rather limited.As such pyCEPS for enSite Precision was tested only with two small data sets.Thus, not all features could be fully implemented and extensively tested.Advanced data analysis tools for EAM data as used in clinical research are missing.

Conclusion
With pyCEPS we offer an open-source framework for parsing and viewing of EAM data, and converting these to cardiac modeling standard formats as used within the openCARP community.Thus, pyCEPS provides the core functionality needed to integrate EAM data in cardiac modeling research, by comparing clinical observations to model predictions.Advanced EAM data analysis tools such as the regularization of LAT maps [17], the computation of conduction velocity maps [19], rotor [20] or dominant frequency analysis [21], or the inference of fiber architecture [18] are missing.However, pyCEPS is implemented in Python 3 which is most widely used in the cardiac modeling community, and therefore readily facilitates the extension of pyCEPS with more advanced EAM data analysis tools.

Figure 1 :
Figure 1: pyCEPS overview: pyCEPS is used to parse and translate data exported from clinical EAM systems, quickly browse cases, and export data to openCARP compatible file formats, or other common formats used in the cardiac modeling community.

Figure 2 :
Figure 2: Performance benchmark: (A) Import time is increasing with number of recording points (≈84 ms/point).(B) Storage size of serialized data objects as a function of the original exported EAM data.Disk space required was by a factor ≈12 smaller than the exported raw data.(C) Exporting serialized data objects to openCARP compatible formats is increasing with the number of recording points (≈38 ms/point).These export timings include the loading of additional ECG data per recording point.

Figure 3 :
Figure 3: Data browsing capabilities of pyCEPS: (A) Shown are the anatomical manifold model acquired before the procedure, the electrode positions at which EGMs were recorded (blue dots), and a color coded parameter map interpolated from sparse discrete recording sites upon the anatomical manifold.(B) For a user selected recording site unipolar and bipolar EGMs are shown.(C) Representative 12-lead body surface ECGs for the mapping procedure are shown.(D) Selection of mapping procedure.(E) Selection and adjustment of surface parameter maps.(F) Toggling and adjustment of recording points features.(G) Toggling and adjustment of ablation site features.

Figure 4 :
Figure 4: Representative body surface ECGs: Three methods to obtain representative body surface ECGs on the example of Einthoven I are shown.Gray traces represent the bundle of ECGs that were recorded for each measurement point during sequential EGM acquisition.Black traces are the representative ECGs for the given mapping procedure.(M1) Median value at each point of time.(M2) Recorded signal with lowest mean-square-error.(M3) Recorded signal with highest cross-correlation.Note that method M1 yields an artificial signal while methods M2 and M3 yield a signal that was actually recorded (see trace in M1 over the time window 0 ms-1500 ms).The window-of-interest used for methods M2 and M3 is highlighted for all methods.

Figure 5 :
Figure 5: Data Conversion: Workflow for exporting EAM data using pyCEPS.EAM data are exported as ZIP archives and converted to a serialized data structure (.pkl file).pyCEPS is used for previewing data in the converted study, and for exporting data to standard formats used in the cardiac modeling community.These include openCARP formatted surface meshes representing the anatomical mapping manifold, recorded and projected point clouds with recorded EGMs and derived parameters (LAT, uni-and bipolar voltage magnitudes), interpolations of the point cloud data onto the anatomical manifold, and body surface ECGs.

Figure 6 :
Figure 6: Model generation and alignment: Image segmentation of the contrast CT was obtained using a deep learning-based SCN.A 3D finite element model of the ventricles was generated within CARPentry Studio.An affine transformation to align the anatomical manifold to the left ventricular cavity of the 3D mesh was identified manually and stored for registering available Carto3 output into the spatial coordinates system of the image stack.

Figure 7 :
Figure 7: Mapping and interpolation:The maps of LAT, , unipolar and bipolar voltage magnitudes,  and Δ, are interpolated from the EAM manifold Ω m onto mesh points of the corresponding endocardial surface Ω lvendo using an interpolation operator, I, based on Shephard's method.Maps defined on Ω lvendo are related to the 3D volumetric mesh Ω biv by the restriction operator R. Thus, surface Ω lvendo serves as a common reference for comparing data simulated over Ω biv , where the difference between measured and simulated data can be expressed as a loss function L ( ).