Skip to main content

Research Repository

Advanced Search

RAY-RAMSES: a code for ray tracing on the fly in N-body simulations

Barreira, Alexandre; Llinares, Claudio; Bose, Sownak; Li, Baojiu

RAY-RAMSES: a code for ray tracing on the fly in N-body simulations Thumbnail


Alexandre Barreira

Claudio Llinares

Sownak Bose


We present a ray tracing code to compute integrated cosmological observables on the fly in AMR N-body simulations. Unlike conventional ray tracing techniques, our code takes full advantage of the time and spatial resolution attained by the N-body simulation by computing the integrals along the line of sight on a cell-by-cell basis through the AMR simulation grid. Moroever, since it runs on the fly in the N-body run, our code can produce maps of the desired observables without storing large (or any) amounts of data for post-processing. We implemented our routines in the RAMSES N-body code and tested the implementation using an example of weak lensing simulation. We analyse basic statistics of lensing convergence maps and find good agreement with semi-analytical methods. The ray tracing methodology presented here can be used in several cosmological analysis such as Sunyaev-Zel'dovich and integrated Sachs-Wolfe effect studies as well as modified gravity. Our code can also be used in cross-checks of the more conventional methods, which can be important in tests of theory systematics in preparation for upcoming large scale structure surveys.

Journal Article Type Article
Acceptance Date Apr 5, 2016
Online Publication Date May 3, 2016
Publication Date May 3, 2016
Deposit Date Aug 21, 2016
Publicly Available Date May 3, 2017
Journal Journal of Cosmology and Astroparticle Physics
Publisher IOP Publishing
Peer Reviewed Peer Reviewed
Volume 2016
Issue 05
Article Number 001
Public URL
Related Public URLs


Accepted Journal Article (3.7 Mb)

Copyright Statement
This is an author-created, un-copyedited version of an article published in Journal of Cosmology and Astroparticle Physics. IOP Publishing Ltd is not responsible for any errors or omissions in this version of the manuscript or any version derived from it. The Version of Record is available online at

You might also like

Downloadable Citations