pynrc.simul.ngNRC.sources_to_level1b

pynrc.simul.ngNRC.sources_to_level1b(source_table, nircam_obj, obs_params, tel_pointing, hdul_psfs=None, cal_obj=None, im_bg=None, out_ADU=True, save_dir=None, **kwargs)[source]

Simulate DMS HDUList from slope image

Requires input of obs_params input dictionary as generated from APT input files (see DMS_input class in apt.py).

Also, make sure the calib directory exists in PYNRC_PATH and is populated with detector calibration information.

Look at keyword args to exclude specific detector effects.

Output is saved to disk and will not be returned by the function.

Parameters
  • source_table (astropy Table) – Table of objects in across the region, including headers ‘ra’, ‘dec’, and object fluxes in NIRCam filter in vega mags where headers are labeled the filter name (e.g, ‘F444W’).

  • nircam_obj (pynrc.NIRCam) – NIRCam instrument class for PSF generation.

  • obs_params (dict) – Dictionary of parameters to populate DMS header. See create_obs_params in apt.py and level1b_data_model in dms.py.

  • tel_pointing (webbpsf_ext.jwst_point) – JWST telescope pointing information. Holds pointing coordinates and dither information for a given telescope visit.

  • cal_obj (pynrc.nircam_cal) – NIRCam calibration class that holds the necessary calibration info to simulate a ramp.

  • im_bg (None or ndarray) – Option to specify a pre-generated image (or single value) of the Zodiacal background emission. If not specified, then gets automatically generating.

  • save_dir (None or str) – Option to override output directory as specified in obs_params dictionary. If not specified as either a function keyword or in obs_params, then files are saved in current working directory.

Keyword Arguments
  • npsf_per_full_fov (int) – Number of PSFs across one dimension of the instrument’s field of view. If a coronagraphic observation, then this is for the nominal coronagrahic field of view.

  • sptype (str) – Spectral type, such as ‘A0V’ or ‘K2III’.

  • wfe_drift (float) – Desired WFE drift value relative to default OPD.

  • osamp (int) – Sampling of output PSF relative to detector sampling. If hdul_psfs is specified, then the ‘OSAMP’ header keyword takes precedence.

  • use_coeff (bool) – If True, uses calc_psf_from_coeff, other WebbPSF’s built-in calc_psf. Coefficients are much faster

  • Keywords (Ramp Gen) –

  • =================

  • include_dark (bool) – Add dark current?

  • include_bias (bool) – Add detector bias?

  • include_ktc (bool) – Add kTC noise?

  • include_rn (bool) – Add readout noise per frame?

  • include_cpink (bool) – Add correlated 1/f noise to all amplifiers?

  • include_upink (bool) – Add uncorrelated 1/f noise to each amplifier?

  • include_acn (bool) – Add alternating column noise?

  • apply_ipc (bool) – Include interpixel capacitance?

  • apply_ppc (bool) – Apply post-pixel coupling to linear analog signal?

  • include_refoffsets (bool) – Include reference offests between amplifiers and odd/even columns?

  • include_refinst (bool) – Include reference/active pixel instabilities?

  • include_colnoise (bool) – Add in column noise per integration?

  • col_noise (ndarray or None) – Option to explicitly specify column noise distribution in order to shift by one for subsequent integrations

  • amp_crosstalk (bool) – Crosstalk between amplifiers?

  • add_crs (bool) – Add cosmic ray events? See Robberto et al 2010 (JWST-STScI-001928).

  • cr_model (str) – Cosmic ray model to use: ‘SUNMAX’, ‘SUNMIN’, or ‘FLARES’.

  • cr_scale (float) – Scale factor for probabilities.

  • latents (None) – Apply persistence.

  • apply_nonlinearity (bool) – Apply non-linearity?

  • random_nonlin (bool) – Add randomness to the linearity coefficients?

  • prog_bar (bool) – Show a progress bar for this ramp generation?