Advertisement
Guest User

Untitled

a guest
Nov 21st, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. for line in input:
  2.     line1 = line.replace("\n","")
  3.     arr = line1.split('/')
  4.     _, fields = wfdb.rdsamp(arr[1], pb_dir='ptbdb/' + arr[0] + '/')
  5.     if 'Healthy control' in fields['comments'][4]:
  6.         list.append(1)
  7.         record_result.append(line)
  8.     if 'Myocardial infarction' in fields['comments'][4]:
  9.         if 'inferior' in fields['comments'][5]:
  10.             list.append(0)
  11.             record_result.append(line)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement