[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

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


rndpwrlc Source code in rndpwrlc.pro

rndpwrlc

Name
          rndpwrlc
Purpose
          Simulate a light-curve with a power-law distributed
          periodogram
Category
          light curve simulation
Calling Sequence
          rndpwrlc,time,rate,nt=nt,beta=beta,sigma=sigma,mean=mea
Input Parameters
          -
Optional Input Parameters
          nt: Number of bins of the simulated lightcurve (default:65536)
              Should be power of two for optimum performance (FFT...)
        beta: Power law index of the periodogram (default: 1.5)
        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)
Keyword Parameters
        randomu: if set, the IDL random number generator is used. If
                not set, ran2 (from aitlib) procedure is used.
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
        Version 1.0: J. Wilms, K. Pottschmidt, IAAT, 2000 October 26
        Version 1.1; S. Benlloch, IAAT, 2000 November 28
                 keyword randomu added
                 ran2_normal implemented
        Version 1.2; S. Benlloch, IAAT, 2001 June
                 corrected error in beta and treatment of fourier transform
        Version 1.3; S. Benlloch, IAAT 2002 January
                 corrected error by odd nt
 $Log: rndpwrlc.pro,v $
 Revision 1.6  2002/09/12 09:59:22  wilms
 added automatic 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