Authors: Jarron Leisenring (U. of Arizona, Steward Observatory)
Contributors: Everett Schlawin, Jonathan Fraine, Jonathan Aguilar
pyNRC is a set of Python-based tools for planning observations with JWST NIRCam, such as an ETC, a simple slope image simulator, and an enhanced data simulator compatible with the JWST pipeline.
While special attention has been placed on NIRCam coronagraphic modes, this package also works for a variety of NIRCam observing modes including:
- direct imaging
- coronagraphic imaging
- weak lens imaging
- slitless grism spectroscopy
- DHS observations (TBI)
All PSFs are generated by WebbPSF as implemented by the WebbPSF Extensions package to reproduce realistic JWST images and spectra.
Documentation can be found at https://pynrc.readthedocs.io.
Similar to some of its dependencies, pyNRC requires input data files in order to generate simulations. Due to the size of these files, they are not included with this source distribution. Please see the documentation for instructions on how to to download the required data files.
Warning
pyNRC enables more modes than are officially allowed by the Observatory, (ie., filter + coronagraphic combinations, subarray sizes, etc.). Just because you can do something with pyNRC does not mean it will be supported in flight. Check out JDocs for more information.
Simulating PSFs with WebbPSF can become computationally expensive if generating new ones on the fly, especially considering JWST PSFs vary with respect to wavelength, field position, and time-dependent wavefront error drift. In an effort to speed up this process, pyNRC uses WebbPSF to generate a series of monochromatic PSF simulations, then produces polynomial fits to each oversampled pixel. Storing the coefficients rather than a library of PSFS allows for quick creation (via matrix multiplication) of PSF images for an arbitrary number of wavelengths (subject to hardware memory limitations, of course). The applications range from quickly creating PSFs for many different stellar types over wide bandpasses to generating a large number of monochromatic PSFs for spectral dispersion.
In addition, each science instrument PSF is dependent on the detector position due to field-dependent wavefront errors. Such changes are tracked in WebbPSF, but it becomes burdensome to generate new PSFs from scratch at each location, especially for large starfields. Instead, these changes can be stored by the fitting the residuals of the PSF coefficients across an instrument's field of view, then interpolating for an arbitrary location. A similar scheme can be achieved for coronagraphic occulters, where the PSF changes as the source position moves with respect to the mask.
JWST's thermal evolution (e.g., changing the angle of the sunshield after slewing to a new target) causes small but significant distortions to the telescope backplane. WebbPSF has tools to modify OPDs, but high-fidelity simulations take time to calculate. Since the change to the PSF coefficients varies smoothly with respect to WFE drift components, it's simple to parameterize the coefficient residuals in a fashion similar to the field-dependence.