Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, Germany |
writepha
Write photon-spectrum as an OGIP-compatible FITS-PHA-File in the Format defined in OGIP memo CAL-GEN 92-007 and 92-007a
High-Energy Astrophysics
writepha,count,counterr,phafile
count : counts in bin or countrate (see cps keyword) counterr : uncertainty of count (ignored when poisson set) phafile : filename of pha-file
none
response : filename of response-matrix (default: none) telescope : ID of telescope (default: unknown) 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 string (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 jdobs : Julian Date of start of observation, implies jdend : JD of end of observation filter : filter used (default: none) exposure : exposure time (default: 1. backfile : filename of background-spectrum (default: none) backscale : scale-factor of background-spectrum (default: 1) corrfile : filename of correction-file (default: none) corrscale : scale-factor of corrfile (default: 1) effarea : Area scaling factor (default: 1.) cps : if set,spectrum is in counts per second (default: total counts per bin) poisson : if set, assume Poisson-Statistics (and don't use uncertainty of spectrum); not possible if cps is used. Implies that counterr will NOT be used! staterr : systematic statistical error (default: 0, i.e. none) pi : if set, data are pulse invariant data (default if not set: data are pulse height analyzer data; PHA) arf : filename of ancillary file (i.e. effect. area) origin : institution where file originates from total : if set, spectrum is source+bk (default) background: if set, spectrum is background-spectrum net : if set, spectrum is background-subtracted startchan : first channel of spectrum (1 by default) group : array of same size as count and counterr defining the grouping of the data (see grppha procedure). a "1" starts a new group, -1 is the continuation of the rebinned channel quality : array same size as count, a 0 designates a good channel, <>0 is bad (2: marked bad by rebinning)
none
none
none
The PHA-File gets written to disk
* The error-handling really isn't as good as is should be yet. * NOTE THAT MULTIPLE DATA SETS ARE NOT ALLOWED YET * Do not have both, date_obs and jdobs!!!!
see code
STILL MISSING
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: 1997/10/22, JW allow for non-integer counts even in the non-cps case (e.g. background-models etc.) Version 1.3: 1998/01/28, JW allow case when counterr is not given but Poisson is set (i.e. poisson leads to ignoring counterr) Version 1.4: 1999/03/17, JW added TLMIN and TLMAX keywords to be fully compatible with OGIP memo 92-007a; made compatible with IDL 5.x CVS VERSION 1.2: 2001/03/15, JW added capability to write grouped spectra and to set the quality of channels Version 1.3: 2001/03/21, JW added PI keyword, added docu to group and quality keywords Version 1.4: 2001/03/21, JW stupid bug in CHANTYPE keyword -- remember, always check your trivial code before checking it in...
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]