Skip to content

simonsobs/PSpipe

Repository files navigation

https://travis-ci.com/simonsobs/PSpipe.svg?branch=master

PSpipe is a pipeline creator for the analysis of the high resolution maps of the large aperture telescope of the Simons Observatory. It contains tools for estimating power spectra and a multi-frequency likelihood interfaced with the cobaya MCMC sampler.

The pipelines are mainly written in python and make use of three different codes,

The package is licensed under the BSD license.

  • Python >= 3.8
  • FFTW: version 3 required

If the previous requirements are fulfilled, you can install the PSpipe package with its dependencies by doing

$ pip install --user git+https://github.com/simonsobs/PSpipe.git

If you plan to develop or want to use the different projects, it is better to checkout the latest version by doing

$ git clone https://github.com/simonsobs/PSpipe.git /where/to/clone

Then you can install the PSpipe library and its dependencies via

$ pip install --user /where/to/clone

Given the number of requirements, you can use a docker image already made with the needed libraries and everything compiled. You should first install docker for your operating system.

We have written a simple bash script to install the PSpipe docker and to clone the main PSpipe libraries. Just copy the script in a directory where you want to work with pspipe and run

$ ./run_docker.sh

This will open a new bash terminal with a full installation of PSpipe, pixell, NaMaster, pspy... For instance, you can start the ipython interpreter and run the following import command

$ ipython
Python 3.6.9 (default, Nov  7 2019, 10:44:02)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.11.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import pixell, pymaster, pspy

You can run the python scripts from the tutorials directory of PSpipe.

When you are done with the image, just type exit and you will go back to your local machine prompt.

It is also possible to start a jupyter server from the PSpipe image and run it into your web browser. Inside the image terminal, you have to start the jupyter server by typing

$ jupyter notebook --ip 0.0.0.0

Finally open the http link (something like http://127.0.0.1:8888/?token...) within your web browser and you should be able to run one of the python notebook.

Everything perfomed within the /home/pspipe/workspace directory will be reflected into the /where/to/work_with_pspipe on your host machine. You can then share configuration files, source codes, data files... between the running docker container and your local machine. Nothing will be lost after you exit from the docker container.

Docker for Mac limits the resource available to 2Gb of RAM by default, This might cause the code to crash unexpectedly with a cryptic Killed message. It can easily be modified, click on the docker logo (top right of your screen), go in Preferences/Resources and increase the RAM allocated to Docker.

You are not ready for it: youtube