-
Notifications
You must be signed in to change notification settings - Fork 18
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_dq improvement in findsat_mrt #201
Conversation
Lemme close/reopen and see. |
You can ignore the triage failure in this PR. That is my bad. |
just to put all comments in one space: I had asked what the triage step is and what might be causing it to fail |
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.
You do have a minimal test in https://github.com/spacetelescope/acstools/blob/master/acstools/tests/test_wfc_findsat_mrt.py . If you can expand your test suite to cover this new option, would prevent regression in the future, but I'll leave that up to you.
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 ran a few basic tests with different sizes of masks paired with ACS and WFC3 data. The results look good and make sense, except for the case when the mask is larger than the DQ array.
I'm unsure what to do about the error in the "Python 3.12 with remote data and dev dependencies" CI test:
Some new issue with skimage and satdet? |
You can ignore the devdeps failure for now. Maybe scikit-image nightly wheel needs time to catch up to numpy nightly wheel. With numpy 2.0 in beta now, hopefully soon. I'll give it a few days and up to a week. |
I've done the updates and am ready for this PR to be reviewed again. Thanks for the feedback so far! |
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.
Couple more very minor comments
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.
Happy with this!
@pllim The Wheel-building step is being skipped. Do we need to make sure that passes before merging this in? |
Does not hurt. I added the label to enable it. |
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.
Since Jenna approved, I have nothing much to add, except one Sphinx formatting fix.
Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>
Thanks, all! |
Description
This PR is to add in functionality to acstools.utils_findsat_mrt.updatedq to expand the input mask to match the size of the original DQ array if necessary. This is needed if a satellite trail was identified and masked on a binned image, which is common. Users could do this manually, but it is needed frequently enough that it made sense to include. This step has also been designed to handle images with odd dimensions,(e.g., WFC3/UVIS are 2051x4096) which ensures the code is applicable to other imaging data.
Warnings have been added into acstools.findsat_mrt.TrailFinder.rebin step to inform users if their data has odd dimensions and that rows/columns were being trimmed as needed to allow rebinning (this was happening already, but users may not have been aware). These trimmed rows/columns are added back in during the update_dq step after the satellite mask is enlarged.