HXDTIME  (June05)              ftools.hxdscltime            HXDSCLTIME (June05)

NAME
	hxdscltime -- fill the TIME column for the SCL extension in HK FITS.

USAGE
	hxdscltime  input_name=<infile> tim_filename=<timname>
		    leapsec_name=<leapsec_fits> hklist_name=<@hk_list>
	    	    [time_convert_mode=<mode> [gtimode=<mode> [gti_time=<name>
	    	    [num_event [event_freq [anl_verbose [anl_profile]]]]]]]
		
DESCRIPTION

	Carry out HXD event arrival-time correction. Arrival time of each
	column 'TIME' in SCL extension of HK FITS is calculated from 
	'HXD_SCL_TIME' (24-bit time counter in HXD-AE WPU) and 'TI'(DP time),
	by referring to the 'HXD_WPU_CLK_RATE' (clock rate of the counter, 
	HXD_SCL_TIME), 'HXD_TLATCH_TIME' ('TI' at the origin of DP), and 
	'HXD_AE_TM_LATCH_TM' (latched value in HXD-AE) columns in the HK 
	extension.

	In addtion the hxdscltime measure the actual time resolution of 
	'TIME' during the observation to revice the 'TIMEDEL' keyword. 

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

(gti_time = SCL_AETIME)          
	HXD event fits using time : TIME or SCL_AETIME
	'HXD_SCL_AETIME' means the time when the SCL packet is created
	in HXD-DE, and 'TIME' is the time when the SCL information are
	gathered in HXD-AE.

(input_name = ae20041215_1055_1932_hxd.hk)
	HXD HK FITS file name to achive the time correction.

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

( time_convert_mode = 4)               
	HxdTime2aetime mode.: 1, 2, 3, 4
        1: use internal function in interpolation (TI to aetime).
        2: use telemetry aetime, and simply add sub_aetime
        3: use telemetry aetime, and interpolate event aetime
	4: use astetool, aste_ti2time() with tim FITS file.

( tim_filename = ae20041215_1055_1341.tim)
	TIM File name, used for the time conversion from TI to aetime.

( 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
	Calculate arrival time 'TIME' for SCL extension in HK FITS, 
	"ae20041215_1055_1932_hxd.hk" using HK FITS files listed in 
	"hk.list", TIM file named "ae20041215_1055_1341.tim" and
	leapsec FITS named "leapsec.fits":

	ft> hxdscltime input_name="ae20041215_1055_1932_hxd.hk" \
		leapsec_name="leapsec.fits" \
		hklist_name="@hk.list" \
		tim_filename="ae20041215_1055_1341.tim"

SEE ALSO 
	none

AUTHOR
   Yukikatsu TERADA (RIKEN ;terada@riken.go.jp)
   Ryouhei MIYAWAKI (Univ. of Tokyo: miyawaki@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.


