-
Notifications
You must be signed in to change notification settings - Fork 28
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
RCAL-751 Create FluxStep to apply the flux correction to Level 2 data. #1120
Conversation
Of the functional items still needed, the main one is ensuring file naming is correct if step results are saved. There is also documentation and a regression test needed. However, the main code is ready for initial review. The main design point that needs to be considered is that, currently, there is no optimization concerning memory management. I believe there are still larger discussions on the best solutions for this, so I have left the code dead-simple: All is presumed in-memory and the input model(s) are modified in-place. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1120 +/- ##
==========================================
+ Coverage 76.84% 76.86% +0.01%
==========================================
Files 105 107 +2
Lines 7053 7101 +48
==========================================
+ Hits 5420 5458 +38
- Misses 1633 1643 +10
*This pull request uses carry forward flags. Click here to find out more. ☔ 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.
This looks good. Have you verified that if you plug it into the HLP and feed it an association that it does the right thing, calibrating the images and then later steps seeing those calibrated images?
The step probably needs to be registered here:
Line 16 in 78532b9
from .resample.resample_step import ResampleStep |
and get some short docs.
I'm still hung up by the fact that I think the one time I used the HLP the model container contained a list of file names rather than a list of in-memory models, and so used this branch
https://github.com/spacetelescope/romancal/blob/main/romancal/datamodels/container.py#L211
where it's not clear to me that anything would get saved. Maybe not part of this PR, but it would be good if you could figure out how to call the pipeline in a way such that this step would work.
I imagine that the sky subtraction & outlier detection steps are in a similar situation, but I am not sure.
HLP has some implementation issues. In its current form, it can only operate if all is in-memory and the steps work on the data in-place, and that is just to get around the syntax issues; see how Workin' it... |
42a4a0c
to
1c7e4ec
Compare
Status: Main work is complete, I believe. Two outstanding issues to be discussed: Unit change of Level 2: The presumption here is still HLP: Between RCAL-777 and other structure/memory-related discussions, I have done minimal updates and xfailed the related test. I would suggest disconnecting any further HLP work from this PR and leave it for other issues + PR's. |
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, this looks good. The diff is a little hard to read because somehow all of Nadia's doc changes got in there too?
My understanding from the RCAL-777 discussion is that Dave has an invocation that disables step pars that should work, so let's not let that make us set an xfail.
a55e1b4
to
bc44f44
Compare
for more information, see https://pre-commit.ci
Side effect is the removal of the alias. This can be re-introduced if felt necessary by the developers.
requires roman_datamodels with PR#322 merged.
for more information, see https://pre-commit.ci
HLP cannot actually run due to various issues. Just the basic framework has been added and a skeleton regression test written.
for more information, see https://pre-commit.ci
bc44f44
to
f478e76
Compare
for more information, see https://pre-commit.ci
I have left units at e/s, just for test/validation to pass. However, if merged before the unit change is in, all that needs to change is this line. |
This looks good to me. Dave indicates in the rcal-777 discussion that you should be able to get the hlp test to pass with an invocation along the lines of |
This reverts commit 93f724c.
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.
LGTM, thanks!
Errors are due to the unit change for Level 2 from e/s to DN/s. This should resolve with the recent rad/rdm merges. |
Resolves RCAL-751
This PR implements the flux correction to convert from native Level 2 electrons/s units to MJy/sr.
Checklist
CHANGES.rst
under the corresponding subsection