Skip to content

add skip_by_annotation to notch_filter and resample #10447

Open

Description

@jasmainak

We have TMS-EEG data at MGH for which we're trying to figure what is the best processing pipeline. The TMS pulses are recorded as triggers, so we can create annotations of 10 ms around those triggers and use that to exclude from operations such as ICA and raw.filter. This seems to work well but we noticed that skip_by_annotation is not supported in notch_filter and resample. Would it make sense to add these functionality to these functions as well? It would also make the API more consistent.

Activity

  1. larsoner commented on Mar 21, 2022

    @larsoner
    Member

    Agreed this would be useful!

  2. jasmainak commented on Dec 19, 2022

    @jasmainak
    MemberAuthor

    Thinking about this more, if resample function was to have skip_by_annotation, how is the "skipped" segment to be handled? Would there still be decimation but no filter since MNE-Python only supports a single sampling frequency ...

  3. larsoner commented on Dec 20, 2022

    @larsoner
    Member

    how is the "skipped" segment to be handled? Would there still be decimation but no filter since MNE-Python only supports a single sampling frequency ...

    Yes there would be no need, it would just get subsampled somehow. An upfirdn (with no filter / a delta) could do it as you suggest

  4. added this to the 1.4 milestone on Dec 20, 2022
  5. modified the milestones: 1.4, 1.5 on Apr 21, 2023
  6. modified the milestones: 1.5, 1.6 on Jul 31, 2023
  7. modified the milestones: 1.6, 1.7 on Nov 7, 2023
  8. modified the milestones: 1.7, 1.8 on Apr 9, 2024
  9. modified the milestones: 1.8, 1.9 on Jul 15, 2024
  10. modified the milestones: 1.9, 1.10 on Dec 9, 2024
  11. modified the milestones: 1.10, 1.11 on Jun 26, 2025
  12. removed this from the 1.11 milestone on Nov 13, 2025
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