NeuralAnalysis / PyalData

Repository for the Python implementation of the TrialData analysis library.
GNU General Public License v3.0
7 stars 9 forks source link

Add option to specify backend for smoothing #130

Closed raeedcho closed 2 years ago

raeedcho commented 2 years ago

Referencing https://github.com/NeuralAnalysis/PyalData/issues/118, where I found that the new smoothing function was significantly slower on my data than the old function.

I've added back some of the old code to specify a backend for smoothing data, but I've left the default backend as is, so it shouldn't break anyone's code.

For reference, I'm not sure why, but implementing this change gave me almost a 6x speedup (see screengrab below)

image

P.S. Apologies for the dirty commit history in this PR--I'm not sure why, but I had to pull down the pull request I submitted last time as well, and there were some unfortunate merges instead of rebases.

bagibence commented 2 years ago

Sorry for the huge delay. It looks good to me, I just quickly touched up a few things. Thank you!

Fixes #118

(One point of change is that in trials_are_same_length now we only check the ref_field instead of all time-varying fields. Ideally it shouldn't be a problem, but I just wanted to leave this comment just in case.)