Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, Germany |
timmerlc
Simulate a light-curve with a general periodogram shape
light curve simulation
timmerlc,time,rate,nt=nt,mean=mea,sigma=sigma, $ seed=seed,dt=dt,randomu=randomu, $ model=model,params=params,_extra=extra
-
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)
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
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 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
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]