NAME

ftaddrmf -- Add input RMF files with specified weights.

USAGE

ftaddrmf infiles weights outfile
or,
ftaddrmf @infile outfile=outfile

DESCRIPTION

FTADDRMF sums input RMF files with specified weights, and outputs a single RMF. To average RMFs, total weights should add up to 1.0. To add RMFS, each individual weight should be 1.0. The header and energy bounds extensions are copied from the first input RMF. Some checking is done to ensure that compatible RMFs are added however thought is advised before using this tool.

PARAMETERS

list [string]
RMF files to be added together. The input to this parameter can either be a list of RMF files, or can be the name of a text file containing such a list of files (one per line) and weighting factors for the RMFs. The weighting factors should be separated from the RMF filename by a blank and should be real. If a text file input is to be used, the name of the text file should be preceeded by a, '@' (eg @file_list instructs the task to open the text file file_list, and read the RMF filenames from it).

weights [string]
Relative weighting factors for the RMFs given by the list parameter. The user is prompted for this parameter if the list parameter is not a text file. The number of values and ordering MUST be the same as for the filenames specified by the list parameter. The input to this parameter is a list of reals.

outfile [filename]
The name of the RMF file to be created. For safety, the name CANNOT be the same as one of the input files unless outfile is preceeded by "!" or clobber is true.

(clobber = no) [boolean]
Standard HEAdas clobber parameter; controls whether an existing output file may be overwritten.

(history = yes) [boolean]
Standard HEAdas history parameter; controls whether the runtime parameter values should be written in block of HISTORY keywords in the output file.

EXAMPLES

A) Add together the RMFs foo.rmf and goo.rmf with equal weighting and write the answer to hoo.rmf. First create file.list containing

        foo.rmf 0.5
        goo.rmf 0.5
then :
     ftaddrmf @file.list hoo.rmf
or
     ftaddrmf foo.rmf,goo.rmf 0.5,0.5 hoo.rmf
B) When adding together responses from different detectors (for example individual PCU in the RXTE PCA), use a weight of 1.0 for each individual file. This is required for the following reason. One detector receives X counts, so N detectors receive N*X counts. The matrix for one detector has approximately 1400 cm^2. So the matrix for a combined PHA spectrum with N*X counts must have approximately N*1400 cm^2.
    
     ftaddrmf pcu0.rmf,pcu1.rmf,pcu3.rmf 1.0,1.0,1.0 pcu_013.rmf

LAST MODIFIED

August 2013