HXDMKTRNGAINHIST(Jun05)    ftools.hxdmktrngainhist      HXDMKTRNGAINHIST(Jun05)

NAME
	hxdmktrngainhist -- produce a gain history file for the TRANSIENT FITS

USAGE
	hxdmktrngainhist input_name=<infile> trn_fitlog_name=<logfile>
	    trn_gainhist_name=<wam_ghf> leapsec_name=<leapsec>
	    [read_iomode=<iomode> [time_change=<time_change> 
	    [quality_change=<grade_change> [pi_change=<pi_chagne>  
	    [gtimode=<mode> [gti_time=<name>
	    [num_event [event_freq [anl_verbose [anl_profile]]]]]]]]]]

DESCRIPTION
	Produce a gain history file for the WAM FITS, where gain-correction 
	factor is given as a function of time. It is determined by fitting the 
	data of the 511 keV line. The fitting results are recorded in a log 
	file. The gain history file will be used as input for "hxdwampi".

PARAMETERS
( read_iomode = create)          
	HXD WAM fits input I/O mode : readonly or overwrite or create 

( gtimode = yes)             
	HXD WAM fits using GTI : yes or no 

( gti_time = S_TIME)          
	HXD WAM fits using time : TIME or S_TIME 

( input_name = ae20041215_1055_1932_hxd_wam.uff)
	HXD WAM fits file name 

( hklist_name = hxdtime_hk.inc)
	HXD HK fits file or @HK file list.

( trn_fitlog_name = ae20041215_1055_1932_hxd_wam_fit.tbl)
	Fit log file, ASCII format.

( trn_gainhist_name = ae_hxd_wam_ghf_ae20041215_1055_1932.fits)
	Gain history FITS

( gainhistory_iomode = no)
	Add result to gainhistory : yes or no

( leapsec_name = leapsec.fits)
	Fits file name in which the leapsec timings are listed.

( num_event = -1)              
	number of event (-1=all,0=exit)

( event_freq = 10000)           
	Event number printout frequency

( anl_verbose=-1)
	ANL verbose level (-1:full, 0:minimum)

( anl_profile=yes)
	Enable ANL module profiling

EXAMPLES
	To make gain history table for "ae20041215_1055_1932_hxd_wam.uff"
	creating a temporary file for "ae20041215_1055_1932_hxd_wam_fit.tbl"
	and the final products "ae_hxd_wam_ghf_ae20041215_1055_1932.fits":

	ft> hxdmktrngainhist input_name="ae20041215_1055_1932_hxd_wam.uff"
		trn_fitlog_name="ae20041215_1055_1932_hxd_wam_fit.tbl" \
		trn_gainhist_name="ae_hxd_wam_ghf_ae20041215_1055_1932.fits" \
		leapsec_name="leapsec.fits" 

SEE ALSO 
	none

AUTHOR
   Yukikatsu TERADA (University of Tokyo; terada@amalthea.phys.s.u-tokyo.ac.jp)
   and HXD team (astroe-hxd-ftools@amalthea.phys.s.u-tokyo.ac.jp).

   help file by Y.Terada June 15 2005 (last updated).

CONTACT
   Questions and comments should be addressed to
   astroehelp@olegacy.gsfc.nasa.gov.
