mperrin / webbpsf

James Webb Space Telescope PSF simulation tool - NOTE THIS VERSION OF REPO IS SUPERCEDED BY spacetelescope/webbpsf
BSD 3-Clause "New" or "Revised" License
16 stars 15 forks source link

Added utils.py functions to load WAS OPD #208

Closed Skyhawk172 closed 6 years ago

Skyhawk172 commented 6 years ago

Added utils.py functions to load WAS OPD and interpolate them to WebbPSF's expected size.

Just change the instrument OPD like so:

nrc.pupilopd = webbpsf.utils.load_was_opd(nrc, fitsfile)

where "fitsfile" is the input WAS OPD. Then, create a PSF like you normally do.

Please let me know if you think there is better place for these two functions to live.

Skyhawk172 commented 6 years ago

I made the recommended changes, along with a few bug fixes and additions. The functions now live in webbpsf_core.py, under the JwstInstrument class.