Skip to content

A flexible and GPU-accelerated Radiative Transfer Framework for Simulating the Cosmic Epoch of Reionization

License

Notifications You must be signed in to change notification settings

cosmic-reionization/pyC2Ray

Repository files navigation

pyC2Ray: A flexible and GPU-accelerated radiative transfer framework

pyc2ray is the updated version of C2Ray (G. Mellema, I.T. Illiev, A. Alvarez & P.R. Shapiro, 2006), an astrophysical radiative transfer code widely used to simulate the Epoch of Reionization (EoR). pyc2ray features a new raytracing method developed for GPUs, named Accelerated Short-characteristics Octhaedral RAytracing (ASORA). pyc2ray has a modern python interface that allows easy and customizable use of the code without compromising computational efficiency. A full description of the update and new raytracing method can be found at Hirling, Bianco, Giri, Iliev, Mellema & Kneib (2024).

The core features of C2Ray, written in Fortran90, are wrapped using f2py as a Python extension module, while the new raytracing library, ASORA, is implemented in C++ using CUDA. Both are native Python C extensions and can be directly accessed from any Python script.

Visit the ReadTheDocs of pyc2ray for the complete documentation, tutorials, installation instructions, and more.

Installation

Since the automatic build system is not fully working, the extension modules must be manually compiled and placed in the correct directories.

Requirements:

  • C Compiler
  • gfortran Fortran Compiler
  • nvcc CUDA compiler
  • f2py $\geq$ 1.24.4, provided by numpy
  • astropy and tools21cm python packages.

Please see our documentation for step-by-step instructions on how to install pyc2ray.

A few example scripts summarizing the installation steps can be found in the repository /install_script/.

TODO list

Here we list a series of numerical and astrophysical implementations we would like to include in futre version of pyc2ray.

  • Helium ionization, HeII and HeIII
  • Sources radiative feedback
  • Sources X-ray heating
  • GPU implementation of the chemistry solver
  • multi-frequency UV radiation

CONTRIBUTING

If you find any bugs or unexpected behavior in the code, please feel free to open a Github issue. The issue page is also good if you seek help or have suggestions for us.

AKNOWLEDGMENT

This project was initially developed by Patrick Hirling as part of the astrophysics practical workshop supervised by Michele Bianco during his master's degree at EPFL. You can find the original version of the code on his GitHub page: asora.

About

A flexible and GPU-accelerated Radiative Transfer Framework for Simulating the Cosmic Epoch of Reionization

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published