Skip to content

Conversation

@tsbinns
Copy link
Contributor

@tsbinns tsbinns commented Jan 13, 2025

Reference issue (if any)

https://mne.discourse.group/t/average-instances-of-mne-time-frequency-spectrum/10689/4

What does this implement/fix?

Adds a new function mne.time_frequency.combine_spectrum(), similar to combine_tfr() and combine_evoked() where data from multiple objects can be aggregated over.

Also allows the mne.grand_average() function to operate on Spectrum objects, similar to for Evoked or AverageTFR.

@tsbinns
Copy link
Contributor Author

tsbinns commented Jan 13, 2025

There is unit test coverage for the new combine_spectrum().

Currently there is not coverage for using grand_average() with Spectrum data, but this is the same as with AverageTFR (only Evoked has coverage), and it only misses where the data is passed to the combine_tfr/spectrum function.

@drammock drammock enabled auto-merge (squash) January 13, 2025 21:42
@drammock drammock merged commit f82d399 into mne-tools:main Jan 13, 2025
30 checks passed
@tsbinns tsbinns deleted the add_combine_spectrum branch January 13, 2025 23:34
larsoner added a commit that referenced this pull request Jan 14, 2025
…e-config

* upstream/main:
  [DOC] extend documentation for add_channels (#13051)
  Add `combine_tfr` to API (#13054)
  Add `combine_spectrum()` function and allow `grand_average()` to support `Spectrum` data (#13058)
  BUG: Fix bug with helium anon (#13056)
larsoner added a commit to emma-bailey/mne-python that referenced this pull request Jan 14, 2025
* upstream/main:
  [DOC] extend documentation for add_channels (mne-tools#13051)
  Add `combine_tfr` to API (mne-tools#13054)
  Add `combine_spectrum()` function and allow `grand_average()` to support `Spectrum` data (mne-tools#13058)
  BUG: Fix bug with helium anon (mne-tools#13056)
  [ENH] Add option to store and return TFR taper weights (mne-tools#12910)
qian-chu pushed a commit to qian-chu/mne-python that referenced this pull request Jan 20, 2025
…ort `Spectrum` data (mne-tools#13058)

Co-authored-by: Daniel McCloy <dan@mccloy.info>
larsoner added a commit to larsoner/mne-python that referenced this pull request Jan 24, 2025
* upstream/main: (57 commits)
  Allow lasso selection sensors in a plot_evoked_topo (mne-tools#12071)
  MAINT: Fix doc build (mne-tools#13076)
  BUG: Improve sklearn compliance (mne-tools#13065)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#13073)
  MAINT: Add Numba to 3.13 test (mne-tools#13075)
  Bump autofix-ci/action from ff86a557419858bb967097bfc916833f5647fa8c to 551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef in the actions group (mne-tools#13071)
  [BUG] Correct annotation onset for exportation to EDF and EEGLAB (mne-tools#12656)
  New feature for removing heart artifacts from EEG or ESG data using a Principal Component Analysis - Optimal Basis Sets (PCA-OBS) algorithm (mne-tools#13037)
  [BUG] Fix taper weighting in computation of TFR multitaper power (mne-tools#13067)
  [FIX] Reading an EDF with preload=False and mixed frequency (mne-tools#13069)
  Fix evoked topomap colorbars, closes mne-tools#13050 (mne-tools#13063)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#13060)
  BUG: Fix bug with interval calculation (mne-tools#13062)
  [DOC] extend documentation for add_channels (mne-tools#13051)
  Add `combine_tfr` to API (mne-tools#13054)
  Add `combine_spectrum()` function and allow `grand_average()` to support `Spectrum` data (mne-tools#13058)
  BUG: Fix bug with helium anon (mne-tools#13056)
  [ENH] Add option to store and return TFR taper weights (mne-tools#12910)
  BUG: viz plot window's 'title' argument showed no effect. (mne-tools#12828)
  MAINT: Ensure limited set of tests are skipped (mne-tools#13053)
  ...
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