.help pcecor Feb96 ftools.rosat
.ih
NAME
pcecor -- Corrects PI channel in Events file
.ih
USAGE
pcecor infile outfile alkfile calflag
.ih
DESCRIPTION

This tool operates on  Rev0, or RDF PSPC events file. The tool also operates
on any German  PSPC events file converted to RDF format using the 'gevt2rdf'
ftool. 

pcecor uses calibration data from the PANTER facility in Neuried to correct
for the variation in the linearity of the PSPC response with absolute gain.  
The data were collected several years after the launch of ROSAT using the 
engineering model PSPC.  It was observed that the effective gain in the 
0.25 - 1.0 keV energy range was lower than expected after normalizing to 
the 1.5 keV monitor line, and this effect became worse with lower absolute 
gain.  For example, a 0.75 keV X-ray might be detected as a 0.72 keV X-ray 
when the PSPC was operating at low gain.  Data from higher energy calibration 
lines were collected at the same time, which allowed a check of response 
linearity over an extended energy range.  Note that this correction was never implemented in SASS.

NOTE:
A  bug in the PCECOR ftool has resulted in too small a correction
being applied to the PI channel.  This bug has now been fixed and the 
alternative correction algorithm, based on Prieto et al. (1996, A&A Suppl., 120, 187),  
has also been incorporated into the tool.
 
In the new version, users can choose from one of two options for the PI
correction: 
1) Using calibration data from the PANTER 
2) Using in-flight  observations of calibration sources (such as N132D) 
to determine the PI correction as a function of time. See Prieto, 
Hasinger and Snowden (1996) for details. 


THE CALIBRATION FILES REQUIRED FOR THE TASK

The default setting for the input calibration files is 'CALDB', this 
facility can only be used by beta-test sites of the calibration database 
access software. Most users will need to obtain a set of calibration files 
via anonymous ftp from heasarc.gsfc.nasa.gov. The datasets
are located in the directory:

         ftp://legacy.gsfc.nasa.gov/caldb/data/rosat/pspc/bcf/alk_gainmaps

.ih
SUPPORTED FITS FILE FORMATS

   Currently only the following OGIP standards are supported by this task

.ls For the input events file :
.le
.ls RDF EXTNAME = 'STDEVT'
.le
.ls US REV0 EXTNAME='EVENTS'  
.le
.ls HDUCLAS1='EVENTS'
.le
.ls HDUCLAS2='ACCEPTED'
.le

.ls For the Calibration files :
.le

For further details see OGIP calibration memo CAL/ROS/95-010
 
.ih
PARAMETERS
.ls infile [character string]
The name of the Events file.
.le
.ls (gtifile) [character string]
The name of the GTI file.  Defaults to the name of the Events file (infile).
.le
.ls outfile [character string]
The name of the output file.
.le
.ls alkfile [character string]
The names of the alk gainmaps.
.le
.ls calflag [integer]
Flag to indicate which callibration to use. For calflag=1, ground callibration
file is used and for calflag other than 1, in-flight callibration file used.
.le
.ls (chatter=9) [Integer]
Flag to indicate how chatty the task is at execution. A value of 9 is the
default, with lower/higher values producing quieter/verbose output 
respectively.
.le
.ls (clobber = no) [boolean]
Overwrite output file, if it already exists ? 
.le

.ih 
EXAMPLE
Note that this example assumes that the user has CALDB access properly configured.  The easiest way to do this is to access the CALDB at the HEASARC over the internet - see
http://heasarc.gsfc.nasa.gov/docs/heasarc/caldb/caldb_remote_access.html
.nf
% pcecor
Please enter EVENTS filename[] rp900176n00_bas.fits
Please enter alk history file[caldb] 
Please enter output filename[] pcecor_bas_out.fits
Which correction algorithm to be used [grnd=1/inflight=2]?:[] 2
 ** pcecor 1.2.4
 ** pcecor 1.2.4 completed successfully
.fi

.ih
BUGS
None known

.ih
LOG OF SIGNIFICANT CHANGES

.ls v1.0.0 (1996 Feb)
.le
.ls v1.2.0 (1997 Oct)
included option to use either ground or in-flight callibration data.

.ih
Report problems using the FTOOLS help desk:
.br
.nj
http://heasarc.gsfc.nasa.gov/cgi-bin/ftoolshelp
.br
.ju


.endhelp


