-
Notifications
You must be signed in to change notification settings - Fork 21
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-965 Provide conversion from TVAC/FPS models to ScienceRawModel #455
base: main
Are you sure you want to change the base?
RCAL-965 Provide conversion from TVAC/FPS models to ScienceRawModel #455
Conversation
for more information, see https://pre-commit.ci
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #455 +/- ##
==========================================
- Coverage 97.56% 97.12% -0.44%
==========================================
Files 30 37 +7
Lines 2788 3341 +553
==========================================
+ Hits 2720 3245 +525
- Misses 68 96 +28 ☔ View full report in Codecov by Sentry. |
raw = mk_level1_science_raw(shape=model.shape) | ||
|
||
# Define how to recursively copy all attributes. | ||
def node_update(raw, other): |
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.
Does this address the schema differences?
For example, romancal expects meta.guide_star.window_xstart
:
https://github.com/spacetelescope/romancal/blob/8422362dc33e0d4b3dc6702274b07c740acda37c/romancal/dq_init/dq_init_step.py#L55 (it's probably a bug that it gets this from the input and not the RampModel but either way).
This is ok for the current guidestar schema:
https://github.com/spacetelescope/rad/blob/50958b8991c38ab0071b8a1e9b2297e329444a1b/src/rad/resources/schemas/guidestar-1.0.0.yaml#L76
but the TVAC guidestar schema doesn't contain that data (it appears to be gw_window_xstart
:
https://github.com/spacetelescope/rad/blob/50958b8991c38ab0071b8a1e9b2297e329444a1b/src/rad/resources/schemas/tvac/guidestar-1.0.0.yaml#L57
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 is a good point! Guiding stuff was not such a concern, but will go through and take a closer look. Got any good schema differs?
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 haven't used any schema differs before but would be curious if you find one you like.
Just trying to figure out how this works... if I do strun roman_elp tvac.asdf, when or where does from_tvac_raw get called? Re schema differences, I think we should try to hit the things that romancal looks for but we don't need to copy everything over just because. The guide window xstart is an interesting case. romancal looks for it, but TVAC doesn't actually use guide windows and so if the code runs I would be fine with it without messing with guide window things. |
Resolves RCAL-965
This PR addresses the issue that TVAC/FPS data cannot be run through the pipeline, mostly due to the fact that the TVAC-related datamodels are frozen. A new method,
ScienceRawModel.from_tvac_raw
is introduced to do the conversion.Tasks
roman_datamodels
tests.docs/
page.no-changelog-entry-needed
.)changes/
:echo "changed something" > changes/<PR#>.<changetype>.rst
(see below for change types).romancal
regression test (https://github.com/spacetelescope/RegressionTests/actions/workflows/romancal.yml) with this branch installed ("git+https://github.com/<fork>/rad@<branch>"
).News fragment change types:
changes/<PR#>.feature.rst
: new featurechanges/<PR#>.bugfix.rst
: fixes an issuechanges/<PR#>.doc.rst
: documentation changechanges/<PR#>.removal.rst
: deprecation or removal of public APIchanges/<PR#>.misc.rst
: infrastructure or miscellaneous change