Skip to content

ENH: Support EpochsTFR in concatenate_epochs - #14565

Open
ishaaaan17 wants to merge 2 commits into
mne-tools:mainfrom
ishaaaan17:feat/concatenate-tfr
Open

ishaaaan17 wants to merge 2 commits into
mne-tools:mainfrom
ishaaaan17:feat/concatenate-tfr

Conversation

@ishaaaan17

@ishaaaan17 ishaaaan17 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Reference issue (if any)

Towards #13191. This picks up the EpochsTFR work left in #13745.

What does this implement/fix?

mne.concatenate_epochs() now accepts EpochsTFR objects, so trials from different runs can be combined after their time-frequency representations are computed. Events, selection, drop logs, and metadata are handled by the same logic that is already used for epochs. It also checks that the time and frequency axes, baseline, method, data type, and taper weights match across the inputs. This also fixes a ValueError when copying an EpochsTFR with an empty selection, which can happen when the first input has no epochs.

Additional information

This PR is independent of #14564, which covers EpochsSpectrum.

I used GPT-6.2 Astra in Codex for help with the implementation and the tests. I have verified the changes and the test results myself.

This branch has not been deployed

No deployments
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.

1 participant