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

MRG: Display averaged time period in Evoked topomap title #10606

Merged
merged 1 commit into from
May 6, 2022

Conversation

hoechenberger
Copy link
Member

@hoechenberger hoechenberger commented May 6, 2022

Also improve the documentation and mention that the time windows for averaging actually get clipped at the "ends" of the data.

main this PR
old new
joint_old joint_new
# %%
from pathlib import Path
import mne


sample_dir = Path(mne.datasets.sample.data_path())
sample_fname = sample_dir / 'MEG' / 'sample' / 'sample_audvis_raw.fif'

raw = mne.io.read_raw_fif(sample_fname)
raw.crop(tmax=60)

events = mne.find_events(raw, stim_channel='STI 014')
event_id = {'auditory/left': 1, 'auditory/right': 2, 'visual/left': 3,
            'visual/right': 4, 'face': 5, 'buttonpress': 32}

epochs = mne.Epochs(raw, events=events, event_id=event_id,
                    tmin=-0.2, tmax=0.5, baseline=(None, 0),
                    preload=True)

evoked = epochs.average()
evoked.plot_topomap(average=0.1);
evoked.plot_joint(topomap_args=dict(average=0.1));

@hoechenberger hoechenberger force-pushed the evoked-topomap-average branch from b5a5eb0 to 2d8800b Compare May 6, 2022 12:40
@hoechenberger hoechenberger marked this pull request as ready for review May 6, 2022 12:47
@hoechenberger hoechenberger changed the title Display averaged time period in Evoked topomap title MRG: Display averaged time period in Evoked topomap title May 6, 2022
Copy link
Member

@sappelhoff sappelhoff left a comment

Choose a reason for hiding this comment

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

nice 👍

@hoechenberger
Copy link
Member Author

@larsoner please merge if happy

@larsoner larsoner merged commit add9e16 into mne-tools:main May 6, 2022
@larsoner
Copy link
Member

larsoner commented May 6, 2022

Thanks @hoechenberger !

@hoechenberger hoechenberger deleted the evoked-topomap-average branch May 6, 2022 15:40
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