NIRSpec

class stpsf.NIRSpec[source]

Bases: JWInstrument_with_IFU

A class modeling the optics of NIRSpec, in imaging mode.

This is not a substitute for a spectrograph model, but rather a way of simulating a PSF as it would appear with NIRSpec in imaging mode (e.g. for target acquisition). NIRSpec support is relatively simplistic compared to the other instruments at this point.

Relevant attributes include filter. In addition to the actual filters, you may select ‘IFU’ to indicate use of the NIRSpec IFU, in which case use the monochromatic attribute to set the simulated wavelength.

If a grating is selected in the pupil, then a rectangular pupil mask 8.41x7.91 m as projected onto the primary is added to the optical system. This is an estimate of the pupil stop imposed by the outer edge of the grating clear aperture, estimated based on optical modeling by Erin Elliot and Marshall Perrin.

Notes on IFU support:

Additional features for modeling NRS IFU PSFs are enabled by setting the .mode attribute to ‘IFU’.

The pipeline-output data products, assuming the ‘ifualign’ frame is used in the cube build step, which is rotated relative to the typical ‘sci’ output frame used in all other stpsf sim outputs. For convenience, for IFU-mode simulations an extra rotation is included in the PSF calculation such that the output product orientation matches the IFUalign s3d cube orientation. This happens automatically and transparently to the user (and source offset parameters, e.g. options[‘source_offset_x’] will automatically be interpreted as X and Y position in that output frame, including the effects of the rotation). If the rotation to ifualign frame is for some reason not desired, it can be disabled by setting nrs.options[‘ifualign_rotation’] = False

Attributes Summary

aperturename

SIAF aperture name for detector pixel to sky coords transformations

band

disperser

NIRSpec spectral dispersing element (grating or prism).

Attributes Documentation

aperturename

SIAF aperture name for detector pixel to sky coords transformations

band
disperser

NIRSpec spectral dispersing element (grating or prism). Only applies for IFU mode sims, currently; used to help set the wavelength range to simulate