[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

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


timmerlc Source code in timmerlc.pro

timmerlc

Name
          timmerlc
Purpose
          Simulate a light-curve with a general periodogram shape
Category
          light curve simulation
Calling Sequence
         timmerlc,time,rate,nt=nt,mean=mea,sigma=sigma, $
             seed=seed,dt=dt,randomu=randomu, $
             model=model,params=params,_extra=extra
Input Parameters
          -
Optional Input Parameters
          dt: time resolution of the lightcurve to be simulated
          nt: Number of bins of the simulated lightcurve (default:65536)
              Should be power of two for optimum performance (FFT...)
        mean: Mean count rate of the simulated lightcurve (default: 0.)
       sigma: Standard deviation of the lightcurve to be simulated
              (default:1.)
        seed: Seed for the random number generator (returned if not
              defined -- see IDL help for randomu function)
       model: name of a function returning the desired PSD shape
              using the calling convention of mpfitfun
      params: parameters of the model (argument to model)
Keyword Parameters
        randomu: if set, the IDL random number generator is used. If
                not set, ran2 (from aitlib) procedure is used.
        single: perform computations in single precision
Output Parameters
        time: Time array (trivial :-) )
        rate: Array of countrates of length n
Optional Output
        seed: see above
Restrictions
        There are rumors that the IDL random number generator is not
        absolutely perfect -- in fact, we have seen this in our
        simulations of deadtime noise. So the periodogram has not
        perfectly independent bins. For high precision work use one
        of the rngs implemented by Sara Benlloch, ran2_normal, and
        part of aitlib.
Procedure
        Simulation of the fourier transform of the light curve, and
        inverse Fourier transform. See
        J. Timmer & M. Koenig, On generating power law noise, A&A,
        300, 707-710, 1995
        for details
        RAN2_NORMAL (aitlib)
Example
        rndpwrlc,ti,lc,mean=80.,sigma=10.,seed=seed
        psd,ti,lc,freq,psd
        plot,freq,psd,/xlog,/ylog
Revision History
        Based on code by M. Koenig and J. Timmer, dated 1996 April 17
        Based on Version 1.3 of rndpwrlc by S. Benlloch, IAAT,
             dated 2002 January
        -- start of code development of code timmerlc
        New version 2002 July-September: cleaned earlier code, now
        any PSD shape is in principle possible.
 $Log: timmerlc.pro,v $
 Revision 1.2  2004/06/13 18:56:18  wilms
 made more memory efficient
 Revision 1.1  2002/09/12 08:17:45  wilms
 initial release into aitlib

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

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

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