Skip to content

Conversation

@hoechenberger
Copy link
Member

@hoechenberger hoechenberger commented Jun 26, 2024

Adds a new row to the Epochs HTML repr table, stating whether metadata is present; and if yes, how many rows and columns.

Comment on lines +11 to +12
<tr class="repr-section-header {{ section_class_name }}" {% if collapsed %} title="Show section" {% else %}
title="Hide section" {% endif %} onclick="toggleVisibility('{{ section_class_name }}')">
Copy link
Member Author

Choose a reason for hiding this comment

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

Autoformatter did that … not related to the new feature

# groups.

epochs.metadata["NumberOfLetters"] = epochs.metadata["NumberOfLetters"].map(int)

Copy link
Member Author

Choose a reason for hiding this comment

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

touched it for rendering

Copy link
Member

Choose a reason for hiding this comment

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

Oddly enough looking at that example I don't think epochs is ever just printed, but I confirmed locally that it works
Screenshot 2024-06-29 at 3 27 26 PM

@hoechenberger hoechenberger changed the title Add epochs metadata summary to HTML representation MRG: Add epochs metadata summary to HTML representation Jun 26, 2024
@larsoner larsoner merged commit bbc2a82 into mne-tools:main Jun 29, 2024
@larsoner
Copy link
Member

Thanks @hoechenberger !

@hoechenberger hoechenberger deleted the epochs-html-repr-metadata branch June 29, 2024 20:08
larsoner added a commit to scott-huberty/mne-python that referenced this pull request Jul 16, 2024
* upstream/main: (252 commits)
  Disable the "Back to top" button in the documentation (mne-tools#12688)
  DOC: match_channel_orders works on Epochs and Evoked, too (mne-tools#12699)
  Scale points and labels in montage plot (mne-tools#12703)
  Add license header to mne.stats.erp (mne-tools#12712)
  Update license year to 2024 (mne-tools#12713)
  Add standardized measurement error (SME) (mne-tools#12707)
  ENH: Parallel example execution in doc build (mne-tools#12708)
  MAINT: Update PR template (mne-tools#12692)
  MAINT: Fix doc build (mne-tools#12706)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#12702)
  Improve documentation of ylim argument through Evoked plotting function (mne-tools#12697)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#12696)
  BUG: Fix bug with CSP rank="full" (mne-tools#12694)
  MRG: Add epochs metadata summary to HTML representation (mne-tools#12686)
  Correct `Epochs.apply_function` docstring (mne-tools#12691)
  FIX: Gracefully handle missing datetime in Eyelink File (mne-tools#12687)
  MAINT: Restore SciPy pre (mne-tools#12689)
  Enh single channel annotation (mne-tools#12669)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#12682)
  Bump autofix-ci/action from 1.2 to 1.3 in the actions group (mne-tools#12681)
  ...
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.

2 participants