Package: pynrc
A JWST NIRCam ETC and SimulatorAuthors:Jarron Leisenring(U. of Arizona, Steward Observatory)Contributors:Everett Schlawin,Jonathan Fraine,Jonathan AguilarpyNRC 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 imagingcoronagraphic imagingweak lens imagingslitless grism spectroscopyDHS observations (TBI)All PSFs are generated byWebbPSFas implemented by theWebbPSF Extensionspackage to reproduce realistic JWST images and spectra.Documentation can be found athttps://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.WarningpyNRC 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 outJDocsfor more information.Simulating PSFsSimulating 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.Revision Historyv1.0.1 (Dec 14, 2021)Default OPD JWST_OTE_OPD_RevAA_prelaunch_predicted.fitsv1.0.0 (Nov 22, 2021)Updates to work with WebbPSF v1 release candidateMove PSF generation to newwebbpsf_extpackage (https://github.com/JarronL/webbpsf_ext)Create DMS-like level1b FITS files using pipeline data models for imaging and coronagraphyPSF coefficients now use Legendre polynomials by defaultCreate calibration files for each SCA (darks, IPC, noise, flats, linearity, etc)Background roll-off at grism edgesSIAF-aware locationsv0.9.0beta (no release)Updates to work with WebbPSF 0.9.0.Start working on commissioning and DMS-like dataAdd more advanced time-dependent detector effectsBEX model isochrones for low-mass companions from Linder et al (2019)There was a pandemic…v0.8.0beta (no release)Updates to work with WebbPSF 0.8.0.Phasing out support for Python 2Add info on saturation limits in terms of surface brightnessInclude option to create grism 2nd orderDetector pixel timing bugsField-dependent WFE extrapolated beyond FoV for better sampling diversityIncluded field-dependent WFE for coronagraphyAdded wavelength dispersion of LW coronagraphic PSFv0.7.0 (Jun 2018)Did not make it out of development before WebbPSF 0.8.0 release.Works with WebbPSF 0.7.0.Field-dependent WFEImage plane distortionsImplementedjwst_backgrounds(not required)v0.6.5 (Mar 2018)Fixed a critical bug where the off-axis PSF size was incorrect
when performing WFE drift calculations.v0.6.4 (Mar 2018)Off-axis PSFs now get drifted in the same way as their on-axis
counterparts.Created an intermediatenrc_hciclass to enable offsets of WFE drifted PSFs.v0.6.3 (Mar 2018)First PyPI release.Effectively the same as 0.6.2, but better documentation of packaging and distributing.v0.6.2 (Mar 2018)Implemented coronagraphic wedges, including arbitrary offsets along barRenamedobs_coronagraphyto~pynrc.obs_hciFaster modeling of off-axis PSFsInclude coronagraphic features (e.g.: ND squares) in slope imagesRoll subtracted images include option to use Roll1-Roll2Fixed bug that was slowing down PSF convolution of disksCan now generate docs directly from Jupyter notebooks using nbsphinx extensionCoronagraphic tutorials for docsCreate thesource_spectrumclass to fit spectra to observed photometry.v0.6.0 (Dec 2017)Support for Python 3 (mostlymap,dict, and index fixes)Updated code comments forsphinxandreadthedocsdocumentationCreatesetup.pyinstall fileModify grism PSF shapes due to aperture shapeDetector frames times based on ASIC microcode build 10Headers for DMS dataThree major changes to PSF coefficientscoefficients based on module (SWA, SWB, LWA, LWB), rather than filterWFE drift coefficient relationsfield-dependent coefficient relationv0.5.0 (Feb 2017)Initial GitHub releaseMatch version numbering toWebbPSFequivalentND Acquisition modeRamp settings optimizerCan now simulate ramps with detector noiseQuery Euclid’s IPAC server for time/position-dependent Zodiacal emissionAdded example Jupyter notebooksv0.1.2 (Jan 2017)Observations subclass for coronagraphs and direct imagingv0.1.1 (Sep 2016)Add support for LW slitless grismAdd support for extended sourcesv0.1.0 (Aug 2016)Rewrite ofSimNRCand renamepynrcObject orientedmultiaccum,DetectorOps, andNIRCamclassesCreate separate detector instances inNIRCamclass