HXDWAMPI (June05)           ftools.hxdwampi                   HXDWAMPI (June05)

NAME
	hxdwampi  -- make gain correction for the WAM FITS

USAGE
	hxdwampi input_name=<infile> hklist_name=<@hk_list>
		trn_bintbl_name=<caldb_wam_pht_fits>
		trn_gainhist_name=<caldb_wam_ghf_fits>
	        [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

	Fill 'TRN_PI' column in WAM FITS. The gain drift is not corrected
	in the current hxdwampi (gain is considered in the response matrix).
	The task expends the reduced PH table via HXD-DE on-board process.
	The setting is identified by the column 'TRN_TBL_ID', which is 
	defined in the caldb FITS file named "ae_hxd_wam_pht_YYYYMMDD.fits".

PARAMETERS

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

( time_change = yes)             
        HXD WAM fits update TIME : yes or no 

( quality_change = no)              
        HXD WAM fits update GRADE : yes or no 

( pi_change = no)              
        HXD WAM fits update PI : yes or no 

( 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 = ae20040824_1853_1959_hxd_wam.fff)
        HXD WAM fits file name 

( create_name = NONE)
        HXD WAM fits created file name 

( trn_bintbl_name = ae_hxd_wam_pht_20050613.fits)
	The definition table of the PH compression process in HXD-DE.

( trn_gainhist_name = ae_hxd_wam_ghf_ae20041215_1055_1932.fits)
	Gain history FITS of WAM.

( rnd_seed = 7 )
	Random number seed

( rnd_skip = 0 )
	Random number skip

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

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

( 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
	Fill PI value for the WAM event file "ae20040824_1853_1959_hxd_wam.fff"
	using gain history files named "ae_hxd_wam_ghf.fits" and
	bin table "ae_hxd_wam_pht_20050613.fits":

	ft> hxdwampi input_name="ae20040824_1853_1959_hxd_wam.fff" \
		hklist_name="@hk.list" \
		trn_bintbl_name="ae_hxd_wam_pht_20050613.fits" \
		trn_gainhist_name="ae_hxd_wam_ghf.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.
