NIRCam

class webbpsf.NIRCam[source]

Bases: JWInstrument

A class modeling the optics of NIRCam.

Relevant attributes include filter, image_mask, and pupil_mask.

The NIRCam class is smart enough to automatically select the appropriate pixel scale for the short or long wavelength channel based on the selected detector (NRCA1 vs NRCA5, etc), and also on whether you request a short or long wavelength filter. The auto-selection based on filter name can be disabled, if necessary, by setting auto_channel = False. Setting the detector name always toggles the channel regardless of auto_channel.

Note, if you use the monochromatic option for calculating PSFs, that does not invoke the automatic channel selection. Make sure to set the correct channel prior to calculating any monochromatic PSFs.

Similarly, SIAF aperture names are automatically chosen based on detector, filter, image mask, and pupil mask settings. The auto-selection can be disabled by setting auto_aperturename = False. SIAF aperture information is mainly used for coordinate transformations between detector science pixels and telescope V2/V3.

Special Options: The ‘bar_offset’ option allows specification of an offset position along one of the coronagraph bar occulters, in arcseconds. ` nc.image_mask = 'MASKLWB' nc.options['bar_offset'] = 3 # 3 arcseconds towards the right (narrow end on module A) `

Similarly, the ‘coron_shift_x’ and ‘coron_shift_y’ options will offset the mask in order to produce PSFs centered in the output image, rather than offsetting the PSF. This is useful for direct PSF convolutions of an image. Values are in arcsec. These options move the mask in the opposite sense as nc.options[‘bar_offset’]. ` nc.options['coron_shift_x'] = 3  # Shifts mask 3" to right, equivalent to source 3" to left. `

The ‘nd_squares’ option allows toggling on and off the ND squares for TA in the simulation. Note that these of course aren’t removable in the real instrument; this option exists solely for some simulation purposes.

Attributes Summary

LONG_WAVELENGTH_MAX

LONG_WAVELENGTH_MIN

SHORT_WAVELENGTH_MAX

SHORT_WAVELENGTH_MIN

aperturename

SIAF aperture name for detector pixel to sky coords transformations

channel

detector

Detector selected for simulated PSF

filter

Currently selected filter name (e.g. F200W).

image_mask

Currently selected image plane mask, or None for direct imaging

module

pupil_mask

Currently selected Lyot pupil mask, or None for direct imaging

Attributes Documentation

LONG_WAVELENGTH_MAX = 5.299999999999999e-06
LONG_WAVELENGTH_MIN = 2.35e-06
SHORT_WAVELENGTH_MAX = 2.35e-06
SHORT_WAVELENGTH_MIN = 6e-07
aperturename

SIAF aperture name for detector pixel to sky coords transformations

channel
detector

Detector selected for simulated PSF

Used in calculation of field-dependent aberrations. Must be selected from detectors in the detector_list attribute.

filter

Currently selected filter name (e.g. F200W)

image_mask

Currently selected image plane mask, or None for direct imaging

module
pupil_mask

Currently selected Lyot pupil mask, or None for direct imaging