pynrc.nrc_utils.grism_background

pynrc.nrc_utils.grism_background(filter, pupil='GRISM0', module='A', sp_bg=None, orders=[1, 2], wref=None, upper=9.6, **kwargs)[source]

Returns a 1D array of grism Zodiacal/thermal background emission model, including roll-off from pick-off mirror (POM) edges. By default, this includes light dispersed by the 1st and 2nd grism orders (m=1 and m=2).

For column dipsersion, we ignore the upper region occupied by the coronagraphic mask region by default. The preferred way to include this region is to add the dispersed COM image from the grism_background_com function to create the full 2048x2048 image. Or, more simply (but less accurate) is to set an upper value of 31.2, which is the approximately distance (in arcsec) from the top of the detector to the top of the coronagraphic field of view.

Parameters
  • filter (str) – Name of filter (Long Wave only).

  • pupil (str) – Either ‘GRISM0’ (‘GRISMR’) or ‘GRISM90’ (‘GRISMC’).

  • module (str) – NIRCam ‘A’ or ‘B’ module.

  • sp_bg (pysynphot.spectrum) – Spectrum of Zodiacal background emission, which gets multiplied by bandpass throughput to determine final wavelength-dependent flux that is then dispersed.

  • orders (array-like) – What spectral orders to include? Valid orders are 1 and 2.

  • wref (float or None) – Option to set the undeviated wavelength, otherwise this will search a lookup table depending on the grism.

  • upper (float) – Set the maximum bounds for out-of-field flux to be dispersed onto the detector. By default, this value is 9.6”, corresponding to the bottom of the coronagraphic mask. Use grism_background_com to then include image of dispersed COM mask. If you want something simpler, increase this value to 31.2” to assume the coronagraphic FoV is free of any holder blockages or substrate and occulting masks.

Keyword Arguments
  • zfact (float) – Factor to scale Zodiacal spectrum (default 2.5).

  • ra (float) – Right ascension in decimal degrees

  • dec (float) – Declination in decimal degrees

  • thisday (int) – Calendar day to use for background calculation. If not given, will use the average of visible calendar days.