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
So far, the time vector can only be created for certain sampling frequencies. This is fine for the ActiGraph data, but a more generic solution would be nice.
If someone wants to fix this problem, feel free to open a pull request. For the time being, I will add a NotImplementedError to paat.io._create_time_array() and paat.io._create_time_vector(), which will refer to this issue.
The text was updated successfully, but these errors were encountered:
The functions now raise NotImplementedError when the second can not be divided by the sampling rate without a remainder. However, it is questionable whether it wouldn't be easier to just round on millisecond level precision.
One way might be to follow this line of thinking:
importnumpyasnpstart=1619568000000# np.asarray(np.datetime64('today'), dtype="datetime64[ms]").astype(int)hz=33n_samples=hz*60# round step sizetime_data=np.asarray(np.arange(start, start+n_samples*hz, 1e3//hz), dtype='datetime64[ms]')
# round when converting to datetime64time_data=np.asarray(np.arange(start, start+n_samples*hz, 1e3/hz), dtype='datetime64[ms]')
However, I did not test that and just leave it here for later use as this issue does not have a high priority currently
So far, the time vector can only be created for certain sampling frequencies. This is fine for the ActiGraph data, but a more generic solution would be nice.
If someone wants to fix this problem, feel free to open a pull request. For the time being, I will add a
NotImplementedError
topaat.io._create_time_array()
andpaat.io._create_time_vector()
, which will refer to this issue.The text was updated successfully, but these errors were encountered: