Table Of Contents

Previous topic

The kmo_fits_check recipe

Next topic

The kmo_fits_strip recipe

This Page

The kmo_fits_stack recipe

kmo_fits_stack

Synopsis

Creates KMOS conform fits-files

Description

FITS files to be processed by the KMOS pipeline have to meet certain condi- tions. This recipe is intended to provide to the user a simple way to test the pipeline with own data, which wasn’t produced by KMOS itself.

The input set of frame is checked for integrity (do all the frames have the same size, do they correspond to the desired output type, is there the correct number of files). Then an empty main header is written with desired keywords.

A keyword consists of the name, data type and value.

Additional keywords can be added either to the empty primary header or to all sub headers.

Input files

DO                    KMOS
category              Type   Explanation                    Required #Frames
--------              -----  -----------                    -------- -------
STACK_DATA            <none> >= 1 plain FITS files             Y       1-n
STACK_NOISE                  >= 1 plain FITS files             N       0,1-n
or
STACK_BADPIXEL               3 plain FITS files                Y        3

Output files

DO                     KMOS
category               Type    Explanation
--------               -----   -----------
FITS_STACK             RAW or  Stacked KMOS FITS file
                       F1D or
                       F2D or
                       B2D or
                       F1I or
                       F2I or
                       F3I or
                       F1S or
                       F1L or
                       F2L

Constructor

cpl.Recipe("kmo_fits_stack")

Create an object for the recipe kmo_fits_stack.

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

Parameters

kmo_fits_stack.param.type

The KMOS data format type (either “RAW”, “F1D”, “F2D”, “F1I”, “F2I”, “F3I”, “F1S”, “F1L”, “F2L”) (str; default: ‘’) [default=”“].

kmo_fits_stack.param.format

The format of the columns for “F1L” and “F2L” frames: e.g. “%f;%f;%s” (str; default: ‘’) [default=”“].

kmo_fits_stack.param.title

The titles of the columns for “F1L” and “F2L” frames: e.g. “wavelength;strength” (str; default: ‘’) [default=”“].

kmo_fits_stack.param.filename

Optional: The output filename (.fits will be added as postfix) (str; default: ‘FITS_STACK’) [default=”FITS_STACK”].

kmo_fits_stack.param.mainkey

Optional: Additional keywords for primary header (str; default: ‘’) [default=”“].

kmo_fits_stack.param.subkey

Optional: Additional keywords for sub headers(This is ignored when category=TRUE) (str; default: ‘’) [default=”“].

kmo_fits_stack.param.valid

Optional: Specify which IFUs are active. Either empty string or string with 24 elements (ones or zeros) e.g: [1;0;1;0;0;...;1] (str; default: ‘’) [default=”“].

kmo_fits_stack.param.category

Optional: IF a PRO.CATG should be added. (bool; default: False) [default=False].

kmo_fits_stack.param.input

Optional: input file (str; default: ‘’) [default=”“].

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

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

kmo_fits_stack.param.type = ""
kmo_fits_stack.param.format = ""
kmo_fits_stack.param.title = ""
kmo_fits_stack.param.filename = "FITS_STACK"
kmo_fits_stack.param.mainkey = ""
kmo_fits_stack.param.subkey = ""
kmo_fits_stack.param.valid = ""
kmo_fits_stack.param.category = False
kmo_fits_stack.param.input = ""

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

import cpl
kmo_fits_stack = cpl.Recipe("kmo_fits_stack")
[...]
res = kmo_fits_stack( ..., param = {"type":"", "format":""})

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.