Closed andbiz closed 7 years ago
Unexpected behaviour when using LabelSegments. See code below:
from __future__ import division import numpy as np import pandas as pd import os import pyphysio as ph import matplotlib.pyplot as plt #%% ecg = ph.EvenlySignal(ph.TestData.ecg(), 2048) ibi = ph.BeatFromECG()(ecg) labels = np.zeros(len(ecg)) labels[61440:122880] = 1 labels[184320:] = 2 labels = ph.EvenlySignal(labels, 2048) #%% windows = ph.LabelSegments(labels=labels) indicators_td, col_names_td = ph.fmap(windows, ph.preset_hrv_td(prefix=''), ibi) indicators_fd, col_names_fd = ph.fmap(windows, ph.preset_hrv_fd(prefix=''), ibi.to_evenly().resample(4)) print(indicators_td[:,2]) print(indicators_fd[:,2])
It works with drop_cut = False. Closed
Unexpected behaviour when using LabelSegments. See code below: