Conversion of raw CUBE2 or BURST images to on- and off-cubes
The files listed in the Set Of Frames (sof-file) must be tagged: VISIR-CUBE2-raw-file.fits CUBE2 or VISIR-BURST-raw-file.fits BURST VISIR-BURST-bpm-file.fits STATIC_MASK For BURST data it will remove planes where the chopper switched from on <-> off based on the timestamps in the header.
The product(s) will have a FITS card ‘HIERARCH ESO PRO CATG’ with a value of one of: IMG_REPACKED_A_ON (NodPos: A, ChopPos: on) IMG_REPACKED_A_OFF (NodPos: A, ChopPos: off) IMG_REPACKED_B_ON (NodPos: B, ChopPos: on) IMG_REPACKED_B_OFF (NodPos: B, ChopPos: off) For CUBE2, the recipe will produce a static bad-pixel map, it will have a FITS card ‘HIERARCH ESO PRO CATG’ with a value of: STATIC_MASK
Create an object for the recipe visir_util_repack.
import cpl
visir_util_repack = cpl.Recipe("visir_util_repack")
Plane range startpoint. (long; default: 0) [default=0].
Number of full on-off cycles to repack. <= 0 for all. (long; default: -1) [default=-1].
Burst data only. Number of additional planes to cut from before each plane with chopper movement. (long; default: 0) [default=0].
Burst data only. Number of additional planes to cut from after each plane with chopper movement. A value of -1 does not skip the plane of the movement. (long; default: 0) [default=0].
Output background corrected planes by subtracting chop planes instead of outputting each plane (bool; default: False) [default=False].
Output error map by assuming poisson distributed photon counts. Error will be sqrt(2*|on - off|). Implies –bkgcorrect. (bool; default: False) [default=False].
The following code snippet shows the default settings for the available parameters.
import cpl
visir_util_repack = cpl.Recipe("visir_util_repack")
visir_util_repack.param.planestart = 0
visir_util_repack.param.ncycles = -1
visir_util_repack.param.trimlow = 0
visir_util_repack.param.trimhigh = 0
visir_util_repack.param.bkgcorrect = False
visir_util_repack.param.error = False
You may also set or overwrite some or all parameters by the recipe parameter param, as shown in the following example:
import cpl
visir_util_repack = cpl.Recipe("visir_util_repack")
[...]
res = visir_util_repack( ..., param = {"planestart":0, "ncycles":-1})
See also
cpl.Recipe for more information about the recipe object.
Please report any problems to Lars Lundin. Alternatively, you may send a report to the ESO User Support Department.
This file is part of the VISIR Instrument Pipeline Copyright (C) 2011 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, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
Code author: Lars Lundin <llundin@eso.org>