buzsakilab / buzcode

Code for internal lab sharing - polishing has started but is by no means complete
http://www.buzsakilab.com/
GNU General Public License v3.0
119 stars 128 forks source link

bz_wavespec breaks backwards compatibility #233

Closed DavidTingley closed 6 years ago

DavidTingley commented 6 years ago

input as Tx1 time series no longer works.

line 163 wavespec.channels = lfp.channels;

fixed in dev branch, 00d255a66cd14ae925dc4664156bb7ce4d53117c

we should keep this open until we PR dev->master

brendonw1 commented 6 years ago

Sorry about this, it may be my fault (?). But you fixed it right? Thank you

DavidTingley commented 6 years ago

One more thing, more of a discussion point. Should 1250 be the default frequency if it is not provided? It has been in the past, but now bz_wavespec assigns an empty ([]) and fails if samplingRate isn't given.

Pro: this ensures people don't make mistakes Con: hard coding this every time is painful, especially given that 99% of usage is with 1250Hz LFP data.

What do you guys think? @raswanson @dlevenstein @brendonw1 @AntonioFR8

brendonw1 commented 6 years ago

Hm... I guess it is important to keep this backwards compatibility - so people can use it as a general wavelet tool regardless of what data they give it.
I think if someone is using it that way and I had to have a defualt I'd make the default sampfreq = 1. I realize in one way it's weird and definitely might be the wrong choice. In the end though I think I'd insist on their entering a sampfreq if they just enter a vector.