NAME

sgdarfgen - Calculate the Hitomi SGD transmission ratio for a given source and correct the spectral response matrix (RSP file) for transmission

USAGE

sgdarfgen infile rspfile outfile ra dec sgdid ccid

DESCRIPTION

The sgdarfgen task computes the SGD transmission ratio for a source on the sky, given a satellite pointing, and corrects the response file for transmission. The transmission ratio depends on source position because the SGD collimator partially blocks light from off-axis sources.

The sgdarfgen task requires the source position, specified by the parameters 'ra' and 'dec', the pointing read from the keywords header RA_NOM/DEC_NOM/PA_NOM of the spectral file (see parameter 'infile') and the on-axis response from CALDB (see parameter 'rspfile'). The sgdarfgen task calculates the transmission ratio for each Compton Camera (CC), or for the combined CC in one SGD. If the parameter 'ccid' is set to either 1, 2, or 3, the transmission is calculated for a single CC. If the parameter 'ccid=1,2', 'ccid=2,3', or 'ccid=1,3', the transmission is calculated for the two CC specified. If 'ccid' is set to 0, the transmission is calculated for all three CC in SGD. If 'ccid' is set to 1, 2, or 3 only, one RSP file is required as input to match the SGD CC combination. If 'ccid' is set to 0, three input RSP files are required one for each of the CC for the defined SGD.

The transmission computation is conducted using the CALDB transmission file ('tranratfile') by interpolating between points in FOC coordinates for any energy in the RSP energy grid. The outputs are the following: one or three transmission files and the corresponding RSP file(s), depending on the setting of the 'ccid' parameter. The root name for the transmission and RSP files is specified in the parameter 'outfile'.

This task should be used for off-axis sources. The RSP file in CALDB is for on-axis sources, so it is not necessary to use this task to make a correction for on-axis sources.

PARAMETERS

infile =src.pi [filename]
Name of input spectral file from which nominal values of RA, DEC, and roll angle are read.

rspfile = in.rsp [filename]
Name of input RSP file(s) or file list. If the parameter 'ccid' is not 0 (i.e. either 1, 2, or 3,), a single file name should be specified. If the parameter 'ccid' is set to 0, three file names, separated by commas, or a file containing a list of three file names, should be given. The list file is preceded by '@'. The DETNAM keyword in the given file(s) must be consistent with the 'ccid'.

outfile = out [filename]
Root name of the output transmission and RSP files. The output file name is constructed using this root and appending the SGD number from 'sgdid' and the CC number from 'ccid'. For example, for SGD1 CC1, the file names would be root_sgd1_cc1.rsp and root_sgd1_cc1.arf. If 'sgdid=1' and 'ccid=0', six files are created, named root_sgd1_cc1.rsp, root_sgd1_cc1.arf, root_sgd1_cc2.rsp, root_sgd1_cc2.arf, root_sgd1_cc3.rsp, and root_sgd1_cc3.arf.

ra = 0.0 [real]
Right ascension [degrees] of the source.

dec = 0.0 [real]
Declination [degrees] of the source.

sgdid [integer 1|2]
SGD unit ID.

ccid [integer 0|1|2|3|all]
Compton camera ID.

(tranratfile = CALDB) [filename CALDB|file name]
Input transmission ratio file. If the parameter is set to CALDB, the file is read from the calibration database.

(buffer = -1) [integer -1|0|N]
Rows to buffer (-1=auto, 0=none, N>0=numrows).

(clobber = no) [boolean yes|no]
Overwrites the existing output file if set to yes.

(chatter = 1) [integer 0|1|2|3]
Chatter level for output. Set to 0 to suppress output, or to 1, 2, or 3 for increasing the chatter of the output.

(logfile = !DEFAULT) [string DEFAULT|NONE|file name]
Log file name. If set to DEFAULT, uses the name of the task and, if preceded by "!", overwrites the file if it exists. If set to NONE, no log file is created.

(debug = no) [boolean yes|no]
Diagnostic output is printed to the screen if set to yes.

(history = yes) [boolean yes|no]
Records tool parameters in HISTORY.

EXAMPLES

  1. Create an ARF file of SGD1 CC1 for a source at 'ra=214.0' and 'dec=36.0'.
  2.    sgdarfgen infile=input.pi rspfile=sgd1_cc1.rsp outfile=out_sgd1_cc1 ra=214.0 dec=36.0 sgdid=1 ccid=1
    
  3. Create ARF files of all CC of SGD2 for a source at 'ra=214.0' and 'dec=36.0'.
  4.    sgdarfgen infile=input.pi rspfile="sgd2_cc1.rsp,sgd2_cc2.rsp,sgd2_cc3.rsp" outfile=out_sgd1 ra=214.0 dec=36.0 sgdid=2 \
          ccid=0
    

SEE ALSO

LAST MODIFIED

February 22, 2024