[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

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


readpha2 Source code in readpha2.pro

readpha2

Name
       readpha2
Purpose
       Read PHA-spectrum from a OGIP-conformant PHA2-file. The file
       format has been defined in OGIP memo ...
Category
       High energy astrophysics
Calling Sequence
       readpha2,count,counterr,rate,back,specnum,phafile
Input Parameters
       specnum - ref. number of the spectrum to read from the PHA-II table
                 (Note: this is compared to the SPEC_NUM column and not
                        necessarily equal to the row number)
       phafile - name of the file to read from
Optional Input Parameters
       none
Keyword Parameters
       see the list under optional outputs
       verbose   : be talkative
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,  <--- CURRENTLY ALWAYS
                   1 if count is background spectrum,
                   2 if count is background-subtracted
Optional Output
       channel   : channel numbers of spectrum
       phase     : corresponding phase if spectra were created by fasebin
       rowid     : Unique identifier of spectrum
       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 1 assume Poisson-Statistics (and don't use
                   uncertainty of spectrum); implies that counterr
                   will NOT be used!
Common Blocks
       none
Side Effects
       none
Restrictions
       * Rather complex tool, based on readpha.pro
       * Error handling is primitive/non-existent
Procedure
       just read it!!!!!!
Example
       not needed
Revision History
       Version 1.0: 1999/11/10, PK
                    first version, based on readpha.pro V1.2
       Version 1.1: 1999/11/10, PK
                    Use "RA-OBJ" and "DEC-OBJ" instead of "*_OBJ"
                    to be compliant with fasebin output and FITS Standard

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