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 \(\rm{e^{-}/s/pixel}\)) and NIR detectors (< 0.005 \(\rm{e^{-}/s/pixel}\)), the dark current is almost negligible. Not all pixels will have the same dark current, with some pixels having a higher-than-typical current. These are so-called ‘hot-pixels’, and these must be 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.

Usage

The soxs_mdark recipe can be run with the following convention:

soxspipe [-Vx] mdark <inputFrames> [-o <outputDirectory> -s <pathToSettingsFile>]

To rerun a previously executed soxs_mdark recipe, you can find the execution command at the end of the recipe log file (found in the workspace products/soxs_mdark directory). Use the -x flag to overwrite the product files if they already exist. For example, from the root of your workspace, you would run a command like:

soxspipe mdark sof/20260111T082924_NIR_3_MDARK_5_0S_SOXS.sof -s ./sessions/base/soxspipe.yaml  -x

To adjust the default settings for the soxs_mdark recipe, open the soxspipe.yaml file referenced in the command above in a text editor, navigate to the soxs_mdark dictionary, save the file and rerun the recipe command. The settings’ descriptions can be found in Table 5.

Product files are written in the products/soxs_mdark, and QC plots are in the qc/soxs_mdark workspace directory. A report of the product files, QC plots and metrics is also printed to the terminal. The QC metrics calculated for soxs_mdark are found in Table 8.

Reduction Tips

As with soxs_mbias, the soxs_mdark recipe is one of the simpler recipes, and therefore, it is typically very robust against failures. To reduce the time it takes to run the recipe (at the expense of allowing a few more outlying pixels into your master bias frame), you can experiment with reducing both frame-clipping-iterations and stacked-clipping-iterations (although speed gains will be very moderate).

Parameters

Table 5 The soxs_mdark recipe parameters.

Parameter

Description

Type

Entry Point

Related Util

frame_clipping_sigma

number of \(\sigma\) from the median frame flux beyond which pixel is added to the bad-pixel mask

float

settings file

clip_and_stack

frame_clipping_iterations

number of \(\sigma\)-clipping iterations to perform when adding pixels to the bad-pixel mask

int

settings file

clip_and_stack

stacked_clipping_sigma

number of \(\sigma\) deviations from the median pixel flux beyond which pixel is excluded from stack

float

settings file

clip_and_stack

stacked_clipping_iterations

number of \(\sigma\)-clipping iterations to perform before stacking

int

settings file

clip_and_stack

Input

Table 6 Input files for the soxs_mdark recipe. The files are typically passed to the soxs_mdark recipe via a set-of-file (sof) file listing one file per line.

Data Type

Content

Related OB

Min. Frame Count

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

3

Output

Table 7 Output files for the soxs_mdark recipe and their respective ESO PRO keywords.

Label

Content

Data Type

PRO CATG

PRO TYPE

PRO TECH

MDARK

Master dark frame (frame containing typical dark-current flux accumulated over the exposure time of the input frames)

FITS image

DARK_<ARM>

REDUCED

IMAGE

QC Metrics

Table 8 Quality Control metrics calculated in the soxs_mdark recipe.

Label

Description

Unit

Acceptable Range

HOTPIX FRAC

Fraction of hot pixels

-

-

MDARK MEDIAN

Median flux level of master dark

electrons

NIR: [-15, 50]

HOTPIX NUM

Number of hot pixels

-

-

RAW RON

RON in single DARK

electrons

NIR: [0,30]