-
Notifications
You must be signed in to change notification settings - Fork 76
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
Update model fit result units after toggling flux/surface brightness #3113
Conversation
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.
Works great, thanks!
assert np.allclose(value[0], 4.800000041882413e-08) | ||
assert np.allclose(value[0], 8e-11) |
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.
wait, is this change expected? Is this because of the change to remove aperture_area_along_spectral
? (cc @bmorris3)
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.
I believe so, it looked like this value comes from code that would have been affected by that change.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3113 +/- ##
==========================================
+ Coverage 88.78% 88.90% +0.11%
==========================================
Files 111 111
Lines 17372 17378 +6
==========================================
+ Hits 15424 15450 +26
+ Misses 1948 1928 -20 ☔ View full report in Codecov by Sentry. |
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.
I noticed one small potential bug when testing this out - if you create several different components with different units in a mix of flux / SB, and then combine those to fit the model, you get a message in red text in the plugin saying that units are incompatible and to remove the offending components. this message lingers even after you remove them from the equation editor
also, in theory couldn't you convert a model component added when the display units are in SB back to flux or vise versa so model components created when the viewer was in flux or when the viewer was in SB can work together?
In theory yes, but that's outside the scope of this PR.
I'll look into this. |
@cshanahan1 The warning appears to be working properly for me, it disappears if you either delete the incompatible component from the plugin, or just delete it in the equation editor (video below is only the first case but it works for both). Screen.Recording.2024-07-29.at.7.26.17.AM.mov |
This PR makes the plotted model fit results update properly when toggling between flux and surface brightness. It also removes one use of
aperture_area_along_spectral
that was missed in #3088 that was leading to the converted model fit being incorrect.