Skip to content

Multi-frequency data with wfdb.wrsamp #336

Closed
@bemoody

Description

@bemoody

If you have some multi-frequency data and are trying to save it as a WFDB record, currently the only way to do so is to create a Record object and call Record.wrsamp. This is laborious and error-prone because of all the auxiliary fields that Record.wrsamp requires.

It'd be nice to be able to pass an e_d_signal or e_p_signal parameter to wfdb.wrsamp instead, e.g.:

wfdb.wrsamp(
    'example',
    fs=125,
    units=['mV', 'mmHg'],
    sig_name=['ECG', 'ABP'],
    samps_per_frame=[4, 1],
    e_p_signal=[
        numpy.array([0.282, 0.297, 0.304, 0.304,
                     0.311, 0.311, 0.333, 0.333]),
        numpy.array([70.093, 75.623])])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions