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

WFR4+MIMF_KDP: add LookupTable optic class for Ball-delivered OPDs #328

Merged
merged 15 commits into from
Jul 20, 2021

Conversation

mperrin
Copy link
Collaborator

@mperrin mperrin commented Nov 27, 2019

Add a new optic class that reads OPDs from a lookup table provided by Ball, intended specifically for Wavefront Rehearsal 4 (WFR4) sim data generation in Nov/Dec 2019.

  • Reads OPDs from the FITS file I made from Acton's OPDs.
  • Determines the closest field point in that table to the chosen SI detector coordinates, and loads that OPD (Note, in general the field points used by Acton's ITM calc and by the webbpsf.psf_grid calc will not match exactly; this is a known source of imprecision / error in the sims currently. Good enough for now but may try to improve it eventually.
  • Adds in an extra 0.8 microns defocus to NIRISS, per Acton's intent for WFR4 sim scenario
  • Option to remove piston, tip, tilt from the OPDs, since ITM puts in some extra tip/tilt (maybe real, maybe sim artifact? Unclear at this time.)
  • Also small tweaks to the PSFs grid display function, to add a color bar and allow adjusting display scale.

This is not general-purpose, and more of a hack than usual in webbpsf... Not sure if I will actually merge this or not; we can just use this branch for the WFR4 sims.

See also the notebooks in /ifs/jwst/tel/wfr4_mirage_sims/phase_maps_from_ball/

FYI @obi-wan76 @Skyhawk172 @shanosborne

@coveralls
Copy link

Pull Request Test Coverage Report for Build 267

  • 5 of 77 (6.49%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.5%) to 42.964%

Changes Missing Coverage Covered Lines Changed/Added Lines %
webbpsf/gridded_library.py 1 6 16.67%
webbpsf/optics.py 4 71 5.63%
Totals Coverage Status
Change from base Build 265: -0.5%
Covered Lines: 2290
Relevant Lines: 5330

💛 - Coveralls

@mperrin mperrin force-pushed the import_ball_phasemaps branch from 8d7b09b to 64b4295 Compare March 2, 2020 21:34
@mperrin mperrin changed the base branch from master to develop March 2, 2020 21:34
@mperrin
Copy link
Collaborator Author

mperrin commented Mar 2, 2020

Rebased onto current develop.

@codecov
Copy link

codecov bot commented Mar 2, 2020

Codecov Report

Merging #328 (6da8ea5) into develop (5cdd41e) will decrease coverage by 1.47%.
The diff coverage is 4.50%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #328      +/-   ##
===========================================
- Coverage    64.06%   62.58%   -1.48%     
===========================================
  Files           11       11              
  Lines         4352     4456     +104     
===========================================
+ Hits          2788     2789       +1     
- Misses        1564     1667     +103     
Impacted Files Coverage Δ
webbpsf/opds.py 40.72% <ø> (-0.15%) ⬇️
webbpsf/optics.py 59.48% <3.80%> (-9.90%) ⬇️
webbpsf/gridded_library.py 77.31% <16.66%> (-0.66%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5cdd41e...6da8ea5. Read the comment docs.

@mperrin mperrin force-pushed the import_ball_phasemaps branch from 496777c to 6901f52 Compare March 2, 2020 22:47
@mperrin mperrin force-pushed the import_ball_phasemaps branch from 6901f52 to 4659e00 Compare May 27, 2020 17:27
@mperrin mperrin added the JWST Affects JWST models in WebbPSF label Jul 14, 2020
@mperrin
Copy link
Collaborator Author

mperrin commented Jan 5, 2021

This is old code, developed specifically for WFR4 as a short-term implementation, and is not nearly as rigorous as the subsequent implementations of better ways to exchange information between ITM and WebbPSF+MIRAGE. I don't see any need to keep or merge this branch so I'm going to close this PR.

@mperrin mperrin closed this Jan 5, 2021
@mperrin mperrin reopened this Feb 22, 2021
@mperrin
Copy link
Collaborator Author

mperrin commented Feb 22, 2021

Looks like we may need this again after all for the MIMF KDP simulation dataset...

@mperrin mperrin force-pushed the import_ball_phasemaps branch from 4659e00 to 57e3af4 Compare February 26, 2021 05:05
@mperrin
Copy link
Collaborator Author

mperrin commented Feb 26, 2021

Updated for 2021 March MIMF-2 Key Decision Point practice. See also notebooks in /ifs/jwst/tel/MIMF_KDP_Practice

@mperrin mperrin changed the title WFR4: add LookupTable optic class for Ball-delivered OPDs WFR4+MIMF_KDP: add LookupTable optic class for Ball-delivered OPDs Mar 1, 2021
@mperrin
Copy link
Collaborator Author

mperrin commented Jul 20, 2021

This functionality has been useful in enough team practices and LREs and may well be useful in the future at some point. Rather than keeping this PR open indefinitely I'm going to go ahead and merge.

This is an optional class, the use of which requires manually selecting it in to replace the default (as is done in the LRE and MIMF KDP notebooks). Merging it will have no impact on the results of other calculations with webbpsf.

@mperrin mperrin merged commit a3b94f6 into develop Jul 20, 2021
@mperrin mperrin deleted the import_ball_phasemaps branch July 20, 2021 18:37
mperrin added a commit to mperrin/webbpsf-st that referenced this pull request Jul 29, 2021
mperrin added a commit to mperrin/webbpsf-st that referenced this pull request Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JWST Affects JWST models in WebbPSF
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants