pynrc.simul.ngNRC.slope_to_fitswriter

pynrc.simul.ngNRC.slope_to_fitswriter(det, cal_obj, im_slope=None, cframe='det', filter=None, pupil=None, targ_name=None, obs_time=None, file_out=None, out_ADU=True, return_results=True, rand_seed=None, **kwargs)[source]

Simulate HDUList from slope image

FITSWriter-like output. DMS output has been depreceated and moved to slope_to_level1b and sources_to_level1b.

Parameters
  • det (Detector Class) – Desired detector class output

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

  • im_slope (ndarray) – Input slope image of observed scene. Assumed to be in detector coordinates. If an image cube, then number of images must match the number of integration (nint) in det class.

  • cframe (str) – Orientation of im_slope. Either ‘det’ or ‘sci’ coordinate frame.

  • filter (str) – Name of filter element for header

  • pupil (str) – Name of pupil element for header

  • targ_name (str) – Target name (optional)

  • obs_time (datetime) – Specifies when the observation was considered to be executed. If not specified, then it will choose the current time. This information is added to the header. Must be a datetime object:

    >>> datetime.datetime(2016, 5, 9, 11, 57, 5, 796686)
    
  • file_out (str or None) – Name (including directory) to save FITS file. If None, then won’t save; make sure to set return_results=True.

  • out_ADU (bool) – If true, divide by gain and convert to 16-bit UINT.

  • return_results (bool) – Return HDUList result? Otherwise,

Keyword Arguments
  • return_full_ramp (bool) – By default, we average groups and drop frames as specified in the det input. If this keyword is set to True, then return all raw frames within the ramp. The last set of nd2 frames will be omitted.

  • 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_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?

  • latents (None) – Apply persistence.

  • linearity_map (ndarray) – Add non-linearity.