-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
ENH: Agenda for fNIRS processing #7057
Comments
Currently I am looking at the temporal whitening tutorial as a starting place for the first step of the GLM implementation. |
(Unrelatedly, also added a note about refactoring the wavelength to use |
if the code becomes too big I would start by putting it in
dedicated projects unless there is a consensus so that 80% of people will
use this tool anyway
… |
Agreed, not sure about prevalence. @rob-luke hopefully can comment. FWIW the code for TDDR is about 20 active lines so not too painful :) |
From that style of processing, TDDR is my preferred approach. I would be happy to implement it after the items listed above. |
This is handy to know, it will help me think about what to implement in this repo |
I have put my name next to the items that I have rough code already working for. |
There is now a python TDDR implementation here. |
MIT license so we can use it in MNE
… |
Great to hear. Whats the best way to go about adding external code? I assume we don't want to add that repository as a dependency. Do you usually email the author and ask them to add it to MNE, or ask permission for me to add it? Seems like most of the work will be around the data format management which I can do. |
@rob-luke We'll want some changes to docstring, code formatting, etc, so to me it would seem odd to ask the original author to do that work for us. But I think it's polite to let them know that you're going to incorporate their work into MNE-Python, and ask if/how they want to be involved and/or credited. |
Thanks, I'll get in touch with the author and offer to do the bulk of the boring work and ask how they want to be involved/credited. |
With the 0.20 release coming out soon I thought it would be a good time to say thanks to @larsoner and @agramfort for all the help getting this NIRS integration working. Right now I just completed an analysis ready for publication entirely with MNE. To me it seems all the basic requirements for a NIRS analysis is now present in MNE. Next comes the fun part of developing more advanced analysis/algorithms. Thanks again. |
awesome !
don't forget to give us academic credit :)
https://mne.tools/stable/overview/cite.html
thanks
… |
Absolutely!! |
Great to hear @rob-luke ! Thanks to you for implementing this stuff, hope to start using it (and contributing more myself) soon :) |
for designs I would look at https://nistats.github.io/
nipy stats is not a very active code base and nistats will soon be merged
into nilearn.
… |
Thats exactly what I needed @agramfort, somehow I had missed nistats. Thanks |
Ok I got carried away and have made a first pass at the HRF style analysis based on nistats at... https://mne.tools/mne-nirs/auto_examples/plot_10_hrf.html And created a meta issue of this meta issue to track my thoughts. I pinged you both as an FYI. |
Awesome example! I've subscribed to the repo :) |
Thanks. I will continue the HRF analysis development in MNE-NIRS and once matured we will merge in to MNE. |
Glad I found this great discussion, I have an imagent from ISS and am working on a function to load its phase and intensity data into a MNE format similar to the NIRx.py loading example. We are thinking of moving our code base for fast optical imaging from matlab into python with these tools (currently at github.com/kylemath/mopt3d). Look like you all have thought about many of the major hurdles already, I think I gathered I should work from this new repo: https://github.com/mne-tools/mne-nirs? |
@kylemath the plan at this point is to support all of the stuff at the top of this issue directly in MNE-Python except what is marked as being for
I would say you should try implementing your At least that's how I see it! Feel free to clarify @rob-luke @agramfort |
Hi @kylemath,
MOpt3d looks great. I think that kind of functionality is more suited to MNE-NIRS than MNE for now. Particularly photon migration is something I would love to get up running (see issue). A quick stalk of your repository reveals that you have extensive experience in this style of analysis. I am trying to sketch out a roadmap over at MNE-NIRS by opening issues, please feel free to create/comment on issues to share your experience of what works or doesn't, or what functionality you think is essential or not. |
@rob-luke @larsoner - My student and I are working on the function to load BOXY data files from the imagent software, along with digitized sensor location files and lists of location names for our helmets. ch_pos, ch_names = ourLoadFunction(datafile)
montage = make_dig_montage(ch_pos, fiducials)
info = create_info(ch_names, srate, 'eeg').set_montage(montage)
mri_fiducials = read_fiducials(fsaverage)
trans = coregister_fiducials(info, fiducials) We noticed that the nirx function does things a bit different, by precomputing a transformation matrix from fsaverage, applying it to the fNIRS sensor coordinates and outputing those TRANSFORMED VALUES without a transformation matrix. Why does NIRx.py apply the transform ahead of time? Instead of leaving it up to the user? |
Channel locations in MNE-Python are supposed to be stored in Neuromag head coordinates, see: https://mne.tools/dev/auto_tutorials/source-modeling/plot_source_alignment.html So the |
... but see also the evolving discussion here #7691 (comment) |
Ok thanks, I think part of our confusing is that we only have two coordinate frames, and our "head" and "MEG" frames are aligned.
So I guess this is more analogous to the EEG coregistration in that regard. Is there some discussion of this EEG coregistration case somewhere I can't see, I see this, but not how to get the trans matrix: https://mne.tools/stable/auto_examples/visualization/plot_eeg_on_scalp.html |
Hi @kylemath, I will leave these coordinate questions to the others. But it might be easier if you open a pull request as a WIP in this repository for the imagent data reader, that way we can comment directly on the code and iterate faster. |
yes good idea, will try to organize that this weekend after some testing
…On Thu, Apr 30, 2020 at 4:43 PM Robert Luke ***@***.***> wrote:
Hi @kylemath <https://github.com/kylemath>,
I will leave these coordinate questions to the others. But it might be
easier if you open a pull request as a WIP in this repository for the
imagent data reader, that way we can comment directly on the code and
iterate faster.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7057 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA36GFPFYH5AVRHDJH4U43TRPIEK5ANCNFSM4JNDSW5Q>
.
--
*Kyle E. Mathewson, Ph.D.*
Assistant Professor - Department of Psychology, Faculty of Science
Director - Attention Perception and Performance Lab
Affiliate - Neuroscience and Mental Health Institute, Faculty of Medicine
and Dentistry
University of Alberta
P455 - Biological Sciences Building
11455 Saskatchewan Dr.
Edmonton, Alberta, Canada, T6G 2E9
Phone: 1-780-492-2662
Email: [email protected]
Web: www.kylemathewson.com
|
Great, didn't mean to rush you, just whenever you have time. I found the support from the MNE team very encouraging when I added the NIRX reader. Opening a PR will also move the detailed conversation there and keep this issue more for higher level agenda discussion. |
@rob-luke this is marked for a 0.21 milestone. Could you look into the remaining plotting issues above in the next couple of weeks so that we can tick a few more boxes for 0.21? |
Sure I can take a crack at PSD and TFR, but I don't know what projs is and if its relevant to NIRS. The other file type readers are also out of my control, particularly the artinis won't be done by 0.21. Do you plan to create another meta issue after 0.21 for the outstanding issues? I think we could ditch the mega meta style list as everything is running pretty well now and just tackle issues as they arise. |
Projs we can tackle at some point if people want to try using it as a means of noise suppression. Agreed we can just open PRs for readers as necessary |
Its great to have this ticked off. Thanks for the all the help along the road. |
The current status of NIRS support can be seen in this tutorial.
Here is a rough plan for the development of fNIRS processing in MNE.
Refactor existing code:
info['chs'][ii][loc][9]
in addition to the channel nameinfo['chs'][ii][loc][9]
value rather than channel names in preprocessingIntegrate fNIRS to existing MNE functions:
plot_topomap
plot_joint
Channel quality measures:
Add overlapping channel support to (these may already work with code changes I made, but don't have tests if they aren't ticked):
Movement correction
Interpolation of bad channels:
File support:
Implement HRF GLM style analysisMoved to MNE-NIRS till mature enough to merge inSource AnalysisMoved to MNE-NIRS till mature enough to merge inThe text was updated successfully, but these errors were encountered: