-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Describe the new feature or enhancement
My pipeline involves cropping raws into blocks of trials, time-frequency transforming these cropped raws, then epoching them into trials. Transforming raws rather than epochs is desirable as it avoids creating edge artifacts around every trial. Under this workflow, it would be convenient if EpochsTFRArray could accept RawTFR objects and epoch them, as Epochs can do with Raws.
Another limitation of working with EpochsTFRs is concatenation. I've constructed EpochsTFRs from multiple different blocks/sessions and would like to concatenate them. I had expected concatenate_epochs to accept EpochsTFR but unfortunately it does not. see also https://mne.discourse.group/t/concatenating-epochstfr-objects/8463
Describe your proposed implementation
Either modification of concatenate_epochs
and EpochsTFRArray
, or new functions/classes analogous to time-domain counterparts.
Describe possible alternatives
As a work-around, I am flattening the time-frequency data arrays, concatenating channels and frequencies, then working with them as Epochs objects (epoching, concatenating). But the Epochs class is ill suited for handling time-frequency data.
Additional context
No response
Activity
welcome commentedon Apr 5, 2025
Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴
drammock commentedon Apr 6, 2025
For parity with the time domain classes, shouldn't it be
EpochsTFR
(notEpochsTFRArray
) that did that?I agree that it should. Are you up for making a PR to add this?
I'd guess that concatenation will be easier than the other change, and I'd suggest tackling these in separate PRs
mcfreund commentedon Apr 10, 2025
Happy to give it a shot!
drammock commentedon Apr 10, 2025
I noticed yesterday on a dataset that I'm working on that
concatenate_epochs
also does not work withEpochsSpectrum
objects. If it's not too much extra work, would be great if support for that were added at the same time asEpochsTFR
support.