[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

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


timegap Source code in timegap.pro

timegap

Name
          timegap
Purpose
          find gaps in a time array, determine gap and segment lengths
FEATURES:
          the time array ``time'' has to be evenly spaced outside of
          the gaps; the parameter ``tolerance'' defines the lower
          limit for the gap detection in terms of a relative
          deviation from the first time bin; the ``gaps'' array
          containing the startbins of the gaps is determined; the
          ``dblock'' array containing the durations of uninterrupted
          time segments in time bins is determined; and the
          ``gapdura'' array containing the length of each gap given in
          the same units as the time array is determined
Category
          timing tools
Calling Sequence
          timegap,time,gaps,dblock,gapdura,tolerance=tolerance,chatty=chatty
Input Parameters
          time     : time array to be searched for gaps
Optional Input Parameters
          tolerance: parameter defining the lower limit for the gap
                     length; the reference is the time difference
                     between the first and second entry in the time
                     array; tolerance defines the maximum allowed relative
                     deviation from this reference bin length;
                     default: 1D-8
          bt       : bin-time of the light curve (default: bt=time[1]-time[0])
Keyword Parameters
          chatty   : controls screen output;
                     default: screen output;
                     to turn off screen output, set chatty=0
Output Parameters
          gaps     : long array containing the startbins of gaps
                     in the time array
          dblock   : long array containing the dimensions of
                     uninterrupted time segments
          gapdura  : array containing the lengths of the gaps, given
                     in the same units as the time array
Optional Output
          gti      : array containing the good time intervals for the
                     observation. gti[0,*] contains the start-,
                     gti[1,*] the stoptimes. can be used, e.g., as
                     input for epfold
Common Blocks
          none
Side Effects
          none
Restrictions
          outside of the gaps the lightcurve has to be evenly spaced
Procedures Used
          none
Example
          time=[findgen(100),150.+findgen(50)]
          timegap,time,gaps,dblock,gapdura,tolerance=1D-8,/chatty
Revision History
 $Log: timegap.pro,v $
 Revision 1.4  2004/09/13 16:09:34  wilms
 check added to make sure that lightcurve has more than one bin
 Revision 1.3  2004/09/13 07:44:24  goehler
 fix: set ng at 0 if no gap was found to avoid problems for gti determination
 Revision 1.2  2004/09/06 18:34:09  wilms
 added option to return gti
          Version 1.1, 1998       Katja Pottschmidt
                       1999/10/14 Katja Pottschmidt,
                                  cvs version control enabled
          Version 1.2, 2000/10/24 Katja Pottschmidt,
                                  IDL header added,
                                  keyword default values defined/changed
          Version 1.3, 2000/10/24 Katja Pottschmidt,
                                  screen output: minor changes
          Version 1.4, 2000/10/25 Katja Pottschmidt,
                                  a tolerance value of 0 is allowed
                                  now
          Version 1.5, 2000/11/02 Katja Pottschmidt,
                                  default for chatty keyword changed
          Version 1.6, 2001/02/16 KP, JW
                                  if chatty=0 we now completely shut
                                  up
          Version 1.7, 2001/08/10 Joern Wilms
                                  * added bt keyword and rephrased some
                                    of the informative messages
                                  * use absolute value of dt-bt for
                                  comparing
  --- move over to timing subdir and CVS logging

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

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

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