voytekresearch / pacpy

Calculate phase-amplitude coupling in Python (and Matlab).
MIT License
24 stars 12 forks source link

why use fasthilbert? #34

Closed choldgraf closed 8 years ago

choldgraf commented 8 years ago

Just wondering why you guys have a util function fasthilbert. I get that you want to force the signal to be 2**N in length, but isn't that what the N parameter is for in the call to scipy.signal.hilbert?

srcole commented 8 years ago

That probably should be taken out.

When first running PAC analysis on my data, I noticed that the hilbert function would take 10x-1000x longer to run if the length of the array was some sub-optimal number. So I applied this function instead.

But that's irrelevant, so we'll take that out.

choldgraf commented 8 years ago

ya, for sure that's true (the day I realized that was after 2 weeks of my code taking hours to finish...I was so happy). Just saying that I think it's doable with an argument to hilbert, no need to reinvent the wheel :)

choldgraf commented 8 years ago

Bored in a lab meeting and trying to clean out my open issues, so here is #35. I just removed the whole utils.py module because there isn't anything else in it...I assume it'll get added back in at some point but I didn't see the point in including an empty file

choldgraf commented 8 years ago

my OCD thanks you ;)