-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange spectrum results from sim_knee? #337
Comments
The scripts I used for simulating my signals looks like this. I'm making a lot of small sections that I merge together in a later step. If I try to simulate an hour in one go, it first is extremely slow and then tends to crash at some point.
|
Hey @SusanL82 - I had a check through, and I can't replicate any of the weird spectra from For example, the following code does the procedure you describe all in Python:
This gets expected power spectra, e.g.: I explored around different exponent / knee / time / sampling values and didn't see anything suspect. Concatenating segments didn't seem to create an issue, nor did trying some longer sections. I'm not sure what you're seeing - but it may have to do with something outside of the simulation creating, and relate to how you are concatenating / combining / estimating power spectra? If you can share some code that shows this issue directly in Python (for example, adapting the code above), we can revisit - otherwise I can't find anything specific to neurodsp to check / fix here. Also, |
Hi all,
I've been trying to use the neurodsp signal simulation functions to try to understand how aperiodic parameters affect some other spectrum measures from our in vivo experiments (changes in a power-ratio-based state space). I wanted to blame changes in knee values for some results, so I've used sim_knee with a variety of knee values and the same two slopes and with a sampling rate matching my real signals (6kHz).
I noticed that the power spectra of the simulated signals look very strange. I used a sliding window FFT for 2-second windows (50% overlap, for 60min of simulated data) and then averaged the spectrum for all windows. This is the method we use for the real data.
When I used somewhat randomly chosen values (exp1 = -0.5, exp2 = -1) and got this:
I then tried settings for knees and exponents that are much more in the range of what I see in my recordings (exp1 = -6, exp2 = -8), but I get the same odd repeating pattern with huge unexpected peaks:
Am I just doing something wrong with sim_knee? Or does the function only work with specific ranges of inputs?
The text was updated successfully, but these errors were encountered: