The kmo_shift recipe

kmo_shift

Synopsis

Shift a cube spatially

Description

This recipe shifts a cube spatially. A positive x-shift shifts the data to the left, a positive y-shift shifts upwards, where a shift of one pixel equals 0.2arcsec. The output will still have the same dimensions, but the borders will be filled with NaNs accordingly.

Input files

DO                    KMOS
category              Type   Explanation                    Required #Frames
--------              -----  -----------                    -------- -------
<none or any>         F3I    data frame                        Y        1

Output files

DO                    KMOS
category              Type   Explanation
--------              -----  -----------
SHIFT                 F3I    Shifted data cube

Constructor

cpl.Recipe("kmo_shift")

Create an object for the recipe kmo_shift.

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

Parameters

kmo_shift.param.imethod

Method to use for interpolation. [“BCS” (bicubic spline, default), “NN” (nearest neighbor)] (str; default: ‘BCS’) [default=”BCS”].

kmo_shift.param.extrapolate

Applies only to ‘method=BCS’ when doing sub-pixel shifts: FALSE: shifted IFU will be filled with NaN’s at the borders,TRUE: shifted IFU will be extrapolated at the borders (bool; default: False) [default=False].

kmo_shift.param.shifts

The shifts for each spatial dimension for all specified IFUs.”x1,y1;x2,y2;…” (arcsec) (str; default: ‘’) [default=”“].

kmo_shift.param.ifu

The IFU to shift [1 to 24] or shift all IFUs Default value of 0 applies shift to all IFUs. (int; default: 0) [default=0].

kmo_shift.param.flux

Apply flux conservation: (TRUE (apply) or FALSE (don’t apply) (bool; default: False) [default=False].

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

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

kmo_shift.param.imethod = "BCS"
kmo_shift.param.extrapolate = False
kmo_shift.param.shifts = ""
kmo_shift.param.ifu = 0
kmo_shift.param.flux = False

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

import cpl
kmo_shift = cpl.Recipe("kmo_shift")
[...]
res = kmo_shift( ..., param = {"imethod":"BCS", "extrapolate":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.