mne-tools / mne-tools/mne-python
Some limitations of EpochsTFRs: creating via raws, concatenating
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 1.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 100
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing EpochsTFRArray, RawTFR, Epochs, and concatenate_epochs APIs and their documentation. Compare how time-domain epoching and concatenation handle their inputs, then determine whether the requested RawTFR epoching and EpochsTFR concatenation should extend existing functions or use new counterparts. Done means both workflows are supported consistently with the relevant existing APIs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100