Skip to content

concatenation of annotated epochs #11131

Closed

Description

@virvw

Describe the new feature or enhancement

as per @larsoner's request
Allow for concatenation of annotated epochs, e.g. when epochs are baselined, then cropped and then concatenated (instead of baselined, concatenated and then cropped)

Usefulness: speed of computation for long epos can be reduced during stat analysis on specified time windows and for instance, excluding the baseline

Describe your proposed implementation

Preserve the useful "(baseline period was cropped after baseline correction)" annotation implemented by @hoechenberger allowing to baseline and then crop

Describe possible alternatives

N/A

Additional context

Current error message is very helpful and explicit as to the nature of the issue so kuddos for the code and informative error labeling 👍

[<EpochsFIF | 45 events (all good), 0 - 1 sec, baseline -0.2 – 0 sec (baseline period was cropped after baseline correction), ~42.5 MB, data loaded, with metadata,
'11': 45>,

C:\Users\vv221713\AppData\Local\Temp\ipykernel_1360\3541098965.py:1: RuntimeWarning: Concatenation of Annotations within Epochs is not supported yet. All annotations will be dropped.
data_epo = mne.concatenate_epochs([epos_list[ei] for ei, e in enumerate(epos_list)
Traceback (most recent call last):

Activity

  1. agramfort commented on Sep 4, 2022

    @agramfort
    SponsorMember
  2. virvw commented on Sep 4, 2022

    @virvw
    ContributorAuthor
  3. agramfort commented on Sep 4, 2022

    @agramfort
    SponsorMember

    do you really need annotations or just metadata? It's different things.
    if you don't need the annotations you should remove them before doing the concatenations.

    maybe blah.set_annotations(None) ?

  4. virvw commented on Sep 4, 2022

    @virvw
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions