How to use the wfdb.get_record_list function in wfdb

To help you get started, we’ve selected a few wfdb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JohnDoenut / biopeaks / benchmark_resp.py View on Github external
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 27 14:24:54 2019

@author: John Doe
"""

import wfdb
from wfdb import processing
import matplotlib.pyplot as plt
import numpy as np
from resp_offline import extrema_signal

records = wfdb.get_record_list('bidmc', records='all')
sensitivity1 = []
sensitivity2 = []
precision1 = []
precision2 = []

for record in records:

    print('processing record {}'.format(record))

    data = wfdb.rdrecord(record, pb_dir='bidmc')
    annotation = wfdb.rdann(record, pb_dir='bidmc', extension='breath')

    sfreq = data.fs
    resp_chan = data.sig_name.index('RESP,')
    resp = data.p_signal[:, resp_chan]
    annotators = annotation.aux_note

wfdb

The WFDB Python package: tools for reading, writing, and processing physiologic signals and annotations.

MIT
Latest version published 2 years ago

Package Health Score

58 / 100
Full package analysis

Similar packages