Git Product home page Git Product logo

21cmpy's Introduction

21cmpy

PyCUDA implementation of 21cmFAST: in working progress

21cmFAST ([[1]]) is a semi-numerical simulation package for the epoch of reionization. This PyCUDA based implementation aims to improve the original C-code ([[2]]) through the performance benefit of GPU compute and user-friendliness of the Python API.

This package currently has the following main components (See [[1]] for details. ):

  1. initialize.py: Creates initial density and velocity boxes by MRG random generator in Fourier space. Initialization requires a large box (DIM) and a smaller box (HII_DIM).

  2. perturb_field.py: perturb initial density fields to given redshifts via linear or Zeldovich approximations and update the velocities accordingly. (Currently only supports DIM that fit on the GPU. )

  3. find_HII_bubbles.py: Excursion set algorithm, also called Fast Fourier Radiative Transfer (FFRT) to paint ionization fields based on density fields. (see attached gif for sample 2d slice in this process).

  4. delta_T.py: computes brightness temperature and 21cm power spectrum.

ES

Sample Usage

This package is still in working progress. Current sample usage is as follows:

git clone 21cmpy ./Py21cm

First modify INIT_PARAMS.py, then outside of the directory

python -m Py21cm.Programs.initialize
python -m Py21cm.Programs.perturb_field
python -m Py21cm.Programs.find_HII_bubbles
python -m Py21cm.Programs.delta_T

Dependencies

numpy, matplotlib, pycuda, cosmolopy

References

[1] 21cmFAST: A Fast, Semi-Numerical Simulation of the High-Redshift 21-cm Signal. Andrei Mesinger, Steven Furlanetto, Renyue Cen arXiv:1003.3878

[2] 21cmFast code by Andrei Messinger

[3] tocmfastpy by Jonathan Pritchard

21cmpy's People

Contributors

yunfanz avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.