Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Fix bug with minimum phase filters #12507

Merged
merged 6 commits into from
Mar 19, 2024
Merged

Conversation

larsoner
Copy link
Member

Closes #12267

No need to wait for the SciPy PR I think since the tests there (and here, including the updated tutorial) show this works correctly.

@larsoner larsoner added this to the 1.7 milestone Mar 19, 2024
Comment on lines 3 to 4
compromised attenuation. Now ``phase="minimum"`` has the same length and comparable
suppression as ``phase="minimum"``, and the old (incorrect) behavior can be achieved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
compromised attenuation. Now ``phase="minimum"`` has the same length and comparable
suppression as ``phase="minimum"``, and the old (incorrect) behavior can be achieved
compromised attenuation. Now ``phase="minimum"`` has the same length and comparable
suppression as ``phase="zero"``, and the old (incorrect) behavior can be achieved

tautology; I think this is the right repair but @larsoner please confirm

Comment on lines 324 to 328
# that the falloff is not as steep (though here we use a temporary workaround
# version vendored by MNE until https://github.com/scipy/scipy/pull/19706 is
# merged and released):

h_min = signal.minimum_phase(h)
h_min = minimum_phase(h, half=False)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure we want to talk about "vendoring" in our tutorials. Seems like a detail users shouldn't need to know about. Maybe instead just mention which SciPy / MNE versions & params are necessary to get the correct behavior?

@larsoner
Copy link
Member Author

Fixed, can you see if the wording is good enough now @drammock ?

@drammock drammock enabled auto-merge (squash) March 19, 2024 16:42
@drammock drammock merged commit 415e7f6 into mne-tools:main Mar 19, 2024
30 checks passed
@drammock drammock deleted the minimum_phase branch March 19, 2024 17:27
snwnde pushed a commit to snwnde/mne-python that referenced this pull request Mar 20, 2024
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel McCloy <dan@mccloy.info>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential problem with causal filters
2 participants