CMBLensing.jl is a next-generation tool for analysis of the lensed Cosmic Microwave Background. It is written in Julia and transparently callable from Python.
At its heart, CMBLensing.jl maximizes or samples the Bayesian posterior for the CMB lensing problem. It also contains tools to quickly manipulate and process CMB maps, set up modified posteriors, and take gradients using automatic differentation.
The best place to get started is to read the documentation (which is a work-in-progress, but contains many useful examples).
Most of the pages in the documentation are Jupyter notebooks, and you can click the "launch binder" link at the top of each page to launch a Jupyterlab server running the notebook in your browser (courtesy of binder).
You can also clone the repostiory and open the notebooks in docs/src if you want to run them locally (which will usually lead to higher performance). The notebooks are stored as
.md files rather than
.ipynb format. Its recommented to install Jupytext (
pip install jupytext) and then you can run these
.md directly from Jupyterlab by right-clicking on them and selecting
Open With -> Notebook. Otherwise, run the script
docs/make_notebooks.sh to convert the
.md files to
.ipynb which you can then open as desired.
To install the Julia package locally, run:
pkg> add CMBLensing
] at the Julia REPL to reach the
Also provided is a Docker container which includes a Jupyterlab server and all the recommended and optional dependencies to run and use
CMBLensing.jl. Launch this container with:
git clone https://github.com/marius311/CMBLensing.jl.git cd CMBLensing.jl docker-compose pull docker-compose up
The first time you run this, it will automatically download the (~1Gb) container from the Docker hub. The command will prompt you with the URL which you should open in a browser to access the notebook.
To run the notebook on a different port than the default
PORT=1234 docker-compose up where
1234 is whatever port number you want.
You can also build the container locally by replacing
docker-compose pull with
docker-compose build above.
8 days ago