
CosmoStat
Software developed at the CosmoStat lab at CEA Paris-Saclay.
Basic installation
This package has an option to install Sparse2D as a backend (disabled by default).
The package can be installed with pip as follows.
python -m pip install .
To install the Sparse2D backend along with the package installation, run:
BUILD_SPARSE2D=ON python -m pip install .
Requirements
Sparse2D requires the following dependencies.
macOS Set Up
To install the package requirements on macOS, it is recommended to use Homebrew.
brew tap sfarrens/sf
brew install armadillo bigmac cfitsio fftw gsl healpix libomp
Ubuntu Set Up
To install the package requirements on Ubuntu, it is recommended to use apt.
sudo apt-get update
sudo apt-get install -y libarmadillo-dev libcfitsio-dev cmake libfftw3-dev libgsl-dev libhealpix-cxx-dev pkg-config build-essential
Docker installation
Pull the Docker image
If you have Docker installed, you can pull the latest build of the CosmoStat image as follows:
docker pull ghcr.io/cosmostat/cosmostat:master
No further installation is required.
Run a Docker container
To run a container on data in your current working directory, simply run:
docker run -v ${PWD}:/workdir --rm ghcr.io/cosmostat/cosmostat:master
The reference to ${PWD} can be replaced by the path to any directory on your system.
Additionally, you can run a Sparse2D executables dirextly from the image. For example, to run a bspline wavelet transform on a FITS image called myfile.fits you would run:
docker run -v ${PWD}:/workdir --rm ghcr.io/cosmostat/cosmostat:master mr_transform -t 2 myfile.fits myoutput.mr
Tip: If you don't want to constantly write the full Docker run command you can create an alias e.g.:
alias cosmostat="docker run -v ${PWD}:/workdir --rm ghcr.io/cosmostat/cosmostat:master"
then you can simply run e.g.:
cosmostat mr_transform -h
Launch a Jupyter notebook
You can also run a Jupyter notebook with a Docker container as the backend in order to use the cosmostat package.
docker run -p 8888:8888 -v ${PWD}:/workdir --rm ghcr.io/cosmostat/cosmostat:master notebook