Skip to content
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

Allow computing coherence with an external reference #2

Open
wmvanvliet opened this issue Jul 4, 2018 · 0 comments
Open

Allow computing coherence with an external reference #2

wmvanvliet opened this issue Jul 4, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@wmvanvliet
Copy link
Collaborator

At the moment, conpy only supports connectivity between sensors/sources. A common use case is to compute coherence between the sensors/sources and an external sensor, for example an EMG sensor.

The API could look like this:

# Include the EMG sensors in the CSD matrix computations.
# (By default, only MEG and EEG is included)
csd_picks = mne.pick_types(epochs, meg=True, emg=True)
csd = mne.time_frequency.csd_epochs(epochs, picks=picks)

# Compute one-to-all connectivity pairs between the EMG sensor and all source vertices
pairs = conpy.sensor_to_source_pairs('EMG001', src)

# Specify during connectivity computations that the origin is not on the cortex,
# but the targets are
con = conpy.dics_connectivity(pairs, fwd, csd,
                              sources_on_cortex=False, targets_on_cortex=True)
@wmvanvliet wmvanvliet added the enhancement New feature or request label Jul 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant