-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Fix for Astropy v7.0 incompatibility (#229) #232
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #232 +/- ##
==========================================
- Coverage 83.36% 83.33% -0.03%
==========================================
Files 13 13
Lines 1136 1140 +4
==========================================
+ Hits 947 950 +3
- Misses 189 190 +1 ☔ View full report in Codecov by Sentry. |
Please rebase to pick up the other CI fix. |
The broader question, though, is whether specreduce should still be using a fitter that is no longer recommended by core astropy library (astropy/astropy#16983). |
…es of 'assert_allclose'.
…e' tests again. They don't matter in practise when we set the absolute tolerances to 0.05 pix.
8905657
to
8e5baae
Compare
It probably shouldn't. Fixing this should be relatively trivial, and I can do it either in this PR or a separate one. |
Actually I am wondering also if relaxing tolerance is even needed if you switch fitter class. |
…ropy.modeling.fitting.LevMarLSQFitter` in `specreduce.tracing.FitTrace`.
It seems still to be required. I've changed the fitter and run the tests, and the results still differ slightly (at a 0.01-pixel level). |
The change to Any preferences? Considering the future, I'd prefer to go with |
I'll defer to specreduce maintainers on which fitters to replace the old one with. Thanks! |
…g a linear trace model.
Any opinions, @cshanahan1, @kecnry, @tepickering? I think we can adopt |
Also astropy 7.0 is already released, so this is a 🔥 now. If you don't hear back, I'd say you make a decision in your role as project manager and ping me to merge since I don't think you can merge yet? |
agreed this is top priority to fix ASAP. i'd go ahead and make the switch to |
… when modeling the peak as a gaussian.
…an_cols because the truth values were calculated with a different fitting method.
Thanks @tepickering! I've changed the fitting method and also added a check to use @pllim, this PR should be ready to merge now. I haven't been granted a maintainer status quite yet, but the two-week comment period is over now without any opposing comments (astropy/astropy.github.com#639), so this should change soon. |
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!
Does this need a change log? |
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 catching all this! i like adding the checks to help choose the optimal fitter.
i think so since it's a pretty significant change to how model fitting is done. once that's added, i can go ahead and merge. |
Good point! I've added the changes to the change log under v1.4.2. |
Since Tim said he would merge, I'll give him the honors. But if he is MIA, please ping me again because I can also merge but would rather let package maintainers do this. Thanks, all! |
This PR fixes Issue #229 by increasing the absolute and relative tolerances of
assert_allclose
intest_fit_trace_all_nan_col
. An absolute tolerance of 0.05 pixels should be sufficient to test that the tracing methods work correctly but leave enough room for any minor variations in the results caused by the changes in the LevMarLSQFitter between Astropy v6 and v7.Fix #229