Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/julienpeloton/lafabrique
Generate simulated datasets for CMB experiments
https://github.com/julienpeloton/lafabrique
cmb simulated-datasets
Last synced: about 2 months ago
JSON representation
Generate simulated datasets for CMB experiments
- Host: GitHub
- URL: https://github.com/julienpeloton/lafabrique
- Owner: JulienPeloton
- License: gpl-3.0
- Created: 2017-04-20T13:05:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-21T11:16:55.000Z (over 7 years ago)
- Last Synced: 2024-11-13T10:15:19.076Z (about 2 months ago)
- Topics: cmb, simulated-datasets
- Language: Python
- Size: 1.7 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
LaFabrique [![Build Status](https://travis-ci.org/JulienPeloton/LaFabrique.svg?branch=master)](https://travis-ci.org/JulienPeloton/LaFabrique)
==![ScreenShot](https://github.com/JulienPeloton/LaFabrique/blob/master/additional_files/outputs.png)
## The package
This package contains scripts for generating simulated CMB datasets (current and future)
* Noise
* Generate (inhomogeneous) noise maps
* Covariances
* Generate covariance matrices (in the sense inverse noise weights)
* Foregrounds
* Generate foregrounds maps (dust, synchrotron, freefree, spinningdust, ...) based on the PySM
* Frequency coverage
* Multi-frequency
* Sky coverage
* Scanning strategy simulator included## Before starting
This code has the following dependencies (see the travis install section):
* numpy, pylab, scipy, etc (required)
* healpy >= 1.9.1 (required)
* h5py (required) + libhdf5 if using linux
* weave (optional if scipy <= v0.18 - required otherwise because no longer part of scipy v0.19)
* ephem (required - for scanning strategy)
* mpi4py (optional - for parallel computing)
* InsideMe (optional - for profiling of the code, see https://github.com/JulienPeloton/InsideMe)
* PySM (optional - foreground generation, see https://github.com/bthorne93/PySM_public)## Installation
You can easily install the package using pip
```bash
pip install LaFabrique
```Otherwise, you can clone the repo from the github repository and
use the setup.py for the installation. Just run:
```bash
python setup.py install
```
Make sure you have correct permissions (otherwise just add --user).
You can also directly use the code by updating manually your PYTHONPATH.
Just add in your bashrc:
```bash
LaFabriquePATH=/path/to/the/package
export PYTHONPATH=$PYTHONPATH:$LaFabriquePATH
```## Usage
You can find ini files to have a quick usage:```bash
python generate_dataset.py -h
python generate_dataset.py -setup_env setup_env.ini
```The code has a parallel architecture, which can be useful for large noise
simulations at high resolution (simulation of scan strategy and
foregrounds are done serially for the moment).
For example, just use (replace mpirun by your favourite one):```bash
mpirun -n python generate_dataset.py
-setup_env setup_env.ini
-setup_scanning setup_scanning.ini
-setup_instrument setup_instrument.ini
```Note that at NERSC, you have to replace the python binary by python-mpi which is
optimized for parallel computing.Here is the breakdown of the code for 100 noise simulations for 8 frequency channels on 48 processors
at a resolution of nside = 2048, and a few percent of the sky. Notice that the
Cholesky factorisation is done only once per processor for each frequency band and
for all MC simulations (corresponds to 48[proc] * 8[freq] = 384 calls below).![ScreenShot](https://github.com/JulienPeloton/LaFabrique/blob/master/additional_files/perf_100MC_nside2048.png)
## License
GNU License (see the LICENSE file for details) covers all files
in the LaFabrique repository unless stated otherwise.