kmo_arithmetic(7) Perform basic arithmetic on cubes

SYNOPSIS

esorex kmo_arithmetic [OPTIONS] FILE.sof

DESCRIPTION

With this recipe simple arithmetic operations, like addition, subtraction, multiplication, divison and raising to a power can be performed.

Since FITS files formatted as F1I, F2I and F3I can contain data (and eventually noise) of either just one IFU or of all 24 IFUs, kmo_arithmetic behaves diffe- rently in these cases.

When the number of IFUs is the same for both operands, the first IFU of the first operand is processed with the first IFU of the second operand.

When the second operand has only one IFU while the first operand has more IFUs, then the all the IFUs of the first operand are processed individually which the IFU of the second operand.

If an operand contains noise and the other doesn't, the noise will not be processed.

Noise is only propagated if both operand contain noise extensions. If the second operator is a scalar noise is also propagated, of course.

If two cubes are given as operands, they will be combined according to the given operator.If a cube is given as first operand and an image as second, then it operates on each slice of the cube; similarly if a spectrum is given as the second operand, it operates on each spectrum of the cube; and a number as the second operand operates on each pixel of the cube.

BASIC PARAMETERS

--operator Any of the following operations to perform: '+', '-', '*' or '/' (also '^' when the 2nd operand is a scalar

--scalar To be provided if a frame should be processed together with a scalar

--file_extension Define a string to append to the product filename ARITHMETIC in order to get an unique filename


  Input files:


   DO                    KMOS                                                  
   category              Type   Explanation                    Required #Frames
   --------              -----  -----------                    -------- -------
   <none or any>         F3I or Data with or                      Y        1   
                         F2I or without noise frame                            
                         F1I or                                                
                         F2D or                                                
                         RAW                                                   
   <none or any>         F3I or Data with or                      N       0,1  
                         F2I or without noise frame                            
                         F1I or                                                
                         F2D or                                                
                         RAW                                                   


  Output files:


   DO                    KMOS
   category              Type   Explanation
   --------              -----  -----------
   ARITHMETIC            F3I or                                                
                         F2I or                                                
                         F1I or                                                
                         F2D                                                   

OPTIONS

--operator <str>
The operator ('+', '-', '*', '/' or '^') (str; default: ''). The full name of this option for the EsoRex configuration file is kmos.kmo_arithmetic.operator [default = ].
--scalar <float>
The scalar operand (float; default: -1.7976931348623157e+308). The full name of this option for the EsoRex configuration file is kmos.kmo_arithmetic.scalar [default = -1.79769313486e+308].
--file_extension <str>
String to add to product filename. (str; default: ''). The full name of this option for the EsoRex configuration file is kmos.kmo_arithmetic.file_extension [default = ].

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_arithmetic 1.3.19

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