The kmo_rotate recipe

kmo_rotate

Synopsis

Rotate a cube spatially

Description

This recipe rotates a cube spatially (CCW). If the rotation angle isn’t a multiple of 90 degrees, the output cube will be interpolated and get larger accordingly.

By default all IFUs will be rotated.

Input files

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

Output files

DO                    KMOS
category              Type   Explanation
--------              -----  -----------
ROTATE                F3I    Rotated data cube

Constructor

cpl.Recipe("kmo_rotate")

Create an object for the recipe kmo_rotate.

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

Parameters

kmo_rotate.param.imethod

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

kmo_rotate.param.extrapolate

Applies only when rotation angle is different from multiples of 90 degrees: FALSE: Output IFU will be larger than the input (Default), TRUE: The size of input and output IFU remains the same. Data will be clipped. (bool; default: False) [default=False].

kmo_rotate.param.rotations

The rotations for all specified IFUs. “rot1;rot2;…” (degrees) (str; default: ‘’) [default=”“].

kmo_rotate.param.ifu

The IFU to rotate [1 to 24] or rotate all IFUs [0, default]. (int; default: 0) [default=0].

kmo_rotate.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_rotate = cpl.Recipe("kmo_rotate")

kmo_rotate.param.imethod = "BCS"
kmo_rotate.param.extrapolate = False
kmo_rotate.param.rotations = ""
kmo_rotate.param.ifu = 0
kmo_rotate.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_rotate = cpl.Recipe("kmo_rotate")
[...]
res = kmo_rotate( ..., 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.