NeuralAnalysis / TrialData

Code base for the Matlab TrialData analysis library.
3 stars 4 forks source link

getMoveOnsetAndPeak is not agnostic to bin_size #10

Open raeedcho opened 4 years ago

raeedcho commented 4 years ago

Because it uses a differences in speed from bin to bin to find a movement onset, it's not agnostic to the bin size. For example, with smaller bins, ds should be smaller because of the smaller timestep, but min_ds doesn't reflect this reliance on timestep.

I think the fix is simply to replace the calls to diff with calls to gradient, but I'm not sure how that would change the rest of the code right now.