Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# -*- 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