BUG: Only add decimate to correct classes #11853
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So it turns out the
raw.decimatewas unintentionally added by @alexrockhill in #10945 when refactoringTimeMixin. When I went to test it, it didn't work -- it relied on presence of a._raw_timesattribute which doesn't even exist forRawinstances. Same thing withSourceEstimateclasses, which also errantly got.decimatemethods -- they didn't work and I don't think were intended to be added. Since they never worked for these other classes, we can remove them without a deprecation cycle.A future option would be to add proper support for them -- I actually did recently try to use
raw.decimatebecause I had suitably filtered my data but ended up needing to use the much slower.resampleinstead! -- but it's not trivial. We jump through some substantial hoops inraw.resampleto deal with concatenated instances, so not worth it for now.Thus in this PR I:
TimeMixinback to what it was, where the only public method wastime_as_indexclass ExtendedTimeMixin(TimeMixin):ExtendedTimeMixinas the mixin class for Epochs, Evoked, EpochsTFR, EvokedTFR, EDIT: and DipoleFixed. This means.decimatewill only exist for those, which I think was the intended effect..firstwas errantly being set on Epochs (this is an Evoked-only attribute)main)*TFR.shift_timewhich was available but untested onmainCloses #11797