[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

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


writelc Source code in writelc.pro

writelc

Name
       writelc
Purpose
       Write an OGIP-compliant FITS lightcurve, conforming
       (hopefully) to
       http://heasarc.gsfc.nasa.gov/docs/heasarc/ofwg/docs/rates/ogip_93_003/ogip_93_003.html
       with later extensions
Category
       High-energy astrophysics
Calling Sequence
       writelc,time,rate,error,lcfile
    or
       writelc,time,rate,lcfile
Input Parameters
          time      : Time (LEADING EDGE OF BIN!!!!)
          rate      : Countrate (cps) or number of counts (counts/bin)
                      (depending on /counts keyword)
                      measured from time[i]..time[i+1]
          error     : if given, uncertainty of rate (same units as rate)
          lcfile    : name of the lightcurve to be written
Optional Input Parameters
          barytime  : Write a bary center corrected time column. Also the
                      TIMEREF keyword is set at 'LOCAL', i.e. the
                      time column remains untouched.
                      No BSTART/BSTOP/BZERO parameters are added.
                      The column type is set at BARYCENTER (not
                      following the OGIP recomendation but the result
                      of fxbary).
Keyword Parameters
          telescope : ID of telescope (default: unknown)
          instrument: ID of instrument
          object    : name of observed object
          pos_ra,pos_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)
          counts    : if set, "rate" contains number of events per time bin
                      (default: rate is counting rate (events/s))
          second    : if set, all times are in seconds
                      (time col, tstart, tstop)
          day       : if set, all times are in days (time col, tstart, tstop)
          mjdrefi/mjdreff: integer and real part of base MJD of lightcurve
          mjdref0   : base MJD of lightcurve
          tstarti,tstartf,tstart0: start time of lc
                      (either integer/real, or total)
          tstopi,tstopf,tstop0: stop time of lc (either integer/real, or
                       total)
          sysjd,sysmjd,systjd: set ONE of these to define the timesystem
          utc       : if set, time system is UTC
          ontime    : total time the source was observed, IN SECONDS
          backsub   : lightcurve is background-subtracted
          deadcorr  : rates are deadtime-corrected
Side Effects
          a file gets written
Restrictions
    Compared to the OGIP memo, the following restrictions apply:
 note: we always write the time into the file, even for equally
    spaced lcs
 Information on barycentric correction (TIMEREF keyword and
 associated info), who assigned the time (TASSIGN), and timing
 uncertainty is not yet written.
 lightcurves for multiple energy bands in the same lc cannot be
 written.
 information on vignetting is not written.
 background values are not written (BACKV columns)
 deadtime information is not written in extra column (DEADC column)
 event list info is not written (EVENT extension)
 additionally possible extensions (barycentric correction, gti,...)
 is not written
Procedure

Example

Revision History
       Version 1.1: 2001/03/22 Joern Wilms
       ... Version 1.3: 2001/03/22 JW: further improvements and
           bugfixes
       ... Version 1.4: 2002/01/14 JW: renamed ra and dec keywords
           into pos_ra and pos_dec to avoid IDL keyword clash with
           radecsys keyword
       $Log: writelc.pro,v $
       Revision 1.5  2003/04/03 16:14:40  goehler
        added optional bary input for bary center corrected time columns.

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

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

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