MIT-LCP / MIT-LCP/wfdb-python

Convert the dataset in hdf5 format to hea format

Open
#462 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
853
Forks
322
PR merge metrics
No merged PRs in 30d

Description

Hi,
I want to convert the ECG dataset, code 15% into hea format:

wfdb.wrsamp(record_name=filename, fs=fs,
                units=['mV', 'mV', 'mV', 'mV', 'mV', 'mV', 'mV', 'mV', 'mV', 'mV', 'mV', 'mV'],
                sig_name=['I', 'II', 'III', 'aVR', 'aVL', 'aVF', 'V1', 'V2', 'V3', 'V4', 'V5', 'V6'], p_signal=data,
                write_dir=write_dir)

But, the dtype of data ndarray: {4096, 12} in code 15% is float32 and raise IndexError:
IndexError: Channel 1 contain values outside allowed range [-2147483648, 2147483647] for fmt 32.

What should I do for the error?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported wfdb.wrsamp call with the 4096×12 float32 ndarray from code 15% and inspect how its values are validated for format 32. Determine whether the behavior is an input-conversion issue or a library bug; done means the dataset can be written to hea format without the reported IndexError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.