HXDPI (June05)                   ftools.hxdpi                    HXDPI (June05)

NAME
	hxdpi -- fill the HXD PI columns for the WELL FITS

USAGE
	hxdpi input_name=<infile> hklist_name=<@hk_list> 
	    pin_gainhist_name=<pin_ghf> gso_gainhist_name=<gso_ghf> 
	    hxdgsolin_fname=<caldb_hxdgsolin_fits> 
	    hxdpinlin_fname=<caldb_hxdpinlin_fits> 
	    [read_iomode=<iomode> [time_change=<time_change> 
	    [grade_change=<grade_change> [pi_pmt_change=<pipmt_chagne>
	    [pi_pin_change=<pipin_change> [gtimode=<mode> [gti_time=<name>
	    [num_event [event_freq [anl_verbose [anl_profile]]]]]]]]]]]

DESCRIPTION
	Fill the HXD PI columns (PIN[0-3]_PI, SLOW_PI, FAST_PI) from **_PHA.
	PIN_PIs are includes the effects, as follows,
	     (1) Integrated ADC non linearity of PIN channel
	     (2) PIN individual gain variation,
	and SLOW_PI and FAST_PI are included the following effects,
	     (1) Differencial ADC non linearity
	     (2) Integrated ADC non linearity 
	     (3) PMT Gain variability.
	The Gd edge effect is not included in SLOW/FAST_PI. (The effect is
	included in the response matrix table for GSO.)

	The definitions of the SLOW_PI and FAST_PI are
	       PI = E/2.0 - 0.50
	where E is the channel energy for GSO crystals, defined as a value of 
	the energy at the biginning of the each PI channel. The definitions of
	PIN_PIs are,
	       PI = E/0.375 - 1.00.

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

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

( grade_change = no )
	HXD event fits update GRADE : yes or no .

( pi_pmt_change = yes )
	HXD event fits update PI_FAST PI_SLOW : yes or no .

( pi_pin_change = yes )
	HXD event fits update PI_PIN0 PI_PIN1 PI_PIN2 PI_PIN3: yes or no .

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

( input_name = ae20041215_1055_1932_hxd_wel.uff )
	HXD event fits file name for input.

( create_name = "NONE" )
	HXD event fits created file name. It is not used when overwrite mode.

( hklist_name = "@hk.list" )
	HXD HK fits file List name

( pin_gainhistory_file_name = "ae_hxd_pin_ghf_YYYYMMDD.fits" )
	HXD pin gain history file name. The output of hxdmkgainhist.

( gso_gainhistory_file_name = "ae_hxd_gso_ghf_YYYYMMDD.fits" )
	HXD gso gain history file name. The output of hxdmkgainhist.

( hxdgsolin_fname = "ae_hxd_gso_lin_20050613.fits" )
	HXD GSO Calibration file name.

( hxdpinlin_fname = "ae_hxd_pin_lin_20050613.fits" )
	HXD PIN Calibration file name.

( rnd_seed = 7 )
	Random number seed

( rnd_skip = 0 )
	Random number skip

( 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 event file ae19990903_1050_1200_hxd_wel.unf,
	using calibration information in hxdgso_lin_050202.fits and
	hxdpin_lin_050201.fits, and gain history files named
	ae20040824_1853_1959_hxd_pin.ghf and ae20040824_1853_1959_hxd_gso.ghf,
	as follows,

	% hxdpi input_name="./sff/ae20040824_1853_1959_hxd_wel.uff" \
		hklist_name="@./list/hk.list" \
		pin_gainhist_name="./caldb/ae20040824_1853_1959_hxd_pin.ghf" \
		gso_gainhist_name="./caldb/ae20040824_1853_1959_hxd_gso.ghf" \
		hxdgsolin_fname="./caldb/hxdgso_lin_050202.fits" \
		hxdpinlin_fname="./caldb/hxdpin_lin_050201.fits"

	The gain history files are created by the FTOOL hxdmkgainhist.

SEE ALSO 
	none

AUTHOR
   Yukikatsu TERADA (RIKEN;terada@riken.jp)
   Tetsuichi KISISITA (ISAS/JAXA; kisisita@astro.isas.jaxa.jp)
   Shinya HIRAKURI  (Univ. of Tokyo: hirakuri@amalthea.phys.s.u-tokyo.ac.jp)
   and HXD team (astroe-hxd-ftools@amalthea.phys.s.u-tokyo.ac.jp).

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