-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
New feature for removing heart artifacts from EEG or ESG data using a Principal Component Analysis - Optimal Basis Sets (PCA-OBS) algorithm #13037
base: main
Are you sure you want to change the base?
Conversation
Updating master with most recent package features
feat: add initial source code
for more information, see https://pre-commit.ci
…e size of indentation tree
…ove more unused variables and imports, add some types
…et data from, how we call functions, how we assert outputs
Update PCA OBS fork with most recent changes in main MNE repo
…ogging to use mne logger instead of prints, add wrapper method in front of private _pca_obs method to handle parallel processing
… to have consistent patterns
refactor: Initial cleanup of new PCA OBS source code
…ifact-removed data shapes and values
… function input, ad tests for copying original data and comparing to data modified in-place, add window size checks and remove generic try-except blocks BREAKING CHANGE
…ples for algorith
…ndices, add sanity checks for input values, add negative-test which verifies proper exceptions when bad data is passed to function
test: add initial test structure, missing validation of post-hear-art…
Thanks for the contribution! I haven't looked at the diff in any detail yet. Here's a summary of the failing CIs: new functions not added to appropriate file in
|
@steinnhauser can you share a plot where we can see that this does better than let's say SSP projections that MNE has for such needs? |
for more information, see https://pre-commit.ci
@drammock thank you for your feedback! I've added some more commits to address them.
I've tried to add the proper import in 8f4dcdd. If there are any patterns here the don't match your conventions feel free to let me know 🙂
I've added
This sounds like an interesting discussion, since the ds004388 dataset is quite large. Not sure how easy it would be for you to add this to your cache. We could maybe add one or two of the participants - the dataset contains 40 but I don't think they are all relevant for the example. |
What does this implement/fix?
Our PR implements the PCA-OBS algorithm for removal of heart-artefacts from EEG or ESG datasets. The PCA-OBS algorithm was originally designed to remove the ballistocardiographic artefact in simultaneous EEG-fMRI. Here, it has been adapted to remove the delay between the detected R-peak and the ballistocardiographic artefact such that the algorithm can be applied to remove the cardiac artefact in EEG (electroencephalogrpahy) and ESG (electrospinography) data.
Positive and negative tests have been implemented for the feature, and we have also included an example script which is implemented using data from
openneuro
(dataset ID:ds004388
).Authors:
Emma Bailey [email protected]
Steinn Hauser Magnusson [email protected]