-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
No warning for signal_psd: default min_freq #574
Conversation
warning for low frequency resolution
But so you agree that currently, by default, in most of the cases: |
why not "sanitize" min_freq to the lowest possible instead of 0.001 |
doing: |
We can sanitize min_freq like so, assuming it is 0 by default:
|
No 😅 only when the recording length is not sufficiently long to capture at least 2 cycles of min_frequency I don't know if you are misunderstanding but there is no "impossible frequencies". We are just using the min_frequency to determine the length of overlapping segments when calculating PSD. |
How come i get the warning everytime I use signal_psd then?? even for signals of length a million |
Because if min_frequency is zero (which is adjusted to 0.01), the signal length required for "absolute" high level of good resolution is 4 million 😅 For your use case, you don't have a default value of min_frequency that you want? |
hence the current "adjusted" value is useless since it requires a very rare usecase All I want is a default behaviour that 1) doesnt' require to manually input min_freq and 2) doesn't print a warning for 99.999% of cases 😅 |
What we can do is add a "default" option for min_frequency where min_frequency is determined by optimal nperseg (based on sampling_rate and length of the signal. |
added a default option for min_frequency to avoid warning, fix texts accordingly
…NeuroKit into fix/psd-warning
Codecov Report
@@ Coverage Diff @@
## dev #574 +/- ##
==========================================
- Coverage 85.80% 82.81% -2.99%
==========================================
Files 187 233 +46
Lines 8841 11051 +2210
==========================================
+ Hits 7586 9152 +1566
- Misses 1255 1899 +644
Continue to review full report at Codecov.
|
@Tam-Pham currently we "normalize" the power in many different places (in signal_psd), can we unify that so that it's done only at one place? |
what to do lah |
Next PR? 🥲 |
warning for low-frequency resolution
Address #560
Checklist
Here are some things to check before creating the PR. If you encounter any issues, do let us know :)