-
Notifications
You must be signed in to change notification settings - Fork 180
Prevent VAR_RNOISE from being a zeroed array. #9813
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
Prevent VAR_RNOISE from being a zeroed array. #9813
Conversation
78dbec6 to
cba313e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9813 +/- ##
=======================================
Coverage 83.38% 83.38%
=======================================
Files 366 366
Lines 37771 37771
=======================================
Hits 31494 31494
Misses 6277 6277 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
pre-commit.ci autofix |
|
I took the liberty of asking the bot to fix pre-commit check failures. Hope you don't mind. Looking at what angered the bot, you might have to configure your editor to automatically delete trailing whitespace on save. FYI. |
2b90196 to
427d986
Compare
Thanks, @pllim! I will set my editor to take care of that, but I thought these simple style-check fixes were being taken care of during the pre-commit phase... apparently I'm wrong. |
da592ac to
aa9af83
Compare
The assertion error in the test was caused by an incorrect pixel_shape specification in the WCS. The test was setting result.meta.wcs.pixel_shape = data1.shape where data1.shape is in NumPy's (ny, nx) format (height, width), but WCS pixel_shape expects (nx, ny) format (width, height).
Removed commented-out code related to 'im.var_rnoise'.
for more information, see https://pre-commit.ci
aa9af83 to
32595dc
Compare
This PR updates a few unit tests to prevent
VAR_RNOISEfrom being a zeroed array (such edge case might need to be addressed eventually).For the following two unit tests, we increased the value of
im.var_rnoisefrom zero to 0.01:test_custom_wcs_resample_imaging;test_custom_refwcs_resample_imaging;Additionally, the error in
test_custom_refwcs_pixel_shape_imagingwas caused by an incorrectpixel_shapespecification in the WCS. The test was settingresult.meta.wcs.pixel_shape = data1.shapewheredata1.shapeis in NumPy's(ny, nx)format (height, width), but WCSpixel_shapeexpects(nx, ny)format (width, height). The test now correctly verifies that:This PR also contains a temporary change to pyproject.toml so that it can run against the
stcalchanges listed in PR #359.Note
This PR depends on changes in the following PR:
Regression tests
All the regression tests are passing:
Tasks
Build 12.0(use the latest build if not sure)no-changelog-entry-needed)changes/:echo "changed something" > changes/<PR#>.<changetype>.rst(see changelog readme for instructions)docs/pageokify_regteststo update the truth files