.TH KMO_COMBINE "7" "1.3.5" "kmo_combine" "kmos recipes" .SH NAME kmo_combine \- Combine reconstructed cubes .SH SYNOPSIS esorex .B kmo_combine [OPTIONS] FILE.sof .SH 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). .PP 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. .PP For each spatial/spectral pixel a new value will be calculated (according the \-\-cmethod parameter) and written into the output cube. .PP 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. .PP The behavior of the selection of IFUs to combine differs for some templates and can be controlled with the parameters \-\-name and \-\-ifus. .PP 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. .PP If the input data cubes stem from other templates like e.g. .PP 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. .PP 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. .PP .SS 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. .PP * 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\'). .PP \-\-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. .PP 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. .PP * \'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. .PP * \'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. .PP * \'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. .PP \-\-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. .PP * \'median\' At each pixel position the median is calculated. .PP * \'average\' At each pixel position the average is calculated. .PP * \'sum\' At each pixel position the sum is calculated. .PP * \'min_max\' The specified number of minimum and maximum pixel values will be rejected. .PP \-\-cmax and \-\-cmin apply to this method. .PP .SS ADVANCED PARAMETERS \-\-edge_nan Set borders of two sides of the cubes to NaN before combining them. This minimises unwanted border effects when dithering. .PP \-\-fmethod see \-\-method=\'center\' The type of function that should be fitted spatially to the collapsed image. .PP This fit is used to create a mask to extract the spectrum of the object. Valid values are “gauss” and “moffat”. .PP \-\-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. .PP \-\-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. .PP Input files: DO KMOS category Type Explanation Required #Frames \-\-\-\-\-\-\-\- \-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\- \-\-\-\-\-\-\- F3I data frame Y 2\-n Output files: DO KMOS category Type Explanation \-\-\-\-\-\-\-\- \-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\- COMBINE_ F3I Combined data cube EXP_MASK_ F3I Exposure time mask .SH OPTIONS .TP \fB\-\-name\fR \fI\fR Name of the object to combine. (str; default: \'\'). The full name of this option for the EsoRex configuration file is \fBkmos.kmo_combine.name\fR [default = \fI\fR]. .TP \fB\-\-ifus\fR \fI\fR The indices of the IFUs to combine. "ifu1;ifu2;..." (str; default: \'\'). The full name of this option for the EsoRex configuration file is \fBkmos.kmo_combine.ifus\fR [default = \fI\fR]. .TP \fB\-\-method\fR \fI\fR 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 \fBkmos.kmo_combine.method\fR [default = \fInone\fR]. .TP \fB\-\-fmethod\fR \fI\fR 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 \fBkmos.kmo_combine.fmethod\fR [default = \fIgauss\fR]. .TP \fB\-\-filename\fR \fI\fR 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 \fBkmos.kmo_combine.filename\fR [default = \fI\fR]. .TP \fB\-\-flux\fR \fI\fR 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 \fBkmos.kmo_combine.flux\fR [default = \fIFalse\fR]. .TP \fB\-\-edge_nan\fR \fI\fR 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 \fBkmos.kmo_combine.edge_nan\fR [default = \fIFalse\fR]. .TP \fB\-\-suppress_extension\fR \fI\fR 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 \fBkmos.kmo_combine.suppress_extension\fR [default = \fIFalse\fR]. .TP \fB\-\-cmethod\fR \fI\fR Apply "average", "median", "sum", "min_max." or "ksigma". (str; default: \'ksigma\'). The full name of this option for the EsoRex configuration file is \fBkmos.kmo_combine.cmethod\fR [default = \fIksigma\fR]. .TP \fB\-\-cpos_rej\fR \fI\fR 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 \fBkmos.kmo_combine.cpos_rej\fR [default = \fI3.0\fR]. .TP \fB\-\-cneg_rej\fR \fI\fR 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 \fBkmos.kmo_combine.cneg_rej\fR [default = \fI3.0\fR]. .TP \fB\-\-citer\fR \fI\fR The number of iterations for kappa\-sigma\-clipping. (long; default: 3). The full name of this option for the EsoRex configuration file is \fBkmos.kmo_combine.citer\fR [default = \fI3\fR]. .TP \fB\-\-cmax\fR \fI\fR 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 \fBkmos.kmo_combine.cmax\fR [default = \fI1\fR]. .TP \fB\-\-cmin\fR \fI\fR 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 \fBkmos.kmo_combine.cmin\fR [default = \fI1\fR]. .PP 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. .SH SEE ALSO The full documentation for the kmos pipeline can be downloaded as a PDF file using the following URL: .IP .B ftp://ftp.eso.org/pub/dfs/pipelines/kmos/kmos\-pipeline\-manual\-2.9.pdf .PP An overview over the existing ESO pipelines can be found on the web page \fBhttp://www.eso.org/sci/software/pipelines/\fR. .PP Basic documentation about the EsoRex program can be found at the esorex (1) man page. .PP It is possible to call the pipelines from python using the python\-cpl package. See \fBhttp://packages.python.org/python\-cpl/index.html\fR for further information. .PP The other recipes of the kmos pipeline are .IR kmo_copy (7), .IR kmo_fits_check (7), .IR kmo_sci_red (7), .IR kmo_fits_stack (7), .IR kmo_noise_map (7), .IR kmo_rotate (7), .IR kmo_extract_spec (7), .IR kmo_multi_reconstruct (7), .IR kmo_sky_tweak (7), .IR kmo_shift (7), .IR kmos_gen_reflines (7), .IR kmo_stats (7), .IR kmo_arithmetic (7), .IR kmos_dark (7), .IR kmo_fits_strip (7), .IR kmo_std_star (7), .IR kmo_illumination_flat (7), .IR kmo_make_image (7), .IR kmos_flat (7), .IR kmo_fit_profile (7), .IR kmo_sky_mask (7), .IR kmos_illumination (7), .IR kmos_wave_cal (7), .IR kmo_reconstruct (7) .SH VERSION kmo_combine 1.3.5 .SH AUTHOR Alex Agudo Berbel .SH BUG REPORTS Please report any problems to usd\-help@eso.org. Alternatively, you may send a report to the ESO User Support Department . .SH 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