# create a signal
## create fake data
x = np.arange(100)
idx = np.arange(100)
idx[-1] = 125
## set the sampling frequency
fsamp = 100 # Hz
## set the starting time
tstart = 100 # s
## create the Evenly signal
s_fake = UnevenlySignal(values = x, sampling_freq = fsamp, signal_nature = 'fake', start_time = tstart, x_values = idx, x_type = 'indices')
Should create Unevenly signal starting from 100
Returns:
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-42-30498dfacc96> in <module>()
14 ## create the Evenly signal
15 s_fake = UnevenlySignal(values = x, sampling_freq = fsamp, signal_nature = 'fake', start_time = tstart,
---> 16 x_values = idx, x_type = 'indices')
/home/andrea/Trento/CODICE/workspaces/pyHRV/pyHRV/pyphysio/Signal.pyc in __new__(cls, values, sampling_freq, signal_nature, start_time, x_values, x_type)
301 start_time = 0
302 else:
--> 303 assert start_time < x_values[1] / sampling_freq, "More than one sample at or before start_time"
304 else:
305 if start_time is None:
AssertionError: More than one sample at or before start_time
Should create Unevenly signal starting from 100 Returns: