Skip to content

Multi-frequency data with wfdb.wrsamp #336

Closed

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])])

Activity

  1. bemoody commented on Mar 7, 2024

    @bemoody
    CollaboratorAuthor

    Related warts:

    • set_d_features(expanded=True, do_adc=True) is broken (it stores the data incorrectly in d_signal rather than e_d_signal)

    • adc(expanded=True) fails if n_sig is unset (it doesn't do that with expanded=False)

  2. bemoody commented on Nov 25, 2024

    @bemoody
    CollaboratorAuthor

    Fixed by pull #510.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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