Skip to content
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

possible enhancement: option to add excluded channels back to data after preprocessing #61

Open
dominikwelke opened this issue Apr 30, 2022 · 3 comments

Comments

@dominikwelke
Copy link
Contributor

hi all,

I am missing an option to exclude misc channels (EOG, ECG, EMG, or the like) only temporarily during preprocessing.
so far this data is removed from the file.

it's easy to fix this later on, but i think it would be an improvement for automagic if the pipeline could handle this.

the simplest implementation would be to store all excluded channel data (in memory or better on disc) and reattach them to the preprocessed file before saving.
this could be controlled with a checkbox in the gui.

alternatives:

  • data could be added back by default (no gui change needed)
  • let ppl choose which channels to reattach. not sure if this is necessary, though.

I'd be happy to implement this functionality if you are interested (not the gui, though).
one would need to pay attention to the channel indices. especially if automagic adds a reference channel to the dataset

cheers,
Dominik

@ksgfan
Copy link
Collaborator

ksgfan commented May 2, 2022

Hi Dominik,

it is a good idea, however as you said, it may be tricky to implement. Especially, when user exclude some channels, add new reference or perform EOG Regression. For EOG regression, the user has to specify EOG channels that are removed from EEG before preprocessing and regressed out from EEG later.

Additionally, one needs to be careful, when providing channel location file, because if the dimensions of data and channels do not agree, automagic won't load the channel information.

Up until now, we were simply splitting the data and saving ECG, etc. temporarily on disc (or e.g. in EEG.ecg) before preprocessing in automagic.

If you are willing to write the code, I am happy to implement the GUI part :)

Best,
Dawid

@dominikwelke
Copy link
Contributor Author

hi @ksgfan
sorry for the delayed response, i had some busy months in between but finally found the time to work on this :)

it is a good idea, however as you said, it may be tricky to implement. Especially, when user exclude some channels, add new reference or perform EOG Regression. For EOG regression, the user has to specify EOG channels that are removed from EEG before preprocessing and regressed out from EEG later.

I just created a PR.
lets discuss there

@ksgfan
Copy link
Collaborator

ksgfan commented Jul 8, 2022

Hi Dominik,

Thank you very much! I am on vacation until 17.07. but will check the PR after i am back.

Best,
Dawid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants