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

Update AMI NRM geometry #8772

Open
stscijgbot-jp opened this issue Sep 11, 2024 · 4 comments
Open

Update AMI NRM geometry #8772

stscijgbot-jp opened this issue Sep 11, 2024 · 4 comments

Comments

@stscijgbot-jp
Copy link
Collaborator

stscijgbot-jp commented Sep 11, 2024

Issue JP-3739 was created on JIRA by Rachel Cooper:

For build 11.2, update the use of the NRM reference file in AmiAnalyze.

  • Replace hardcoded mask hole centers, other pupil geometry constants with those in NRMModel. Replace mask_definitions.py with mask_definition_ami.py, removing references to NRMs on other telescopes and simplifying the code but retaining the same structure as the existing class.
  • A special input argument for affine2d, 'commissioning', will be the new default, using the commissioning affine parameters for the analytical form of the mask (rather than distortion-free or rotation-only).
  • Rename the lg_model.NrmModel to lg_model.LgModel to avoid confusion with stdatamodels' NRMModel.
@stscijgbot-jp
Copy link
Collaborator Author

Comment by David Law on JIRA:

Rachel Cooper What exactly is involved in this?  It sounds like hole coordinates are hard-coded in jwst, is the intent to replace them with use of reference files (new or just updated?) or change the hard-coded values?  Are the new values known and ready to go?

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Rachel Cooper on JIRA:

Hi David Law, currently the hole coordinates are indeed hard-coded in AMI3 ([https://github.com/spacetelescope/jwst/blob/master/jwst/ami/mask_definitions.py)] but they are also duplicated in the header of the recently created NRM reference file, so I think it would probably be better practice to read them from the reference file instead. First I need to calculate the updated coordinates using the distortion matrix that was derived during commissioning, then update the existing reference file with a mask model made using those coordinates (and store them in the header), and then update the jwst code to use those values rather than the mask_definitions.py ones. It might take a little thought as to the best way to modify the code to do this just due to how it's currently set up, but I don't think it will be too involved.

@stscijgbot-jp
Copy link
Collaborator Author

Comment by David Law on JIRA:

Assigning to the NIRISS team to sort out final details, though it sounds like that should be straight forward.  Rachel Cooper I concur that reading coordinates from the reference file would be better practice than hard-coding duplicates that can drift out of sync.  Once everything is set on the NIRISS side we can loop in Tyler Pauly to discuss best path implementation.

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Rachel Cooper on JIRA:

Draft PR opened here: #8974 Will open it for review after #8846 (JP-3718) is merged. 
I re-ran our AMI science readiness commissioning analysis and found that just updating the mask did not make a significant change in the contrast limits, however it does reduce the maximum residual in the image plane model fitting. 

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

No branches or pull requests

1 participant