Skip to main content

Convert GE MUSE ECG XML exports to CSV format

Project description

muse2csv

Convert GE MUSE XML ECG exports to CSV format

muse2csv is a lightweight Python library that converts ECG data exported from the GE MUSE Resting ECG System (in XML format) into CSV (Comma Separated Values) format, compatible with Excel or similar tools and many programming languages.

Installation

Install directly from PyPI:

pip install muse2csv

Or install locally from source:

git clone https://github.com/nagyl1999/muse2csv.git
cd muse2csv
pip install .

Usage

An example is provided in the examples folder.

from muse2csv.converter import muse_to_csv
import pandas as pd
import matplotlib.pyplot as plt

muse_export = "examples/anonim_pac_xml_export.txt"
wfdb_filename = "patient001_ecg"

lead_names = ['I', 'II', 'III', 'aVR', 'aVL', 'aVF', 'V1', 'V2', 'V3', 'V4', 'V5', 'V6']

muse_to_csv(muse_export, wfdb_filename)

df = pd.read_csv(f'{wfdb_filename}.csv', sep=';')

df[lead_names].plot(subplots=True, figsize=(12, 8), sharex=True, legend=False)

annotations = df[df['QRS'] != '.']

plt.gcf().axes[0].scatter(
    annotations['Time'].index,
    annotations['I'].values,
    color='red',
    marker='*',
    zorder=5
)

plt.show()

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

muse2csv-1.0.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

muse2csv-1.0.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file muse2csv-1.0.0.tar.gz.

File metadata

  • Download URL: muse2csv-1.0.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for muse2csv-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ed22b543e7d705397fccbb954955dab4c41af55fc73f34a6f0e99513135cdf9d
MD5 8755c55edbf22ae832de78331aa5f84b
BLAKE2b-256 640a6c83a487d3bb0b6c0ee1347c35a3c2635eb6d8884c946f32bc9d51636e1b

See more details on using hashes here.

File details

Details for the file muse2csv-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: muse2csv-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for muse2csv-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f0f328975e8b4629124a69782de840f53ab25b6a53afbf2e31bf3843a718bc4b
MD5 1c361278ec9b0bea4987c20293dc33bb
BLAKE2b-256 4d8a52d669eac16d096a88dca90b41a75d74224df4c596455a501a25eb96e1e8

See more details on using hashes here.

Supported by

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