-
Notifications
You must be signed in to change notification settings - Fork 26
Whitening Filter Threshold #1125
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
Conversation
garrettwrong
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking a crack at this. Two remarks are just follow up from yesterday, probably something was wrong with my suggestion, just lmk, thanks.
src/aspire/operators/filters.py
Outdated
|
|
||
| return result | ||
| # Recast result with correct dtype | ||
| return result.astype(self.xfer_fn_array.dtype) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See other remark, but if we still need this, lets make it copy=False. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need this (see comment below). I will make it copy=False. Thanks.
garrettwrong
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, like the test. Thank you.
|
Saw the unit test fail on the new platform. If it keeps coming up I'll look at it more. I don't think it has anything to do with your changes so I restarted it for you. |
This actually happened once before: https://github.com/ComputationalCryoEM/ASPIRE-Python/actions/runs/9565814400/job/26369634117#step:5:273 I'm going to take a quick look at it before I'm comfortable marking this ready. |
|
And it failed again. There's whitening involved here. Might just need to adjust the |
|
Added some |
|
@j-c-c , I'll run develop again now. |
Can follow here: If it fails, I can look at the env from 3 days ago and see if anything updated. |
It did not fail, so something about this PR is likely causing this behavior. Have you tried reverting that interp cast change? |
|
Ok @garrettwrong, looks like reverting to using the upcast worked. Everything should be good to go once CI passes. |
f837800 to
c2a1961
Compare
|
After discussion with Josh, this is going to get pushed to next release out of caution (and time constraints). The changes appear to be tickling some yet to be identified unstable code/bug. I'm not sure if it is this PR or something else, but the failures have not been reproduced outside this PR yet despite many runs. |
|
I removed the changes made to the I left the dtype pass-through test that I wrote for this, but xfailed for singles. I also left in some conversions to So ultimately, this PR contains only the addition of an epsilon argument used for configuring the |
garrettwrong
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick change, then will approve, thanks.
garrettwrong
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks!
|
@garrettwrong apparently the |
d9ec4d9 to
97bcede
Compare
|
I put it back and updated the branch. Just needed to use a slightly different syntax. Should be good to go. |
Ah, thank you! |
janden
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just one thing.
The current implementation of
whitenuses a slightly different threshold for zeroing out filter values when dividing by small numbers.This PR implements makes this value configurable with the same default threshold as matlab, namely sqrt(psd) < 100 * eps(src.dtype).