roaldarbol / animovement

An R toolbox for analysing animal movement across space and time
http://www.roald-arboel.com/animovement/
Other
4 stars 0 forks source link

Mouse sampling rate #1

Closed cauli-22 closed 1 week ago

cauli-22 commented 6 months ago

The actual sampling rate might be ~60 fps instead of 125, this is because the Arduino code recording X and Y displacement is set to 60 (see https://github.com/Sussex-Neuroscience/NL-glow-worm/blob/main/README.md) . Not sure if this is inherent to arduino or the way we coded the mouse controller (https://github.com/Sussex-Neuroscience/NL-glow-worm/blob/main/software/MouseController_1.ino)

roaldarbol commented 1 week ago

Done! With the new updates (currently on the dev branch), the sampling_rate doesn't actually have to match the actual sampling rate. Because the sampling is uneven between the two sensors, In the new implementation, the sampling_rate is rather used to create bins where all observations are taken together. E.g. if 1(Hz) is chosen, the aligned data will be broken up into 1s bins, and all the observations within each bin are added together. :-)