The kmo_copy recipe

kmo_copy

Synopsis

Copy a section of a cube to another cube, image or spectrum

Description

With this recipe a specified region of an IFU-based cube (F3I), image (F2I) or vector (F1I) can be copied to a new FITS file. One can copy just a plane out of a cube (any orientation) or a vector out of an image etc. By default the operation applies to all IFUs. The input data can contain noise frames which is then copied in the same manner as the input data.

It is also possible to extract a specific IFU out of a KMOS FITS structure with 24 IFU extensions or 48 extensions if noise is present.

Input files

DO                    KMOS
category              Type   Explanation                    Required #Frames
--------              -----  -----------                    -------- -------
<none or any>         F3I    Data cube                         Y        1
or
<none or any>         F2I    Image
or
<none or any>         F1I    Vector
                             (All inputs with or
                             without noise frame)

Output files

DO                    KMOS
category              Type   Explanation
--------              -----  -----------
COPY                  F3I or Cropped input data
                      F2I or
                      F1I

Constructor

cpl.Recipe("kmo_copy")

Create an object for the recipe kmo_copy.

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

Parameters

kmo_copy.param.ifu

Specific IFU to process (int; default: -1) [default=-1].

kmo_copy.param.autocrop

Crop automatically NaN values at borders (bool; default: False) [default=False].

kmo_copy.param.x

Start value in first dimension (pixels). (int; default: 1) [default=1].

kmo_copy.param.y

Start value in second dimension (pixels). (int; default: 1) [default=1].

kmo_copy.param.z

Start value in third dimension (pixels). (int; default: 1) [default=1].

kmo_copy.param.xsize

Length in first dimension (pixels). (int; default: 1) [default=1].

kmo_copy.param.ysize

Length in second dimension (pixels). (int; default: 1) [default=1].

kmo_copy.param.zsize

Length in third dimension (pixels). (int; default: 1) [default=1].

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

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

kmo_copy.param.ifu = -1
kmo_copy.param.autocrop = False
kmo_copy.param.x = 1
kmo_copy.param.y = 1
kmo_copy.param.z = 1
kmo_copy.param.xsize = 1
kmo_copy.param.ysize = 1
kmo_copy.param.zsize = 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_copy = cpl.Recipe("kmo_copy")
[...]
res = kmo_copy( ..., param = {"ifu":-1, "autocrop":False})

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.