I performed ICA on the original data and got 12 independent components, one of which looked like an electrooculogram artifact.
But I don’t want to completely remove this independent component now, because it is likely to contain part of the neural activity, so I want to perform certain filtering operations on this independent component (such as DWT), and then replace the original independent component with the decomposed signal, In this way, the signal-to-noise ratio of the signal can be guaranteed to the greatest extent.
But I haven’t found the relevant API in MNE to complete this function.Does anyone know what to do?
So far I have completed the filtering of artifact components, but I don’t know how to replace it.
sorry for the long delay with no responses! Did you end up finding a way to do this? (if so, let us know what you did).
I don’t think we have a good way to do this in our current supported API. A hackish workaround is that you can in theory assign new values to the ica.pca_components_ (n_chan × n_chan) and ica.mixing_matrix_ (n_comp × n_comp) arrays. So if you can figure out how to convert the changes you want to make into changes to a particular row/column of those matrices, it might work. Messing with those matrices manually is generally speaking not a good idea so there’s no guarantee that other aspects of the ICA object will still work as described after you’ve changed them.