[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
[Uni logo]


readpha Source code in readpha.pro

readpha

Name
       readpha
Purpose
       Read PHA-spectrum from a OGIP-conformant PHA-file. The file
       format has been defined in OGIP memo CAL-GEN 92-002 and 002a.
Category
       High energy astrophysics
Calling Sequence
       readpha,count,counterr,rate,back,phafile
Input Parameters
       phafile - name of the file to read
Optional Input Parameters
       none
Keyword Parameters
       see the list under optional outputs
Output Parameters
       count     : counts in each bin (the PHA channel-number is the
                   index into count); depending on the value of rate
                   either as total photons observed in the bin or as
                   a count-rate
       counterr  : uncertainty of the countrate or photon-number
                   (same units as count)
       rate      : 0 if count is count-rate,
                   1 if total counts/bin
       back      : 0 if count is total spectrum,
                   1 if count is background spectrum,
                   2 if conut is background-subtracted
Optional Output
       response  : filename of response-matrix
       telescope : ID of telescope
       instrument: ID of instrument
       object    : name of observed object
       ra,dec    : position of observed object (degrees!), implies:
       equinox   :     equinox os coordinate
       radecsys  :     coordinate-frame used
       date_obs  : start-time (dd/mm/yy), UTC, implies
       time_obs  :     start-time (hh:mm:ss), UTC
       date_end  :     end-time (dd/mm/yy), UTC
       time_end  :     end-time (hh:mm:ss), UTC
       tstart,tstop: the above in JD
       mjd       :  ... or in MJD, if this keyword is set
       filter    : filter used
       exposure  : exposure time
       backfile  : filename of background-spectrum
       backscale : scale-factor of background-spectrum
       corrfile  : filename of correction-file
       corscale  : scale-factor of corrfile
       effarea   : Area scaling factor
       staterr   : systematic statistical error
       origin    : institution where file originates from
       arf       : filename of ancillary file (i.e. effective area)
       poisson   : if set assume Poisson-Statistics (and don't use
                   uncertainty of spectrum); implies that counterr
                   will NOT be used!
Common Blocks
       none
Side Effects
       none
Restrictions
       * the routine seems to work, but is a little bit too complex for
         my feeling so that a proper functioning cannot be guaranteed
       * Error handling is primitive/non-existent
Procedure
       just read it!!!!!!
Example
       not needed
Revision History
       written in 1995 and 1996 by Joern Wilms,
               wilms@astro.uni-tuebingen.de
       Version 1.0: 1997/02/14  "Official" release
       Version 1.1: 1997/06/25, JW
           Corrected typo in HDUCLAS2 statement
       Version 1.2: 1999/08/04, JW
           Keywords now work correctly,
           tstart and tstop keyword added (computed from
           date-obs and date-end, NOT taken from header)
       Version 1.3: 1999/11/10, JW
           Typo in reading the coordinates
       Version 1.4: 2000/06/15, JW
           cosmetic change in documentation
 $Log: readpha.pro,v $
 Revision 1.5  2004/06/05 00:53:24  wilms
 make poisson a real keyword (was ignored until then).
 Revision 1.4  2002/07/27 13:54:29  wilms
 added test whether DATE-OBS defined in SPECTRUM extension
 (XMM evselect spectra do not have this, unfortunately...)

Last modified by pro2html on 2005 January 04 at 16:34 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically