8. CALIBRATION

In this section bias-, dark- and flatfield-correction take place.

_images/section_cal.png

8.1. Process BIASes / Process DARKs

Bias and dark images are overscan corrected and median combined without rescaling. At least 3 exposures are needed in order to reject spurious events such as cosmics. We recommend at least 10 exposures in order to keep the noise low.

The master bias and dark have the same name as the directory in which the individual frames reside, for example:

MYBIAS/MYBIAS_1.fits
MYDARK/MYDARK_1.fits

8.1.1. Options

Specify a lower and upper threshold in the min and max fields. Exposures with a statistical mode outside this interval are rejected from the processing and are moved to a BADMODE sub-directory.

8.1.2. Parameters

\,

_images/theli_param_nlnh_bias.png _images/theli_param_nlnh_dark.png
  • nlow: The number of lowest pixels in the stack (overscan and bias) to be rejected. Default: 0
  • nhigh: The number of highest pixels in the stack (overscan and bias) to be rejected. Default: 1

8.2. Process flats

Flat-field exposures are overscan corrected, have the master bias subtracted, are rescaled to the same statistical mode, and then median combined. Different gains in multi-chip cameras are preserved, thus after applying the master flat, gain differences in the target exposures are corrected for. At least 3 flat field exposures are needed, but we recommend to go for 5-10. The illumination level of individual exposures should stay clear from the on-set of any non-linearities.

THELI automatically subtracts a master bias from the master flat. If you do not have a master bias or do not want this correction to take place, then set the Do not apply bias switch at the top of the Calibration section.

The master flat has the same name as the directory in which the individual flat frames reside, for example:

MYFLAT/MYFLAT_1.fits

If the user also specified a DARK FLAT (Flat off in the Initialise section), i.e. a flat field with low illumination, then these exposures will be treated in the same way as the normal flat field. The resulting combined dark flat field will be subtracted from the bright flat, the name of the final flat field will be the same as the one without this correction. The original bright flat can still be found in the normal FLAT directory. This approach is commonly used for near-IR observations to remove thermal background from the flat field data. It depends on the instrument and the way the dark flats were taken whether this makes improves the data (more homogeneous photometric zeropoint) or not.

8.2.1. Options

Specify a lower and upper threshold in the min and max fields. Exposures with a statistical mode outside this interval are rejected from the processing and are moved to a BADMODE sub-directory. This is useful to reject under- or overexposed flats.

8.2.2. Parameters

\,

_images/theli_param_nlnh_flat.png
  • nlow: The number of lowest pixels in the stack (overscan and flat) to be rejected. Default: 0
  • nhigh: The number of highest pixels in the stack (overscan and flat) to be rejected. Default: 1

8.3. Calibrate data

Images are overscan corrected, debiased (or dark-subtracted) and flat fielded.

Filename extension: After running through this step, images have the string OFC in their file name between the chip number and the suffix, e.g.:

NGC1234_1OFC.fits

8.3.1. Options

Specify a lower and upper threshold in the min and max fields. Exposures with a mode outside this interval are rejected from the processing and are moved to a BADMODE sub-directory. If left empty, no thresholding will be done.

Do not apply BIAS / DARK: If you work with near-IR data, you probably do not want to subtract a master bias as the so-called pre-read has already been subtracted. If you do not have a master bias or master dark, you also have to activate this switch.

Do not apply FLAT: Activate this switch if you do not want to calibrate your target exposures by a flat field. Mid-IR observers possibly want to do that, or e.g. if you are feeding THELI some pre-processed data from another instrument.

Use DARK: If you want to subtract a master DARK instead of the master BIAS, then indicate this here.

8.3.2. Dark rescaling

If you subtract a master dark from the data, then THELI looks up the dark’s exposure time. If the latter deviates by more than 1% from the exposure time of the SCIENCE images, then the master dark is rescaled accordingly. Thus you can subtract a high S/N masterdark with longer exposure time, introducing less noise in the calibrated target frames.

If your camera does not have an overscan, then the bias offset is still present in the master dark. The offset would be rescaled, hence adding a constant to the sky background of the target images. While this as such is not critical because the background will be subtracted anyway, it would modify the sky background statistics (which is not used by THELI, but you might be interested in it). To avoid this, the mode of the master dark is subtracted before a rescaling takes place. For cameras with overscan this correction has no effect as the mode is essentially zero after overscan correction took place.

Note

THELI does not perform a temperature rescaling of the master dark. If the dark current in your camera is temperature dependent, then make sure the darks are taken with identical settings. You can also attempt to manually rescale the dark frames in a trial and error manner.

8.3.3. Calibration parameters

\,

_images/theli_param_nlnh_science.png
  • nlow: The number of lowest pixels in the overscan stack to be rejected. Default: 0
  • nhigh: The number of highest pixels in the overscan stack to be rejected. Default: 1

8.4. Non-linearity correction

Non-linearity usually arises when pixels approach their saturation limit and do not response in a linear manner anymore to the incoming flux. In some cases, e.g. near-IR detectors, non-linearities can also appear at very low exposure levels.

8.4.1. Implementation for new instruments

THELI can correct for the detector non-linearity provided that corresponding correction polynomials are known. Currently, this is only being implemented for GSAOI@GEMINI, WFC@INT and SPARTAN@SOAR. The correction is of the following form,

I_{corrected} = a_0 + a_1\times I_0 + a_2 \times I_0^2 + a_3 \times I_0^3

where I_0 and I_{corrected} are the uncorrected and corrected images, respectively.

If you know the correction polynomial for an instrument called SOME_INSTRUMENT in THELI, then add the polynomial coefficients to a file SOME_INSTRUMENT.nldat and save it in the same place as SOME_INSTRUMENT.ini, i.e. in one of

/home/user/THELI/gui/scripts/instruments_professional/
/home/user/.theli/instruments_user/

Each chip of the camera is represented in SOME_INSTRUMENT.nldat by a single line containing the four polynomial coefficients

a_0\;\;a_1\;\;a_2\;\;a_3

Unknown coefficients must be set explicitly to zero. For example, if the correction polynomial is of 2nd order, then you must set a_3 = 0.0.

8.4.2. How THELI does it

In order to fully correct for non-linearity, one must :

  1. Subtract the master bias from the flat exposures
  2. Apply the non-linearity correction to the debiased flat fields
  3. Create the master flat
  4. Subtract the bias/dark from the science data
  5. Apply the non-linearity correction to the debiased science data
  6. Apply the corrected flat field

This processing scheme is significantly different from the standard data flow and requires the creation of intermediate data. THELI will do all of this automatically and invisibly for you. You just have to activate the Non-linearity correction switch and proceed as normal. The only difference is a significantly longer execution time.