Skip to content

Conversation

@alexrockhill
Copy link
Contributor

Follow-up to #10571.

I thought it would be nice instead of just dropping bridged electrodes to use them in the interpolation. This just makes a virtual channel halfway between bridged electrodes and then interpolates with the aid of the virtual channel before dropping it. I thought this would be one last nice thing to add.

Copy link
Member

@agramfort agramfort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you seen this done somewhere? I would be curious to see on the BCI data if it helps in any quantitative way. Here it seems smart in theory but I am not yet convinced it’s practically useful

@alexrockhill
Copy link
Contributor Author

I haven't seen it done, it just seems like the next logical step. There isn't really a ground truth to evaluate against but it seems like a better idea to me than discarding the data.

@alexrockhill
Copy link
Contributor Author

alexrockhill commented May 3, 2022

The interpolation is definitely different, here is the standard interpolation difference with this method

Screen Shot 2022-05-02 at 2 53 58 PM

@agramfort, do you have any idea on how to test quantitatively? You could compare similarity across the rest of the subjects that didn't have bridging for that pair. Maybe with mutual information or correlation? I could try adding that.

The bottom two traces are the difference between the interpolation method without adding virtual channels and with.

@larsoner
Copy link
Member

larsoner commented May 3, 2022

There isn't really a ground truth to evaluate against but it seems like a better idea to me than discarding the data.

You could pretty easily take data that does not have bridging, and create bridging-like responses in some electrodes (maybe use the mean of both/all bridged electrodes signals and add a tiny bit of Gaussian noise?).

Then you could look at which interpolation method actually matched the original/veridical (un-bridged) data better

@alexrockhill
Copy link
Contributor Author

Thanks for the idea @larsoner, glad I asked, that was much easier and probably more accurate. It does look like adding a virtual channel gives you slightly less variance of the residual (difference between original signal and recovered).

@alexrockhill
Copy link
Contributor Author

@agramfort agramfort merged commit 4349f6d into mne-tools:main May 4, 2022
@agramfort
Copy link
Member

Thx @alexrockhill

@alexrockhill alexrockhill deleted the interp branch May 4, 2022 21:35
larsoner added a commit to larsoner/mne-python that referenced this pull request May 9, 2022
* upstream/main:
  MRG: Add "highlight" parameter to Evoked.plot() to conveniently highlight time periods (mne-tools#10614)
  MRG: Allow to pass array of "average" values to plot_evoked_topomap() (mne-tools#10610)
  fix: snirf length units (mne-tools#10613)
  minor, doc: fix subplot titles in tutorial (mne-tools#10607)
  Display averaged time period in Evoked topomap title (mne-tools#10606)
  MAINT: Fix for pydata-sphinx-theme [skip azp][skip actions][circle deploy] (mne-tools#10605)
  DOC: report.add_html in tutorial (mne-tools#10603)
  Broader support of the SNIRF file format and enable reading GowerLab data (mne-tools#10555)
  MRG: Recommend mamba instead of libmamba for installation (mne-tools#10597)
  Fix dev documentation warning [skip azp][skip actions] (mne-tools#10599)
  FIX cmap (mne-tools#10593)
  [ENH, MRG] Add interpolate bridged electrodes function (mne-tools#10587)
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

Successfully merging this pull request may close these issues.

3 participants