NAME

bemerge -- merges XTE binned event spectral files.


USAGE

        bemerge in_fil1 in_fil2 out_file slop timeint_fil clobber mode

DESCRIPTION

The task will merge two XTE spectral files such that the CPIX values are continuous. The two input files should have CPIX values which are continuous and do not overlap. If there is a gap at the boundary a new channel is added such that it spans the gap and inserts zero counts. A warning is given. If the elements overlap, an error message is given and the program aborts.


PARAMETERS

in_fil1 = input file_name [string]
The name of the first XTE binned event spectral FITS file that will be processed.

in_fil2 = input file_name [string]
The name of the second XTE binned event spectral FITS file that will be processed.

out_file = output file_name [string]
The name of the resulting output FITS file to be created by merging the first two files. This file will contain all of the same information in the input files, with all pertinent keywords modified to reflect this merger.

slop = percentage of acceptable error (0.01 default) [real]
An acceptable error percentage that is applied to checks for the EXPOSURE, TSTART, TSTOP keywords in the two input files. These keywords should contain the SAME values, if they differ by more than the slop parameter a warning message is issued and the smaller of the two values is used in writing the output file. A warning is stored in a HISTORY keyword as well. Note that RATE files are all modified such that the time used in calculating the rate is the smaller of the two EXPOSURE values.

timeint_fil = output file_name (timeint_fil default) [string]
This file is ONLY created if the GTI's for the two input files differ. The output file created will have the first file's GTI extension copied onto it. And an ASCII file is created with the default name of "timeint.fil". This file should be input into SA(SE)EXTRCT as the "timeint" value (via usage of @timeint.fil) and the two files that created the two original XTE binned event spectral files, should be reprocessed. This will ensure that the GTI's for the two files are identical.

clobber = yes [boolean]
Tells if existing output files are to be overwritten.

mode = ql [string]
This option allows the PAR file to be updated with each successful completed run so that the defaults are changed.


EXAMPLES

1. Merge two XTE binned event spectral files, in_fil1 and in_fil2, to create out_file.

     bemerge in_fil1 in_fil2 out_file


NOTES:

This is the beta version of BEMERGE, but is fully functional.


BUGS

Version BEMERGE_V3.4

Please report problems to xtehelp@athena.gsfc.nasa.gov.


SEE ALSO

SAEXTRCT, and SEEXTRCT

CATEGORY

Nov95 ftools.xte