NAME

numkrmf -- Generates an RMF file for an input spatial region file for NuSTAR

USAGE

numkrmf infile srcregionfile outfile [parameter = < value >]

DESCRIPTION

'numkrmf' generates an OGIP-style Response Matrix File (RMF) which is suitable for input into the spectral fitting program XSPEC.

For NuSTAR, the CALDB stores two sets of RMF files, to be used for event files filtered or not filtered for the depth cut. Each set stores the RMF file appropriate for each detector pixel or group of detector pixels. The association between pixels and CALDB RMF files is specified in the CALDB RMF Grouping File provided in input through the parameter 'grprmffile'.

'numkrmf' first reads the keyword 'DEPTHCUT' of the input event file to select the appropriate 'grprmffile' CALDB file. Next, for each CALDB RMF file, computes the number of events in the input event file ('infile') within the input spatial region file (parameter 'srcregionfile'). The response of the detector is finally generated by 'numkrmf' calculating a weighted mean of the CALDB RMF files. The mean is computed using as weights the corresponding number of events and making use of the multi-mission FTOOL 'addrmf'. Optionally, by setting the input parameter 'cmprmf' to 'yes, the output RMF file is compressed using the multi-mission FTOOL 'cmprmf'.

PARAMETERS

infile [file name]
Name of the input FITS event file.

(usrgtifile=NONE) [filename]
Name of the input user GTI file or NONE for none.

srcregionfile [file name]
Name of the input source region file.

outfile [file name]
Name of output RMF FITS file.

(grprmffile=CALDB) [filename]
Name of the input RMF Grouping File or CALDB.

(rmfdir=CALDB) [file name]
Name of the input RMF files directory or CALDB.

(cmprmf=yes) [boolean]
If set to yes, the output RMF file is compressed.

(clobber=no) [boolean]
If set to yes, overwrite the output file.

(history=yes) [boolean]
If set to yes, write parameter values and other information in HISTORY blocks.

(chatter = 2) [integer]
Chatter Level (min=0, max=5).

EXAMPLES

  1. Generates the RMF file appropriate for the input spatial region 'source.reg'

    >  numkrmf infile=nu40060001001A01_cl.evt srcregionfile=source.reg outfile=nu40060001001A01_sr.rmf
    

    BUGS

    SEE ALSO

    LAST MODIFIED

    June 2013