Weekdark

Functions to create weekly superdarks for the STIS instrument.

refstis.weekdark.create_superdark(crj_filename, basedark)[source]

Create a superdark from the crj and basedark

Create the science portion of the forthcoming reference dark by adding the ‘only baseline dark current’ image to the ‘only hot pixels’ image.

Note

input file will be updated in-place.

Parameters
  • crj_filename (str) – filename of the cosmic-ray rejected file

  • basedark (str) – basedark name

refstis.weekdark.make_weekdark(input_list, refdark_name, thebasedark, thebiasfile=None)[source]

Create a weekly dark reference file

  1. If not already done, run basic2d with blevcorr, biascorr, and dqicorr set to perform

  2. Apply temperature correction to the data

  3. split all raw images into their imsets

  4. join imsets together into a single file

  5. combine and cr-reject

  6. normalize to e/s by dividing by (exptime/gain)

  7. do hot pixel things

Note

Update ERR extension of new superdark by assigning the ERR values of the basedark except for the new hot pixels that are updated from the weekly superdark, for which the error extension of the weekly superdark is taken.

Parameters
  • input_list (list) – list of input STIS dark files

  • refdark_name (str) – output name of the reference dark file

  • thebasedark (str) – Monthly basedark

  • thebiasfile (str, bool, optional) – biasfile to use for calibration