Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, Germany |
rndpwrlc
Simulate a light-curve with a power-law distributed periodogram
light curve simulation
rndpwrlc,time,rate,nt=nt,beta=beta,sigma=sigma,mean=mea
-
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)
randomu: if set, the IDL random number generator is used. If not set, ran2 (from aitlib) procedure is used.
time: Time array (trivial :-) ) rate: Array of countrates of length n
seed: see above
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.
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)
rndpwrlc,ti,lc,mean=80.,sigma=10.,seed=seed psd,ti,lc,freq,psd plot,freq,psd,/xlog,/ylog
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
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]