-
Notifications
You must be signed in to change notification settings - Fork 85
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
[MRG] Read_raw extension to extend sidecar json func. #341
Conversation
any test to update? |
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.
Thanks for the contributions. I made some comments.
Also:
- What happens if we CAN read a
line_freq
from the JSON, and theraw.info[line_freq]
is None? --> In that case it'd probably be good to just set theraw.info[line_freq]
according to what we read, instead of raising an error
I checked |
see how we do the rest of the tests. Check if the errors are raised etc. also you need to rebase to make the CIs happy. Good luck! :) |
Codecov Report
@@ Coverage Diff @@
## master #341 +/- ##
==========================================
+ Coverage 94.9% 95.14% +0.23%
==========================================
Files 11 11
Lines 1218 1277 +59
==========================================
+ Hits 1156 1215 +59
Misses 62 62
Continue to review full report at Codecov.
|
seems like you need to rebase |
I had a brief look at the automatic power line detection. That’s cool! Couple of comments:
Sorry I can’t look in more detail now ... |
I make a big copy, so that we can make use of all channels with sampling data. Assuming that there isn't severely corrupted data, then this should work robustly due to the fact that averaging many channels (with possible non-noise power at 50/60 Hz ranges) gets rid of the signal, and amplifies common noise. I agree that probably "most" of the time, a single channel suffices, but I figured this could potentially cover essentially "all" cases, since it is a more robust estimate of what frequency is common across many electrodes (e.g. line noise). I trimmed the algorithm to only analyze the minimum of 10 seconds, or the whole dataset. I'm not sure if MNE-Python has the capability of slicing the dataset before loading?
Enjoy your vacation :). I'm just putting these in the pipeline to get them out of my way before I forget what I wanted to do. |
Could be used I suppose, but yeah you're right, probably better to just check frequencies around 50 and 60 Hz and compare average PSD for all channels. |
Co-Authored-By: Mainak Jas <jasmainak@users.noreply.github.com>
Thanks @adam2392 ! |
Let's close the other two PRs as well ;-) |
PR Description
Extends read_raw functionality to extract data from the sidecar json file. Closes: #340
Also includes check on data elements, such as:
Merge checklist
Maintainer, please confirm the following before merging: