Table Of Contents

Previous topic

The kmo_fits_check recipe

Next topic

The kmo_multi_reconstruct recipe

This Page

The kmo_extract_spec recipe

kmo_extract_spec

Synopsis

Extract a spectrum from a cube.

Description

This recipe extracts a spectrum from a datacube. The datacube must be in F3I KMOS FITS format (either with or without noise). The output will be a similarly formatted F1I KMOS FITS file.

Input files

DO                    KMOS
category              Type   Explanation                    Required #Frames
--------              -----  -----------                    -------- -------
<none or any>         F3I    The datacubes                     Y        1
<none or any>         F2I    The mask                          N       0,1

Output files

DO                    KMOS
category              Type   Explanation
--------              -----  -----------
EXTRACT_SPEC          F1I    Extracted spectrum
EXTRACT_SPEC_MASK     F2I    (optional, if --save_mask=true and
                             --mask_method='optimal': The calculated mask)

Constructor

cpl.Recipe("kmo_extract_spec")

Create an object for the recipe kmo_extract_spec.

import cpl
kmo_extract_spec = cpl.Recipe("kmo_extract_spec")

Parameters

kmo_extract_spec.param.mask_method

Either apply ‘mask’, ‘integrated’ or ‘optimal’ masking method. (str; default: ‘integrated’) [default=”integrated”].

kmo_extract_spec.param.centre

The centre of the circular mask (pixel). (str; default: ‘7.5,7.5’) [default=”7.5,7.5”].

kmo_extract_spec.param.radius

The radius of the circular mask (pixel). (float; default: 3.0) [default=3.0].

kmo_extract_spec.param.save_mask

True if the calculated mask should be saved. (bool; default: False) [default=False].

kmo_extract_spec.param.cmethod

Apply “average”, “median”, “sum”, “min_max.” or “ksigma”. (str; default: ‘ksigma’) [default=”ksigma”].

kmo_extract_spec.param.cpos_rej

The positive rejection threshold for kappa-sigma-clipping (sigma). (float; default: 3.0) [default=3.0].

kmo_extract_spec.param.cneg_rej

The negative rejection threshold for kappa-sigma-clipping (sigma). (float; default: 3.0) [default=3.0].

kmo_extract_spec.param.citer

The number of iterations for kappa-sigma-clipping. (long; default: 3) [default=3].

kmo_extract_spec.param.cmax

The number of maximum pixel values to clip with min/max-clipping. (long; default: 1) [default=1].

kmo_extract_spec.param.cmin

The number of minimum pixel values to clip with min/max-clipping. (long; default: 1) [default=1].

The following code snippet shows the default settings for the available parameters.

import cpl
kmo_extract_spec = cpl.Recipe("kmo_extract_spec")

kmo_extract_spec.param.mask_method = "integrated"
kmo_extract_spec.param.centre = "7.5,7.5"
kmo_extract_spec.param.radius = 3.0
kmo_extract_spec.param.save_mask = False
kmo_extract_spec.param.cmethod = "ksigma"
kmo_extract_spec.param.cpos_rej = 3.0
kmo_extract_spec.param.cneg_rej = 3.0
kmo_extract_spec.param.citer = 3
kmo_extract_spec.param.cmax = 1
kmo_extract_spec.param.cmin = 1

You may also set or overwrite some or all parameters by the recipe parameter param, as shown in the following example:

import cpl
kmo_extract_spec = cpl.Recipe("kmo_extract_spec")
[...]
res = kmo_extract_spec( ..., param = {"mask_method":"integrated", "centre":"7.5,7.5"})

See also

cpl.Recipe for more information about the recipe object.

Bug reports

Please report any problems to Alex Agudo Berbel. Alternatively, you may send a report to the ESO User Support Department.