Create aligned KMOS files out of test frames
This recipe is intended to create KMOS conform files in a semi-automatic manner.
It is sufficient to provide a single FITS file and a few parameters to create KMOS conform FITS files suited for different recipes. Internally it calls repea- tedly the recipe kmo_fits_stack. There are also parameters that allow to prepare the frames, i.e. early test out of the lab, in a way they can be processed.
One extension from the input frame is taken, some noise is added automatically in order to create similar frames for the other extensions.
DO KMOS
category Type Explanation Required #Frames
-------- ----- ----------- -------- -------
DARK or RAW Frame to create Master dark or Y 1
FLAT_ON or Flat-on or
FLAT_OFF or Flat-off or
ARC_ON or Arc-on or
ARC_OFF or Arc-off or
SKY or Sky or
STD or Std star or
GENERIC any other generic KMOS frame
DO KMOS
category Type Explanation
-------- ----- -----------
<see comment> RAW Named depending on --type parameter
Create an object for the recipe kmo_dev_setup.
import cpl
kmo_dev_setup = cpl.Recipe("kmo_dev_setup")
FITS type to create (DARK, FLAT_ON, FLAT_OFF, ARC_ON, ARC_OFF, SKY, GENERIC, STD) (str; default: ‘’) [default=”“].
FITS extension to process (0: primary, 1, 2,...) (long; default: 0) [default=0].
integer shift in x (to the right -> pos) (long; default: 0) [default=0].
integer shift in y (to the top -> pos) (long; default: 0) [default=0].
Rotator offset angle in degrees (CCW) (float; default: -1.0) [default=-1.0].
number of rows to crop at top (long; default: 0) [default=0].
number of rows to crop at bottom (long; default: 0) [default=0].
number of columns to crop at left (long; default: 0) [default=0].
number of columns to crop at right (long; default: 0) [default=0].
Optional: Additional keywords for primary header (str; default: ‘’) [default=”“].
Optional: Additional keywords for sub headers (str; default: ‘’) [default=”“].
Optional: Specify which IFUs are active. Either empty string or string with 8 elements (ones or zeros) e.g: [1;0;1;0;0;...;1] (str; default: ‘’) [default=”“].
Optional (STD only): Specify which IFUs contain objects. Either empty string or string with 8 elements (ones or zeros) e.g: [1;0;1;0;0;...;1] (str; default: ‘’) [default=”“].
Optional (STD only): Specify the date to save into DATE-OBS e.g: [2010-01-31T11:53:15.9789] (str; default: ‘’) [default=”“].
filter type (K, H, HK, etc.) (str; default: ‘’) [default=”“].
grating type (K, H, HK, etc.) (str; default: ‘’) [default=”“].
The following code snippet shows the default settings for the available parameters.
import cpl
kmo_dev_setup = cpl.Recipe("kmo_dev_setup")
kmo_dev_setup.param.type = ""
kmo_dev_setup.param.extension = 0
kmo_dev_setup.param.xshift = 0
kmo_dev_setup.param.yshift = 0
kmo_dev_setup.param.rotangle = -1.0
kmo_dev_setup.param.topcrop = 0
kmo_dev_setup.param.bottomcrop = 0
kmo_dev_setup.param.leftcrop = 0
kmo_dev_setup.param.rightcrop = 0
kmo_dev_setup.param.mainkey = ""
kmo_dev_setup.param.subkey = ""
kmo_dev_setup.param.valid = ""
kmo_dev_setup.param.objects = ""
kmo_dev_setup.param.date = ""
kmo_dev_setup.param.filter = ""
kmo_dev_setup.param.grating = ""
You may also set or overwrite some or all parameters by the recipe parameter param, as shown in the following example:
import cpl
kmo_dev_setup = cpl.Recipe("kmo_dev_setup")
[...]
res = kmo_dev_setup( ..., param = {"type":"", "extension":0})
See also
cpl.Recipe for more information about the recipe object.
Please report any problems to Alex Agudo Berbel. Alternatively, you may send a report to the ESO User Support Department.
This file is part of the KMOS Instrument Pipeline Copyright (C) 2002,2003 European Southern Observatory
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
Code author: Alex Agudo Berbel <kmos-spark@mpe.mpg.de>