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.

Report which custom reference was applied

See original GitHub issue

Currently, after calling set_eeg_reference() with a custom channel name, or invoking add_reference_channels() (which calls the former after adding all-zeros channels), to my knowledge it’s impossible to retrieve which reference channels are being used in the current referencing scheme. The only thing that gets set in info is 'custom_ref_applied'.

import os.path as op
import mne

data_path = mne.datasets.testing.data_path()
examples_dir = op.join(data_path, 'Brainvision')
vhdr_file = op.join(examples_dir, 'Analyzer_nV_Export.vhdr')

raw = mne.io.read_raw(vhdr_file, preload=True)
raw.set_eeg_reference(['F8'])

# do fancy stuff here
# ...
# Wait … WHICH reference did I apply again? Guess I'll have to find the channel
# with all-zero data :(

Isn’t there a way to keep track of which references were set?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:32 (32 by maintainers)

github_iconTop GitHub Comments

2reactions
cbrnrcommented, Feb 26, 2021

I don’t like the pickle format either, but two files are also asking for trouble. Maybe we should just store as .mat (I’m only half-joking here)…

1reaction
agramfortcommented, Mar 2, 2021

ok fair enough It seems that storing both names and locations is necessary…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom code and assembly references in expressions in a ...
Preview a report with references to custom assemblies in local mode. Including References to Commonly Used Functions. Use the Expression dialog ...
Read more >
Reference a custom form in a report | Adobe Workfront
On the Columns tab, expand the object type that the custom form that you want to reference is applied to, then click Category...
Read more >
Find Where a Field Is Used - Salesforce Help
On a custom field's detail page, click Where is this used? to see the field reference details. To view the settings for the...
Read more >
Custom Reference Page - Slate Knowledge Base
This article covers the creation of a custom reference page in the Slate-hosted application using a Slate-hosted application-scoped form.
Read more >
Using reference codes to convert database values or apply ...
Using reference codes to convert database values or apply custom sorting ... If you are using Remedy Smart Reporting in multiple locales, ...
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