kmo_combine(7) Combine reconstructed cubes

SYNOPSIS

esorex kmo_combine [OPTIONS] FILE.sof

DESCRIPTION

This recipe shifts several exposures of an object and combines them. The diffe- rent methods to match the exposures are described below (--method parameter).

The output cube is larger than the input cubes, according to the shifts to be applied. Additionally a border of NaN values is added. The WCS is the same as for the first exposure.

For each spatial/spectral pixel a new value will be calculated (according the --cmethod parameter) and written into the output cube.

Only exposures with equal orientation regarding the WCS can be combined (except -–method=”none”), north must point to the same direction. It is recommended to apply any rotation possibly after combining.

The behavior of the selection of IFUs to combine differs for some templates and can be controlled with the parameters --name and --ifus.

If the input data cubes stem from templates KMOS_spec_obs_mapping8 or KMOS_spec_obs_mapping24 all extensions from all input frames are combined into a single map by default (like in recipe kmo_sci_red). If just the area of a specific IFU should be combined, the parameter --ifus can be specified, or more easily --name.

If the input data cubes stem from other templates like e.g.

KMOS_spec_obs_freedither all extensions of all input frames are combined into several output frames by default. The input IFUs are grouped according their targeted object name stored in the keywords ESO OCS ARMx NAME. If just a specific object should be combined, its name can be specified with parameter --name. If arbitrary IFUs shoukd be comined, one can specify these with the parameter --ifus.

The default mapping mode is done via the --name parameter, where the name of the object has to be provided. The recipe searches in all input data cubes IFUs pointing to that object.

BASIC PARAMETERS

--name --ifus Since an object can be present only once per exposure and since it can be located in different IFUs for the existing exposures, there are two modes to identify the objects:
   * Combine by object names (default)
   In this case the object name must be provided via the --name parameter. The
   object name will be searched for in all primary headers of all provided frames
   in the keyword ESO OCS ARMx NAME.


   * Combine by index (advanced)
   In this case the --ifus parameter must be provided. The parameter must have
   the same number of entries as frames are provided, e.g. "3;1;24" for 3 expo-
   sures. The index doesn't reference the extension in the frame but the real
   index of the IFU as defined in the EXTNAME keyword (e.g. 'IFU.3.DATA').

--method There are following sources to get the shift parameters from:
   * 'none' (default)
   The cubes are directly recombined, not shifting at all. The output frame will
   have the same dimensions as the input cubes.


   If the size differs a warning will be emitted and the cubes will be aligned
   to the lower left corner. If the orientation differs a warning will be emit-
   ted, but the cubes are combined anyway.


   * 'header'
   The shifts are calculated according to the WCS information stored in the
   header of every IFU. The output frame will get larger, except the object is
   at the exact same position for all exposures. The size of the exposures can
   differ, but the orientation must be the same for all exposures.


   * 'center'
   The shifts are calculated using a centering algorithm. The cube will be col-
   lapsed and a 2D profile will be fitted to it to identify the centre. With 
   the parameter --fmethod the function to fit can be provided. The size of the
   exposures can differ, but the orientation must be the same for all exposures.


   * 'user'
   Read the shifts from a user specified file. The path of the file must be pro-
   vided using the --filename parameter. For every exposure (except the first one)
   two shift values are expected per line, they have to be separated with simple
   spaces. The values indicate pixel shifts and are referenced to the first
   frame. The 1st value is the shift in x-direction to the left, the 2nd the
   shift in y-direction upwards. The size of the exposures can differ, but the
   orientation must be the same for all exposures.

--cmethod Following methods of frame combination are available:
   * 'ksigma' (Default)
   An iterative sigma clipping. For each position all pixels in the spectrum
   are examined. If they deviate significantly, they will be rejected according
   to the conditions:
       val > mean + stdev * cpos_rej
   and
       val < mean - stdev * cneg_rej
   where --cpos_rej, --cneg_rej and --citer are the corresponding configuration
   parameters. In the first iteration median and percentile level are used.


   * 'median'
   At each pixel position the median is calculated.


   * 'average'
   At each pixel position the average is calculated.


   * 'sum'
   At each pixel position the sum is calculated.


   * 'min_max'
   The specified number of minimum and maximum pixel values will be rejected.


   --cmax and --cmin apply to this method.

ADVANCED PARAMETERS

--edge_nan Set borders of two sides of the cubes to NaN before combining them. This minimises unwanted border effects when dithering.

--fmethod see --method='center' The type of function that should be fitted spatially to the collapsed image.

This fit is used to create a mask to extract the spectrum of the object. Valid values are “gauss” and “moffat”.

--filename see --method='user'

--cpos_rej --cneg_rej --citer see --cmethod='ksigma'

--cmax --cmin see --cmethod='min_max'

--flux Specify if flux conservation should be applied.

--suppress_extension If set to TRUE, the arbitrary filename extensions are supressed. If multiple products with the same category are produced, they will be numered consecutively starting from 0.


  Input files:


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


  Output files:


   DO                      KMOS
   category                Type   Explanation
   --------                -----  -----------
   COMBINE_<ESO PRO CATG>  F3I    Combined data cube
   EXP_MASK_<ESO PRO CATG> F3I    Exposure time mask

OPTIONS

--name <str>
Name of the object to combine. (str; default: ''). The full name of this option for the EsoRex configuration file is kmos.kmo_combine.name [default = ].
--ifus <str>
The indices of the IFUs to combine. "ifu1;ifu2;..." (str; default: ''). The full name of this option for the EsoRex configuration file is kmos.kmo_combine.ifus [default = ].
--method <str>
The shifting method: 'none': no shifting, combined directly (default), 'header': shift according to WCS, 'center': centering algorithm, 'user': read shifts from file (str; default: 'none'). The full name of this option for the EsoRex configuration file is kmos.kmo_combine.method [default = none].
--fmethod <str>
The fitting method (applies only when method='center'): 'gauss': fit a gauss function to collapsed image (default), 'moffat': fit a moffat function to collapsed image (str; default: 'gauss'). The full name of this option for the EsoRex configuration file is kmos.kmo_combine.fmethod [default = gauss].
--filename <str>
The path to the file with the shift vectors.(Applies only to method='user') (str; default: ''). The full name of this option for the EsoRex configuration file is kmos.kmo_combine.filename [default = ].
--flux <bool>
Apply flux conservation: (TRUE (apply) or FALSE (don't apply) (bool; default: False). The full name of this option for the EsoRex configuration file is kmos.kmo_combine.flux [default = False].
--edge_nan <bool>
Set borders of cubes to NaN before combining them.(TRUE (apply) or FALSE (don't apply) (bool; default: False). The full name of this option for the EsoRex configuration file is kmos.kmo_combine.edge_nan [default = False].
--suppress_extension <bool>
Suppress arbitrary filename extension.(TRUE (apply) or FALSE (don't apply) (bool; default: False). The full name of this option for the EsoRex configuration file is kmos.kmo_combine.suppress_extension [default = False].
--cmethod <str>
Apply "average", "median", "sum", "min_max." or "ksigma". (str; default: 'ksigma'). The full name of this option for the EsoRex configuration file is kmos.kmo_combine.cmethod [default = ksigma].
--cpos_rej <float>
The positive rejection threshold for kappa-sigma-clipping (sigma). (float; default: 3.0). The full name of this option for the EsoRex configuration file is kmos.kmo_combine.cpos_rej [default = 3.0].
--cneg_rej <float>
The negative rejection threshold for kappa-sigma-clipping (sigma). (float; default: 3.0). The full name of this option for the EsoRex configuration file is kmos.kmo_combine.cneg_rej [default = 3.0].
--citer <long>
The number of iterations for kappa-sigma-clipping. (long; default: 3). The full name of this option for the EsoRex configuration file is kmos.kmo_combine.citer [default = 3].
--cmax <long>
The number of maximum pixel values to clip with min/max-clipping. (long; default: 1). The full name of this option for the EsoRex configuration file is kmos.kmo_combine.cmax [default = 1].
--cmin <long>
The number of minimum pixel values to clip with min/max-clipping. (long; default: 1). The full name of this option for the EsoRex configuration file is kmos.kmo_combine.cmin [default = 1].

Note that it is possible to create a configuration file containing these options, along with suitable default values. Please refer to the details provided by the 'esorex --help' command.

VERSION

kmo_combine 1.3.5

AUTHOR

Alex Agudo Berbel <[email protected]>

BUG REPORTS

Please report any problems to [email protected]. Alternatively, you may send a report to the ESO User Support Department <[email protected]>.

LICENSE

This file is part of the CRIRES 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, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA