.help pcarf Aug94 ftools.rosat
.ih
NAME
pcarf -- generates a ROSAT PSPC ARF for an input PHA file
.ih
USAGE
pcarf phafil rmffil outfil crffil [gefile wtfile] [fltfile] (chatter)
      (clobber) (arfversn) (mincnts) (deltx) (delty) (optaxisx) (optaxisy)
.ih
DESCRIPTION

IMPORTANT: If you are using US Rev0 data to create PHA files, please 
see KNOWN BUGS below. There is a serious error condition which you must
work around.

This program generates an Ancillary Response File (ARF) for the ROSAT PSPC. 
The ARF consists of a simple 1-d list of the corrections 
which need to be applied to the input detector response matrix 
during the spectral analysis of input PHA dataset. The ARF
contains all corrections to the redistribution matrix file (the RMF) due to vignetting of the mirror, filter responses, etc. 



.ih
PARAMETERS
.ls phafil [file name]
The input FITS PHA file.  Must contain either an Off Axis Histogram
extension or a WMAP in the primary HDU to describe pointing of the
instrument. 
.le
.ls rmffil [file name]
The input RMF file.  Can type 'CALDB' to query the CALDB for a default
RMF file.
.le
.ls outfil [file name]
The output ARF file. (!<filename> will overwrite existing output file
<filename>.)
.le
.ls crffil [file name]
The primary calibration response file (PCRF).  Must be either an XRT
Effective area file (EAR) or a Spectral Response File (SPECRESP).  Can
type 'CALDB' to query the CALDB for a default SPECRESP file, if the
database can't find one, pcarf asks it for an appropriate EAR file. 
.le
.ls gefil [file name]
The instrument Gas Efficiency (GE) file (a CRF).  Needed only if PCRF
is an EAR file. Can type 'CALDB' to query the CALDB for a default GE
file. 
.le
.ls wtfil [file name]
The instrument Window Transmission (WT) file (a CRF).  Needed only if
PCRF is an EAR file. Can type 'CALDB' to query the CALDB for a default 
WT file.
.le
.ls fltfil [file name]
A filter transmission (FLT) file.  Needed only if PHA file specifies a
filter. Can type 'CALDB' to query the CALDB for a default
FLT file.
.le
.ls (chatter = 10) [integer]
How much do you want to know.  (0 dead silent: only fatal errors
reported, 5 quiet,10 normal,15 high,>20 silly)
.le
.ls (clobber = no) [boolean]
Whether to overwrite an existing output file. 
.le
.ls (arfversn = 1.1.0) [string]
Version number of output ARF file.
.le
.ls (mincnts = 1) [integer]
Minimum counts per bin in WMAP for consideration in processing.  One
is recommended value unless run-time becomes a problem or source area
to WMAP area ratio is very small (which would be a peculiar situation
anyway).
.le
.ls (deltax = 0) [real]
Allows CDELT1 keyword in PHA file to be overridden (for US Rev0, set to
2.595021e-4)
.le
.ls (deltay = 0) [real]
Allows CDELT2 keyword in PHA file to be overridden (for US Rev0, set to
2.595021e-4)
.le
.ls (optaxisx) (optaxisy) 
Do not remove cover.  No user serviceable parts inside.  
.le
.ls (optaxisx) (optaxisy) 
Do not remove cover.  No user serviceable parts inside.  
.le
.ih
EXAMPLES:
To make an ARF file using your own XRT effective area file
(my.eff_area) and getting everything else from the CALDB.  No filter
used in the observation.  Overwrite an existing output file if present.

.nf
ft>pcarf something.pha CALDB !something.pha my.eff_area CALDB   CALDB
.fi

First CALDB = RMF file, Second CALDB = GE file, Third CALDB = WT file

To make an ARF file using the CALDB defaults. The BORON filter was used
during the observation.  Overwrite an existing output file if present.

.nf
ft>pcarf somethingelse.pha CALDB somethingelse.pha CALDB fltfil=CALDB \
ft>clobber=yes
.fi

First CALDB = RMF file, Second CALDB = SPECRESP file, Third CALDB = FLT file

To make an ARF file using your own files.  No filter. Do not
allow overwrite of existing output.

.nf
ft>pcarf arlac.pha pspcb_93jan12.rmf arlac.arf pspcb_v1.spec_resp 


ft> pcarf
**  PCARF 2.1.3
Name of input PHA file[] theta_mus.pha
Name of input RMF file[CALDB] 
 ...  using gtcalf 1.1.1
 ...  using caldb_info 1.2.1
 ...... environ-var/logical CALDB defined
 .........   CALDB path = ftp://legacy.gsfc.nasa.gov/caldb
 ...... environ-var/logical CALDBCONFIG defined
 .........   CALDBCONFIG file = /software/caldb/caldb.config
 ...... environ-var/logical CALDBALIAS defined
 .........   CALDBALIAS file = /software/caldb/alias_config.fits
 ...... CALDB is configured for the PSPCB instrument onboard ROSAT
 ......... Cal Index File: ftp://legacy.gsfc.nasa.gov/caldb/data/rosat/pspc/cald
           b.indx
 ......... Data directory: ftp://legacy.gsfc.nasa.gov/caldb/data/rosat/pspc
 ...  using cifsl2 5.0.4
 ......  Downloading pspcb_gain2_256.rmf
Name of output ARF file[] theta_mus.arf
Name of input SPECRESP or EFFAREA file[CALDB] 
 ...  using gtcalf 1.1.1
 ...  using caldb_info 1.2.1
 ...... environ-var/logical CALDB defined
 .........   CALDB path = ftp://legacy.gsfc.nasa.gov/caldb
 ...... environ-var/logical CALDBCONFIG defined
 .........   CALDBCONFIG file = /software/caldb/caldb.config
 ...... environ-var/logical CALDBALIAS defined
 .........   CALDBALIAS file = /software/caldb/alias_config.fits
 ...... CALDB is configured for the PSPCB instrument onboard ROSAT
 ......... Cal Index File: ftp://legacy.gsfc.nasa.gov/caldb/data/rosat/pspc/cald
           b.indx
 ......... Data directory: ftp://legacy.gsfc.nasa.gov/caldb/data/rosat/pspc
 ...  using cifsl2 5.0.4
 ......  Downloading pspcb_v2.spec_resp
** DO_PCARF 2.0.1   WARNING:  pspcb_gain2_256.rmf detector: NONE    doesn't match PHA detector: UNKNOWN
** PCARF 2.1.3   Finished
.fi

.ih
KNOWN BUGS


IMPORTANT!  US Rev0 format data (but not RDF data or German data which
has been converted with GEVT2RDF) does not properly specify the size
of the pixels in the Detector image.  Because of this, the extractor
(the program that xselect uses to make a spectrum) puts the wrong
pixel size into the PHA file.  The extractor will be modified to 
cope with this deficiency in US Rev0 data but it isn't fixed yet. So if 
you use US Rev0 data and you use xselect to creat a PHA (spectrum) file, 
you must change the DELTX and DELTY  parameters to get a correct answer.

You need to change the CDELT1 and CDELT2 keywords to 2.595021e-4
times whatever the value of your WMREBIN keyword is (usually 15).
You can use FKEYPRINT to find the value of WMREBIN and FPARKEY to put
the new value into CDELT1 and CDELT2.  If you have perl installed at
your site (and you probably do since ascascreen is written in perl and
if you don't, bug your sysadmin to install it) the script fixrev0pha
will do these changes for you (type 'fhelp fixrev0pha' to see the
help page).

PHI angular dependance of CRF calibration datasets is not supported
yet. 

.ih
SEE ALSO

.ih
LOG OF SIGNIFICANT CHANGES

.ls v2.0.0 (1994 Sept)
    Public release version
.le
.ls v1.0.0 (1993 Sept.)
    Pre-release test version 
.le

.ih
PRIMARY AUTHOR

.nj
Lawrence E. Brown
.br
.nj
Hughes STX for 
.br
.nj
NASA/GFSC
.br
.nj
http://heasarc.gsfc.nasa.gov/cgi-bin/ftoolshelp
.br
.nj
.ju



.endhelp
