Simulation of X-ray lightcurves