HXDARFGEN  (June05)         ftools.hxdarf                  HXDARFGEN (June05)

NAME
	hxdarfgen -- generate the HXD arf files of PINs

USAGE
	hxdarfgen hxd_arf_pinid=<pinid> hxd_arf_gsoid=<gsoid> 
		  teldef_name=<caldb_teldef> attitude_name=<attitude>
		  hxd_arfdb_name=<caldb_hxd_arfdb> input_pi_name=<pifile>
		  point_ra=<RA> point_dec=<DEC> 
		  [ hxdarf_point_yn [image_fname 
	          [ num_event [ event_freq [ anl_verbose [ anl_profile]]]]]]


DESCRIPTION
	Generate HXD ARF file(s) with inputs as follows:
		Point source location on the sky, or image map,
		Satellite attitude file,
		nominal 'RA_NRM' 'DEC_NRM' appeared in the spectral file, 
		Detector ID, with WMAP information in the spectral file.

	The tables of the transmission rate onto PIN and GSO for various 
	incident angles are prepared by the HXD team, via GEAT4 base Monte 
	Carlo simulator, and summerized in the caldb FITS file named 
	"ae_hxd_pin_arfdb-YYYYMMDD.fits". The task hxdarfgen calculate the
	incident angle to each detector using teldef file, PI spectral file
	and attitude file, and read the ae_hxd_pin_arfdb-YYYYMMDD.fits to
	calculate the arf file.

	Note: The arf file only include transmission rate onto the PIN or 
	      GSO detector, and the quantum efficiency (QE) of the detector
	      is ** NOT ** considered in the arf file. The QE and other 
              effects are included into the rmf file. Therefore, in the
	      spectral analysis, please check the version of arf-database
	      corresponding to the rmf file.

PARAMETERS
( hxd_arf_pinid = 64 )
	PIN ID (0...63 64:merged >64:UNDEFINED)

( hxd_arf_gsoid = 17 )
	GSO ID (0...15 16:merged >16:UNDEFINED)

( teldef_name = "hxd_teldef_2005-05-17.fits" )
	HXD teldef file name

( attitude_name = "attitude.fits" )
	Astro-E2 Attitude file name

( hxd_arfdb_name = "ae_hxd_pin_arfdb_unit-2005-05-10.fits" )
	arf database name in caldb.

( hxdarf_point_yn = y )
	Input position is POINT or not.

( point_ra = 274.0554 )
	Input RA, valid when hxdarf_point_yn is yes

( point_dec = 49.8675 )
	Input DEC, valid when hxdarf_point_yn is yes

( image_fname = "NONE" )
	Input image file, valid when hxdarf_point_yn is no.

( input_pi_name = "ae20050405_2000_2100_hxd.pha" )
	Input PI file

( 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 arf file for PIN3 for PI file "ae20050405_2000_2100_hxd.pha"
	using the teldef file "hxd_teldef_2005-05-17.fits" and arf db file
	"ae_hxd_pin_arfdb_unit-2005-05-10.fits" to the point (RA,DEC) =
	(274.0554, 49.8675):

	ft> hxdarfgen hxd_arf_pinid=3 hxd_arf_gsoid=17 \
		  teldef_name="hxd_teldef_2005-05-17.fits" \
		  attitude_name="attitude.fits" \
		  hxd_arfdb_name="ae_hxd_pin_arfdb_unit-2005-05-10.fits" \
		  input_pi_name="ae20050405_2000_2100_hxd.pha" \
		  point_ra=274.0554 point_dec=49.8675

	To calculate an arf file merged for 64 PIN, set the hxd_arf_pinid
	parameter to be tha value of 64:
	ft> hxdarfgen hxd_arf_pinid=64 hxd_arf_gsoid=17 \
		  teldef_name="hxd_teldef_2005-05-17.fits" \
		  attitude_name="attitude.fits" \
		  hxd_arfdb_name="ae_hxd_pin_arfdb_unit-2005-05-10.fits" \
		  input_pi_name="ae20050405_2000_2100_hxd.pha" \
		  point_ra=274.0554 point_dec=49.8675

	To calculate GSO arf file for W01, set hxd_arf_pinid over 64:
	ft> hxdarfgen hxd_arf_pinid=65 hxd_arf_gsoid=1 \
		  teldef_name="hxd_teldef_2005-05-17.fits" \
		  attitude_name="attitude.fits" \
		  hxd_arfdb_name="ae_hxd_pin_arfdb_unit-2005-05-10.fits" \
		  input_pi_name="ae20050405_2000_2100_hxd.pha" \
		  point_ra=274.0554 point_dec=49.8675

	To get merged GSO arf file:
	ft> hxdarfgen hxd_arf_pinid=65 hxd_arf_gsoid=16 \
		  teldef_name="hxd_teldef_2005-05-17.fits" \
		  attitude_name="attitude.fits" \
		  hxd_arfdb_name="ae_hxd_pin_arfdb_unit-2005-05-10.fits" \
		  input_pi_name="ae20050405_2000_2100_hxd.pha" \
		  point_ra=274.0554 point_dec=49.8675

SEE ALSO 
	"How to make ASTRO-E2 ARF" document by K.Ebisawa etal.

AUTHOR
   Yukikatsu TERADA  (RIKEN;terada@riken.jp)
   Kennich TAMURA    (ISAS/JAXA: tamuken@astro.isas.jaxa.jp)
   and HXD team (astroe-hxd-ftools@amalthea.phys.s.u-tokyo.ac.jp).

   help file by Y.Terada June 15 2005 (last updated),
       with Kazuhiro NAKAZAWA (ISAS/JAXA: nakazawa@astro.isas.jaxa.jp),
       Kousuke Oonuki (ISAS/JAXA: oonuki@astro.isas.jaxa.jp), and
       Naomi Kawano   (Hiroshima-U:kawano@hirax7.hepl.hiroshima-u.ac.jp).

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


