question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setting custom_ref_applied for ECoG data

See original GitHub issue

Setting average reference for ECoG data

When using the raw.set_eeg_reference(ref_channels='average') to perform a common average reference on ECoG data, the custom_ref_applied bool flag in raw.info remains set to False. I looked at io/reference.py and in the function definition for set_eeg_reference it appears that when _apply_reference is called, it looks only for channels of type ‘eeg’ is ‘custom_ref_applied’ set to True.

Also, in the comments for _apply_reference, it appears to say that info['custom_ref_applied']=True refers to a “non-CAR” reference, but the test is whether the reference includes EEG electrodes (which it would for an average reference, right?)

My general question then, is, for consistency, should custom_ref_applied=True after applying an average reference to ECoG data, or am I misunderstanding the use of this flag? It seems like a nice marker for whether this operation has happened or not. Happy to help fix if this makes sense. I see this is similar to this issue: https://github.com/mne-tools/mne-python/issues/6454, but not exactly.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
larsonercommented, Feb 24, 2020

Rather than force a deprecation cycle, I would just add a ch_type argument to set_eeg_reference. It leaves it as a misnomer but since set_eeg_reference is mandatory for inverse modeling, it’s going to be all over the place for users so the pain of deprecating this function is quite high.

0reactions
larsonercommented, Mar 4, 2020

@libertyh just a heads up that we’re looking to release 0.20 in the next couple of weeks so if you want this fix to make it into that release we’ll have to iterate somewhat quickly. No rush from our end, though

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with ECoG data — MNE 1.2.2 documentation
Here we show some of the functions that can be used to facilitate working with electrocorticography (ECoG) data. This example shows how to...
Read more >
Recording Human Electrocorticographic (ECoG ... - NCBI
Right-click on the viewer and set the high-pass filter to a 5 Hz cutoff. (This filter setting will only affect visualization, and not...
Read more >
Analysis of human ECoG and sEEG recordings
The data set includes a pre-implant T1-weighted MRI, a post-implant CT, a post-implant T1-weighted MRI, and neural recordings from 96 ECoG ...
Read more >
Inferring Cortical Connectivity from ECoG Signals Using ...
In this section the experiment set up and the process of data acquisition from the subject is explained. Both ECoG signals and Cortical...
Read more >
Interpretable Visualization and Higher-Order Dimension ...
aforementioned ECoG data set. II. TENSOR DECOMPOSITION FOR ECOG ANALYSIS. In this section, we describe ρ-PCA mathematically.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found