Buy article online - an online subscription or single-article purchase is required to access this article.
![s logo](https://journals.iucr.org/logos/jicons/s_36x36.png)
A Monte Carlo algorithm has been developed to calculate the instrumental profile function of a powder diffraction synchrotron beamline. Realistic models of all optical elements are implemented in a ray-tracing software. The proposed approach and the emerging paradigm have been investigated and verified for several existing X-ray powder diffraction beamlines. The results, which can be extended to further facilities, show a new and general way of assessing the contribution of instrumental broadening to synchrotron radiation data, based on ab initio simulations.