baccuslab / pyret

Python tools for analysis of neurophysiology data
https://pyret.readthedocs.io/en/master/
MIT License
35 stars 8 forks source link

problems with binspikes and estfr #21

Closed nirum closed 10 years ago

nirum commented 10 years ago
nirum commented 10 years ago

There are still problems with estfr-

the scipy.signal filter functions (lfilter and filtfilt) take in arguments given as coefficients in the numerator / denominator of a filter specification. Currently, only the gaussian profile is passed as an argument, which means filtering is not happening correctly?

I could be wrong, but I think we should go back to the way I was doing things before with creating a butterworth filter and using filtfilt or sticking with a gaussian but then using convolution.

documentation on filtfilt: http://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.filtfilt.html

nirum commented 10 years ago

I went a bit further - and made sure that the array that is returned from the convolution is aligned to the original bspk array. That way peaks in bspk and the estimated firing rate are aligned.