-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add "dbs" as new channel type #8739
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
Conversation
agramfort
left a comment
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.
some brief comments
@richardkoehler do you have some public data we could use for a tutorial? that would be a good way to test that it works for end users
doc/changes/names.inc
Outdated
|
|
||
| .. _Qianliang Li: https://www.dtu.dk/english/service/phonebook/person?id=126774 | ||
|
|
||
| .. _Richard Koehler: https://github.com/richardkoehler No newline at end of file |
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.
missing empty line
mne/channels/channels.py
Outdated
| ch_names, chs = self.info['ch_names'], self.info['chs'] | ||
| picks = pick_types(self.info, meg=False, eeg=True, | ||
| seeg=True, ecog=True) | ||
| seeg=True, dbs=True, ecog=True) |
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.
put the dbs at the end not just after seeg everywhere.
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, will do!
mne/channels/channels.py
Outdated
| seeg=False, dipole=False, gof=False, bio=False, ecog=False, | ||
| fnirs=False, csd=False, include=(), exclude='bads', | ||
| selection=None, verbose=None): | ||
| seeg=False, dbs=False, dipole=False, gof=False, bio=False, |
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.
dbs just be added just before include to avoid risk of crash if someone passed parameters without names
mne/cov.py
Outdated
| def __init__(self, info, grad=0.1, mag=0.1, eeg=0.1, seeg=0.1, dbs=0.1, | ||
| ecog=0.1, hbo=0.1, hbr=0.1, fnirs_cw_amplitude=0.1, | ||
| fnirs_fd_ac_amplitude=0.1, fnirs_fd_phase=0.1, fnirs_od=0.1, | ||
| csd=0.1, store_precision=False, assume_centered=False): |
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.
same here. You cannot insert a parameter in a list without breaking API unless you put it at the end or you enforce named parameters.
mne/io/array/tests/test_array.py
Outdated
| # plotting | ||
| raw2.plot() | ||
| raw2.plot_psd(tmax=2., average=True, n_fft=1024, spatial_colors=False) | ||
| raw2.plot_psd(picks=['meg','eeg'], tmax=2., average=True, n_fft=1024, |
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.
why did you have to change this?
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.
I was getting an Error during testing, but it was my bad, I revoked this change !
@agramfort Thanks for the comments! I'm working on smoothing out the remaining issues and I will implement your suggestions. I wasn't able to run a full test on my computer, as I kept getting Bus Errors for certain tests (e.g. mne/io/tests/test_pick.py::test_pick_forward_seeg_ecog). I'm happy to provide some public data. Do you want to integrate this in the tests as well or only use it for a tutorial? |
Adedd gh pull number Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>
|
Also note that in #8736 we found a place where
For tests I think it's enough just to fake DBS data using |
Thanks, I added "dbs" to topomap.py as "seeg" in #8736 . I will make a tutorial with DBS data as soon as I have the rest of the PR finalized. |
|
@larsoner @agramfort |
Yes, typically we upload to osf.io though you can use other providers if you want. |
larsoner
left a comment
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.
Otherwise LGTM, that's a lot of changes!
I think you need a rebase or merge with upstream/master @richardkoehler . Let me know if you need help with it
Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>
agramfort
left a comment
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.
let's address the remaining comments from @larsoner and we're good to go!
thx @richardkoehler
Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org> Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
|
In it goes, thanks @richardkoehler ! |
* upstream/master: (66 commits) MRG, ENH: Add infant template downloader (mne-tools#8738) ENH: add reader for NeuroElectrics .nedf files (mne-tools#8734) DOC: improve glossary entry about fiducials (mne-tools#8763) MRG, ENH: Add Report.add_custom_css (mne-tools#8762) BUG, DOC: read_raw_egi didn't support pathlib.Path; update read_raw() docstring (mne-tools#8759) Add "dbs" as new channel type (mne-tools#8739) MRG, VIZ: Fix title position in plot_sensors (mne-tools#8752) MRG: Support for non-FIFF files in Report.parse_folder (mne-tools#8744) MRG, VIZ, FIX: sEEG picking in _prepare_topomap_plot() (mne-tools#8736) DOC: don't use single letter variable name in _compute_forward (mne-tools#8727) WIP: Fix search [skip github] [skip azp] (mne-tools#8742) WIP: Compare Beer-lambert to HOMER (mne-tools#8711) MRG: bump spyder version (mne-tools#8020) FIX anon with IO round trip (mne-tools#8731) fix set_bipolar_reference for Epochs (mne-tools#8728) WIP: Add width argument, reduce default (mne-tools#8725) ENH: Add toggle-all button to Report (mne-tools#8723) fix int/float conversion in nicolet header (mne-tools#8712) MRG, BUG: Fix Report.add_bem_to_section n_jobs != 1 (mne-tools#8713) MRG, DOC: Make "rank" options in docs more accessible (mne-tools#8707) ...
Related to #8681
What does this implement/fix?
Add "dbs" as new channel type for recordings obtained from deep brain stimulation (DBS) electrodes.
The channel type DBS is referenced to in iEEG-BIDS (https://www.nature.com/articles/s41597-019-0105-7