Open muschellij2 opened 8 months ago
Good observation. This function was originally designed to work with GGIR, which resamples the data to 15 Hertz following the instruction given by Verisense_step_algorithm/myscript.R.
So, to make this more obvious it may be good to:
# hard-coded because algorithm assumes 15 Hertz input data
input_data
and include a statement that this is expected to be 15 Hertz.
In case others find this as I did, the sample rate is assumed/fixed at 15Hz: https://github.com/ShimmerEngineering/Verisense-Toolbox/blob/dc18f762410abb6f347a8612c1351b28aed3d180/Verisense_step_algorithm/verisense_count_steps.R#L10
This is crucial given that the parameters for the algorithm are set to values in terms of seconds/samples so that these mean quite different things if the sample rate is not 15Hz.
We have implemented this algorithm with an argument to sample to 15Hz or keep on the original data: https://github.com/muschellij2/walking/blob/483851b3f3efb252927ea62ce55fcbdb35c549db/R/api.R#L34