Skip to content
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

JP-2113: Update NIRCam WFSS transforms for field dependence (v6) #124

Merged
merged 9 commits into from
Apr 19, 2023

Conversation

tapastro
Copy link
Collaborator

Resolves JP-2113
Resolves RCAL-nnnn

Closes #

This PR provides higher-order polynomial transform models for the NIRCam WFSS grisms. It has a coupled PR in jwst (spacetelescope/jwst#7018).

Checklist

  • added entry in CHANGES.rst (either in Bug Fixes or Changes to API)
  • updated relevant tests
  • updated relevant documentation
  • updated relevant milestone(s)
  • added relevant label(s)

@tapastro tapastro marked this pull request as draft February 17, 2023 17:42
@codecov
Copy link

codecov bot commented Feb 17, 2023

Codecov Report

Patch coverage: 3.20% and project coverage change: -1.15 ⚠️

Comparison is base (eb695dd) 65.03% compared to head (b0340d2) 63.88%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #124      +/-   ##
==========================================
- Coverage   65.03%   63.88%   -1.15%     
==========================================
  Files          99       99              
  Lines        5385     5486     +101     
==========================================
+ Hits         3502     3505       +3     
- Misses       1883     1981      +98     
Impacted Files Coverage Δ
...tamodels/jwst/transforms/converters/jwst_models.py 78.75% <0.00%> (-3.07%) ⬇️
src/stdatamodels/jwst/transforms/models.py 41.00% <3.38%> (-5.14%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@WilliamJamieson WilliamJamieson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed a potential issue with the proposed schema changes.

Basically one needs to check that currently written jwst files can be opened without issue with the changes proposed in this PR. If there are issues, then my suggestions below may help fix those problems.

Comment on lines +18 to +20
type: array
items:
type: object
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will likely be incompatible with existing files as they will contain a single instance of the object rather than an array containing a single object. This may cause a validation error when reading such files.

If there is a validation error with existing files then

Suggested change
type: array
items:
type: object
oneOf:
- type: object
- type: array
items:
type: object

Should resolve that error. This will apply to all the similar changes in this file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When written (a few months ago), there was no intent to preserve backwards compatibility as the prior versions were barely "science-valid". I don't know if this stance has changed, but other parts of the code are also implicitly backwards incompatible and would break if used with older references. Will be something to discuss once this is closer to review.

@@ -20,19 +20,22 @@ class NIRCAMGrismDispersionConverter(TransformConverterBase):
def from_yaml_tree_transform(self, node, tag, ctx):
from stdatamodels.jwst.transforms import models

_fname = getattr(models, node["class_name"])
_fname = getattr(models, node["model_type"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional changes maybe necessary if my suggested changes to the schema are needed. Namely, it may need to branch on single instances vs lists of instances.

@zacharyburnett zacharyburnett force-pushed the jp-2113-nircam-wfss-v6 branch from 4ea88ea to 0c4f917 Compare March 13, 2023 19:30
@tapastro tapastro force-pushed the jp-2113-nircam-wfss-v6 branch from 0c4f917 to 11511f4 Compare March 24, 2023 14:49
@tapastro tapastro force-pushed the jp-2113-nircam-wfss-v6 branch from e5acc82 to 731f972 Compare April 19, 2023 14:00
@tapastro tapastro marked this pull request as ready for review April 19, 2023 14:00
@tapastro tapastro requested a review from a team as a code owner April 19, 2023 14:00
Copy link
Collaborator

@nden nden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been in testing for quite some time now. I suggest we merge it so we can work out any issues in jwst.

@nden nden merged commit d06902b into spacetelescope:master Apr 19, 2023
@pllim
Copy link
Contributor

pllim commented Apr 25, 2023

I think this broke Jdaviz. See #159

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants