AllenInstitute / mindscope_utilities

Utilities for loading, manipulating and visualizing data from the Allen Institute Mindscope program
Other
2 stars 1 forks source link

update time array method to ensure desired frequency #25

Closed dougollerenshaw closed 3 years ago

dougollerenshaw commented 3 years ago

Updates the time array calculation method in event_triggered_response to ensure that the desired sampling frequency is maintained even if the desired time range isn't evenly divisible by the resulting timestep.

For example, if you want a time range from 0 to 0.75 seconds at 30Hz, this new method would round your actual endpoint down to 0.7333 ms to ensure that you have even timesteps that are 33ms long.

Closes #23

yavorska-iryna commented 3 years ago

I have minor comment about t_before, but I think it can be addressed with a different commit/PR

dougollerenshaw commented 3 years ago

I have minor comment about t_before, but I think it can be addressed with a different commit/PR

Thanks for logging this as #26. Let's discuss there and open a separate PR to deal with that after we have consensus.