Perform floating point math with two table files. (or one table file and a constant value).
% oned_imarith.sh Usage: oned_imarith.sh a.1 - b.1 o.file arg1 - input file 1 arg2 - operation (-,+,/,x) arg3 - input FITS file 2 arg4 - output file name arg5 - include header flag on output (Y/N)
% oned_imarith.sh --help oned_imarith: This OTW code is the 1-D analog to clip_imarith. It takes as input two files of numerical data *like those generated with codes like gen_curve and gen_noise) and combines the values (line by line) using simple math operators. In general this code take two input files, each having a "# data# header. The numerical values on each set of lines is compined using the operator specified by arg2. The specifies the name of the output file (arg4) and whether or not that file will have a "# data" header (arg5). --------------------------------------------------- A very simple example. % cat a.1 # data 1 2 3 4 % cat b.1 # data 2.0 2.0 2.0 2.0 % oned_imarith.sh a.1 x b.1 o.file N % cat o.file 2.0000000 4.0000000 6.0000000 8.0000000 --------------------------------------------------- Sometimes we simpley want to use a fixed constant as the second numerial value. You can do this by enetring the fixed number as the name of the second file (arg3). Here is an example: --------------------------------------------------- A very simple example. % cat a.1 # data 1 2 3 4 % oned_imarith.sh a.1 x 3.3 o.file Y % cat o.file # file 1 = a.1 # Operation = x # file 2 = 3.3 # data 3.3000000 6.5999999 9.8999996 13.1999998 ---------------------------------------------------Notice that in the example above we specified (bia arg5) that a "# data" header would be written. In addition to this header we also got a summary of the operation that was done.