soxs_mdark

Every raw CCD image contains counts resulting from a ‘dark current’, electrons released due to the thermal effects in the CCD material. For both the UVB-VIS (< 0.00012 e-/s/pixel) and NIR detectors (< 0.005 e-/s/pixel) the dark-current is almost negligible. Not all pixels will have the same dark-current, some will have a high than typical current. These are so-called ‘hot-pixels’ and it’s important that these are identified and recorded (using the create_noise_map utility).

The purpose of the soxs_mdark recipe is to generate a master-dark frame used to remove flux attributed to the dark-current from other frames.

Input

Data Type Content Related OB
FITS images raw dark frames (exposures with identical exposure time and detectors readout parameters) SOXS_gen_cal_VISDark, SOXS_gen_cal_NIRDark, SOXS_img_cal_Dark

Parameters

Parameter Description Type Entry Point Related Util
frame-clipping-sigma number of σ from the median frame flux beyond which pixel is added to the bad-pixel mask float settings file

clip_and_stack

clipping-iteration-count number of sigma-clipping iterations to perform when added pixels to the bad-pixel mask int settings file

clip_and_stack

stacked-clipping-sigma number of σ deviations from the median pixel flux beyond which pixel is excluded from stack float settings file

clip_and_stack

stacked-clipping-iterations number of σ-clipping iterations to perform before stacking float settings file

clip_and_stack

Method

Stack raw dark-frames together (using the clip_and_stack utility) into master-dark frames and in the process clipping rogue pixels from the individual raw frames and reducing the read-noise contribution.

Output

Data Type Content
master dark frame frame containing typical dark-current flux accumulated over the exposure time of the input frames

QC Metrics

Metric Description
TBC

Recipe API

class soxs_mdark(log, settings=False, inputFrames=[], verbose=False, overwrite=False)[source]

The soxs_mdark recipe

Key Arguments

  • log – logger

  • settings – the settings dictionary

  • inputFrames – input fits frames. Can be a directory, a set-of-files (SOF) file or a list of fits frame paths.

  • verbose – verbose. True or False. Default False

  • overwrite – overwrite the prodcut file if it already exists. Default False

Usage

from soxspipe.recipes import soxs_mdark
mdarkFrame = soxs_mdark(
    log=log,
    settings=settings,
    inputFrames=fileList
)..produce_product()

Todo

  • add a tutorial about soxs_mdark to documentation

verify_input_frames()[source]

verify input frame match those required by the soxs_mdark recipe

If the fits files conform to required input for the recipe everything will pass silently, otherwise an exception shall be raised.

produce_product()[source]

generate a master dark frame

Return:
  • productPath – the path to master dark frame