-
Notifications
You must be signed in to change notification settings - Fork 37
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
Agenda for HRF analysis #58
Comments
Indeed. And apparently
Our next MNE release will be in ~Sept, so I'm not sure we can wait for nilearn 0.7.0. I suggest we wait until June or July and assess where the workflow is then. @rob-luke if you (and hopefully others around you?) are going to be using this daily in your work, the API will probably mature by your experiences in the meantime. If the API here is ready to go (and be reworked if necessary) to go in MNE-Python, we should just do it at that point. We can suffer a little bit of pain internally maintaining code for both nistats and nilearn for one release, backporting the necessary @rob-luke WDYT? @agramfort sound okay to you? |
I would expect that HRF, etc. are core concepts that must be ported. I would start by looking at their dev docs to see what has already been ported. Also maybe subscribe to their repo. A quick search of "nistats" in the nilearn repo shows this PR as maybe being relevant:
That's a great idea, I would open an issue on Nistats (after searching to see if there is anything similar). It will also implicitly answer your question about how much HRF code will be ported...
You can change which image is used in CircleCI. I would do that for now to get things working. As @agramfort says, make it work, make it nice, make it fast (in this case, memory efficient). Once you have something working with tests and everything you can more easily recruit people who enjoy digging into efficiency issues (myself included) without risking them blowing up the code.
I would live with the hack for now. Stuff like this we can deal with in the summer when we go to integrate in MNE-Python. In the meantime I would say make whatever grotesque shims you need to get the job done :) |
+100 make it work/nice/fast in mne-nirs and we'll see what should be done
in mne
… |
Thank you both. I will continue development of this analysis in MNE-NIRS and ping you both once it has matured. |
And scratch my first suggestion for what I would add to Nistats. Nilearn already has more advanced HRF models https://github.com/nilearn/nilearn/blob/master/nilearn/stats/first_level_model/hemodynamic_models.py |
And NIlearn already has the design matrix tools I need from NIstats. So I think I will switch to Nilearn. |
Awesome! That should make transitions much easier |
Hi @rob-luke . I incorporated Nistats into Nilearn. I think you have already discovered this; none of the Nistats features were abandoned during the transition. Some were reorganized in terms of the imports. The PR referenced earlier (nilearn/nilearn#2359) is preparing a documentation to guide this. In fact, I would appreciate your feedback on it, so it is good quality for other historic Nistats users. Additionally, most Nistats imports (except So most of your compatibility shims should be fairly simple. I would suggest, for now, cloning & installing Nilearn's master branch in one of the test configs and Nilearn 0.6.x + Nistats for another configuration to test your shims easily. |
Hi, |
Dear @kchawla-pi and @bthirion, |
The general approach is complete. Have moved outstanding issues to more bite sized pieces. |
Here is a rough outline of plans and issues with this HRF style analysis as currently implemented.
Overview
This tutorial shows the current status. https://mne.tools/mne-nirs/auto_examples/plot_10_hrf.html
Things work, but the code API needs improvement and a better topomap code is required.
Code base
I am basing the analysis on Nistats which includes very similar analysis to what I had planned. Nistats is currently being ported to nilearn.How can I make PRs in the meantime as nistats repo has been archived and porting won't be completed till late 2020.What is the plan for porting to nilearn? Will everything be included? Is there a way I can ensure the features used here are kept?There are some things not included in Nistats that I would like to eventually contribute including:
More granular specification of HRFs such as overshoot, offsets, etcAlready implemented in NilearnCurrent status of code
The code is quite rough now, but demonstrates the analysis approach I wish to take.
Outstanding Issues
How do I make a nicer wrapping function for the topoplots to be more like other MNE types? Currently I have a complete hack of a job. I don't even have a colorbar yet!Moved to own issue at Add colorbar to plot_glm_topo #72Testing just checks this runs. Need to add proper tests. Maybe some simulation then I can check the correct values are estimated.Moved to Add testing with Azure pipelines #56The code is taking up too much RAM to run a full analysis in the GitHub runner. It seems to be due to the AR code in Nistats. So currently analysing just the first third of the measurement in the example. Either I move to a different CI or make the code more memory efficient.Discussion moved to PR WIP: Remove crop from HRF example #64At what point do I move this in to MNE?
MNE has strict depreciation requirements, so I feel I should get the API working smoothly before opening a PR. On the other hand, opening a PR early will get helpful feedback from the experts.
Plans
I will keep chipping away at this over time. Any input is appreciated.
mne-tools/mne-python#7057
FYI: @larsoner @agramfort
The text was updated successfully, but these errors were encountered: