Skip to content

Parse Rhythmia metadata

Full example code: examples/parser/rhythmia_metadata.py

An overview of metadata present in the matlab file. You can pass keys you want to retrieve as a keyword argument. By default, it tries to retrieve the following fields (not all might be present, depending on the export):

  • study
  • mapName
  • date
  • mapStartTime
  • chamber
  • rhythm
  • mappingCatheters
  • sampleFrequency_Hz
  • projectionDistance_mm
from dgmr.parser import RhythmiaReader

mat_file = "path_to_your_matlab_file"
data = RhythmiaReader.load_mat_file(matfile)

metadata = RhythmiaReader.load_metadata(data)

print(metadata)

Output: dictionary with key, value pairs of metadata. A warning is printed for keys not found in the data.

WARNING:root:Key not found mapStartTime
WARNING:root:Key not found mappingCatheters
WARNING:root:Key not found sampleFrequency_Hz
WARNING:root:Key not found projectionDistance_mm
{
    'study': 'Study 2022-04-14 07:57',
    'mapName': '4 LA 260',
    'date': '2022/04/14',
    'chamber': 'LA',
    'rhythm': 'Macro Reentrant'
}