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
Using ICA sequentially leads to overwrites in the report #135
Comments
This is where more complex scenarios break the pipeline unfortunately! Who are these ambitious people that want to do simultaneous MEG + EEG?? for point 3. the following might work: |
Thanks for the reply. I have tried fitting the ICA to EEG and MEG simultaneously. I sent you the results for the individual decompositions and the combined ones via Slack. I can try to add features and open pull requests that can take account for these complex scenarios if you think that will be helpful for the For point 3, I think as long as we use the |
If we want to have multiple
In any case, we’d have to also make sure that the |
I think the former is better, because it will be easier to generalise in case other users might be interested in performing ICA on other channel types like |
Fair point @scho97 ! I agree. |
I think what you want to do could be possible without modifying the code. Why not do the following?
Then each ICA step has it's own directory with it's own report. Is this problematic/impractical? I don't have a strong opinion. If you want to update the dataset['ica'] implementation then option one (adding dataset['ica']['eeg'], dataset['ica']['meg']) works for me. |
Based on what I checked so far, I don't think there will be any bugs or problems when we create separate directories and reports for each ICA step. I think it is a matter of user preference about whether we want to create multiple directories or store them in one. |
If adding the option will be beneficial we should go with that. The one comment I have is the more special cases we add the more code and user options we'll have to maintain. Another option is:
I'm in favour of whatever make the code more usable, simpler or easier to maintain. |
Yes, that could be another option. I guess it will be like implementing Andrew's customised I think editing the code will be helpful for my data, but I am not sure how many people will use the NTAD dataset or data that have simultaneous, multimodal data. I'll wait for Mats' opinion on this. I'm okay with using the unmodified version of the code for now. |
I think the best option with be the write a wrapper with existing code to do what you want (and add small changes to the repo if neccessary), then if it would be helpful for other people we can simply include as a custom wrapper it in the repo. |
Can you elaborate a bit more about a wrapper? Do you mean a wrapper function that would take |
I haven't thought through the details, it might not be possible. It's unlikely you'll be able to write a wrapper that'll play nicely with the existing reporting. The wrapper could just save the separate ICA objects (one for MEG the other for EEG) and then you could have a separate script to plot/manually mark the ICA components. |
Okay, it would work if I make the wrapper to save the objects and then a new script to plot ICA components. Yet, I don't think the wrapper will work nicely with the current reporting if it somehow gets included into the repo later on. Adding new scripts for reporting ICA separately seems to be adding an extra step in the pipeline. As you said, since this might be a special case, I'll make changes locally and add them only if they are necessary later on. |
Is this still an issue? |
I believe it will still be an issue once I start on NTAD as we decided to do ICA separately on EEG and MEG. If keeping it open is cumbersome, I think we can close the issue and reopen later if necessary. |
No, no problem. We'll leave it open. |
For the dataset that includes multiple data modalities (e.g., NTAD data with simultaneous M/EEG recordings), users might want to apply ICA denoising for each data types. For example,
However, using ICA preprocessing step sequentially led to following problems:
*_ica.fif
MNE object file tat was generated first gets overwritten by the latter one.gen_html_data()
only accepts one ICA object. This forces our report to only summarise and plot the most recent ICA step.plot_bad_ica()
to ICAs of EEG leads to an error at L838-842, because raw objects contain all ofmag
,grad
, andeeg
in NTAD data, but we only detected ICA from EEG channels.The text was updated successfully, but these errors were encountered: