You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ann2rr filters intervals by length instead of by time in the record #617
The ann2rr docstring describes start_time and stop_time as "the time to start the intervals" and "the time to stop the intervals", in seconds. But they're compared with the length of each interval, not with its position in the record:
fromwfdbimportprocessinglen(processing.ann2rr("sample-data/100", "atr")) # 2274processing.ann2rr("sample-data/100", "atr", start_time=0.9) # 30 intervals, all longer than 0.9 sprocessing.ann2rr("sample-data/100", "atr", stop_time=0.5) # 2 intervals, both shorter than 0.5 s
So start_time=0.9 drops every interval shorter than 0.9 s, rather than the intervals before 0.9 s into the record.
The WFDB ann2rr program's -f and -t options select annotations by time in the record. ann2rr should probably do the same: keep the intervals that end between start_time and stop_time, measuring the first interval from start_time, as ann2rr -f does.
This is separate from #584, which changes which annotations are used but leaves this filtering unchanged.
Activity
Select ann2rr intervals by time in the record
Select ann2rr intervals by time in the record (MIT-LCP#622)