-
Notifications
You must be signed in to change notification settings - Fork 23
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
Ignore nan
spectrogram values
#410
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #410 +/- ##
==========================================
- Coverage 49.64% 49.62% -0.03%
==========================================
Files 60 60
Lines 8823 8848 +25
==========================================
+ Hits 4380 4390 +10
- Misses 4443 4458 +15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@iaraota thanks! I was wondering: if I understand correctly, this check handles the possibility of new incoming spectrogram data to be added to the global memory variable will be excluded, but what about data already in the archive? Is the point that the corrupted data would never have made it into the archive file in the first place because of this check? |
This change prevents |
Thanks for clarifying. I think this solution is sufficient. However I'm wondering about another impact from excluding data from the global memory variable: is it possible that some channel(s) may have some |
This function is not used in the |
Which function? I'm also wondering if other computations (like coherence) would be impacted by some channels having |
Maybe I miss understood you. We can add this check after line 288. |
@eagoetz updated the PR to also ignore |
Awesome, thank you! One more minor suggestion: can a warning be printed so that it is more obvious when something like this happens so that it is not silently hidden from the user or log files? Thanks! |
@eagoetz updated the PR with warnings. |
Co-authored-by: Evan Goetz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
If the data is corrupted, the computed spectrograms may contain
nan
values. While thesenan
values are ignored in spectrogram plots, but they can cause issues in derived products such as the power spectral density and ratio spectrogram, where the presence ofnan
values leads to all values becomingnan
, resulting in empty plots. This pull request addresses this issue by removing any potentialnan
values from the data used and saved inglobalv.SPECTROGRAMS
.