Skip to content

RFC: Remove "spectrum_fit" from notch filter #7577

Closed

Description

@larsoner

I have never really gotten it to work in practice, and users on Gitter are unhappy that it takes ages to run. I wonder if we should deprecate and remove it, as I'm not sure if fixing it is even really feasible.

Activity

  1. mmagnuski commented on Apr 8, 2020

    @mmagnuski
    Member

    Maybe we should move it to sandbox? But I'm fine either way.

  2. added this to the 0.21 milestone on Apr 8, 2020
  3. sappelhoff commented on Apr 10, 2020

    @sappelhoff
    Member

    this is relevant to sappelhoff/pyprep#18

    @yjmantilla

    edit: This is the part in the gitter discussion that Eric referred to.

  4. yjmantilla commented on Apr 10, 2020

    @yjmantilla

    What I can contribute to this is that in the tests mentioned in sappelhoff/pyprep#21 it seems that the agreement between the prep cleanline method and the mne spectrum notch is high but I haven't really tested it focusing on that part. Maybe doing some simulations would help us determining if it is worthwhile leaving it there.

  5. larsoner commented on Apr 10, 2020

    @larsoner
    MemberAuthor

    @mmagnuski suggested that this deficiency might be due to not operating on windows of raw data, which is entirely possible. I've opened a PR to make a general overlap-add processing class in #7598 that would hopefully make it easy to do so.

  6. christian-oreilly commented on Jul 31, 2020

    @christian-oreilly
    Contributor

    I just want to confirm, in case that can be useful, that, as it has been mentioned in #7598, at least part of the very long processing for this function comes from the fact that the algorithm is applied on the whole raw file (or at least, much too long part of it). I pinpointed for my case where it was hanging and it was at the line dpss = _get_dpss()(N, half_nbw, Kmax) in the function dpss_windows(...). It resulted in a call equivalent to scipy.signal.windows.dpss(100000, 3383.0, 6766) which takes forever. It now works quite well and within an acceptable time with #7609, using filter_length='10s'.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions