Simulating instrumental systematics of Cosmic Microwave Background experiments with s4cmb

Simulating instrumental systematics of Cosmic Microwave Background experiments with s4cmb - Published in JOSS (2021)

https://github.com/julienpeloton/s4cmb

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: arxiv.org, joss.theoj.org
  • Committers with academic emails
    3 of 12 committers (25.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

cmb instrument simulation systematics

Scientific Fields

Psychology Social Sciences - 40% confidence
Last synced: 4 months ago · JSON representation

Repository

Simulation of instrumental systematic effects in the context of CMB observations

Basic Info
  • Host: GitHub
  • Owner: JulienPeloton
  • License: gpl-3.0
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 10.7 MB
Statistics
  • Stars: 10
  • Watchers: 8
  • Forks: 19
  • Open Issues: 11
  • Releases: 12
Topics
cmb instrument simulation systematics
Created over 8 years ago · Last pushed 8 months ago
Metadata Files
Readme Changelog Contributing License

README.rst

=============================
s4cmb
=============================

.. image:: https://github.com/JulienPeloton/s4cmb/workflows/s4cmb/badge.svg
    :target: https://github.com/JulienPeloton/s4cmb/actions?query=workflow%3As4cmb

.. image:: https://github.com/JulienPeloton/s4cmb/workflows/PEP8/badge.svg
    :target: https://github.com/JulienPeloton/s4cmb/actions?query=workflow%3APEP8

.. image:: https://coveralls.io/repos/github/JulienPeloton/s4cmb/badge.svg?branch=master
    :target: https://coveralls.io/github/JulienPeloton/s4cmb?branch=master
    
.. image:: https://joss.theoj.org/papers/10.21105/joss.03022/status.svg
   :target: https://doi.org/10.21105/joss.03022

.. raw:: html

    

.. contents:: **Table of Contents**

The package
===============
Systematics For Cosmic Microwave Background (`s4cmb`) is a Python package developed to study the impact of instrumental systematic effects on measurements of CMB experiments based on bolometric detector technology.
`s4cmb` provides a unified framework to simulate raw data streams in the time domain (TODs) acquired by CMB experiments scanning the sky, and to inject in these realistic instrumental systematics effect.
The development of `s4cmb` is built on experience and needs of the analysis of
data of the Polarbear ground-based experiment (see e.g. `1403.2369 `_ and `1705.02907 `_).
It is designed to analyze real data, to guide the design of future instruments that require the estimation of specific systematic effects as well as to increase the realism of simulated data sets required in the development of data analysis methods. Users can currently model and study: 

* Electrical crosstalk in the multiplexed readout.
* Relative gain-calibration uncertainty between the two detectors in a focal plane pixel.
* Time drift of the gains between two consecutive calibration measurements.
* Differential pointing between the two detectors in a pixel.
* ... more to come!

The simplicity of the `s4cmb` framework allows to easily add new instrumental systematics to be simulated according to the users' needs.
As far as we know, s4cmb is the only dedicated package that enables the study of a wide range of instrumental simulations, from the instrument to the sky map, while being publicly available. For more general purposes, including some instrumental systematic effect simulations, users might also consider the use of `TOAST `_, a software framework to simulate and process timestream data collected by telescopes focusing on efficient TOD manipulation on massively parallel architectures.


Requirements
===============
The package is mainly written in python (>= 3.6), and it adopts several commonly used libraries in astronomy (`astropy`, `healpy`, `ephem`, `pyslalib`) and uses functions based on low-level languages wrapped in Python (e.g. Fortran with `f2py`) for speeding up the most critical part of the code without losing the flexibility provided by a simple python user-friendly interface. It has the following dependencies (see requirements.txt):

* numpy, matplotlib
* astropy, ephem, pyslalib, healpy (astro libs)
* f2py (interfacing with python)

The compilation of Fortran parts is done usually when you install the
package (see setup.py), but we also provide a Makefile for more
customized compilations (see the Makefile in s4cmb).

Installation
===============

`s4cmb` is designed to be employed on systems of varying scale, from laptops to parallel supercomputing platforms thanks to its internal Message Passing Interface (MPI) support. We also support packaging the entire application into a Docker container for portability. 

**I just want to use the code:**

You can easily install the package using pip

::

    pip install s4cmb

**In addition to use the code, I want to be a developer:**

The best is to fork the repo from this github repository to your account and clone it to your machine.
Once you have the repo cloned on your machine, use the makefile to compile the source

::

    cd /path/to/s4cmb
    pip install -r requirements.txt
    make

Do not forget to update your PYTHONPATH. Just add in your bashrc:

::

    s4cmbPATH=/path/to/the/s4cmb
    export PYTHONPATH=$PYTHONPATH:$s4cmbPATH

Then run the test suite and the coverage:

::

    ./coverage_and_test.sh

It should print the actual coverage of the test suite, and exit with no errors.

Installation and usage at NERSC
===============

Again, you can easily install the package using pip

::

    pip install s4cmb --user

Alternatively, if you want to do dev at NERSC and do a manual installation, it's better to keep most of your packages under Anaconda.
I recommend to have a look first at the `NERSC page `_ describing how to use it.

The installation of s4cmb can be done in few steps:

* Clone the repo somewhere in your $HOME
* Install dependencies (see requirements.txt) using Anaconda
* Compile the source (using make in /path/s4cmb)

Working with Docker
===============
Alternatively if you do not want install the package on your computer,
we provide a docker image for s4cmb with always the latest version. Install
docker on your computer, and pull the image:

::

    docker pull julienpeloton/s4cmb:latest

Then create a new container and run an interactive session by just running

::

    docker run -i -t julienpeloton/s4cmb:latest bash

Quick examples
===============
We provide a quick end-to-end example for using the package:

::

    python examples/test/simple_app.py -inifile examples/inifiles/simple_parameters.py -tag test

You can also run it on many processors, using MPI (you will need the package mpi4py):

::

    mpirun -n  python examples/test/simple_app.py -inifile examples/inifiles/simple_parameters.py -tag test_MPI

where nproc should not be greater than the number of scans to run.
Note that for NERSC users, we also provide a quick submission script for jobs on Cori (see examples/nersc_cori.batch).

s4cmb bootcamp
===============

You can find a bootcamp in two parts (notebooks + examples) at `s4cmb-resources `_.
The goal of this bootcamp is to describe the basic parts of the API, and provide ready-to-use examples (for use on laptop and supercomputer).


TODO
===============

* Add WHWP demodulation module.
* Add correlated noise simulator (and update mapmaking weights).

Main developers
===============
* Julien Peloton (peloton at lal.in2p3.fr)
* Giulio Fabbian (g.fabbian at sussex.ac.uk)

Thanks to
===============
* @ngoecknerwald: original author for a large part of the scanning strategy module.
* @giuspugl, @dpole, @joydidier, and all `contributors `_ for all valuable comments, tests, and feedbacks!

In the literature
===============

The package has already been used in a number of scientific and technical publications:

* Instrumental systematics biases in CMB lensing reconstruction: a simulation-based assessment (`2011.13910 `_)
* Development of Calibration Strategies for the Simons Observatory (`1810.04633 `_)
* Studies of Systematic Uncertainties for Simons Observatory: Detector Array Effects (`1808.10491 `_)
* Studies of Systematic Uncertainties for Simons Observatory: Polarization Modulator Related Effects (`1808.07442 `_)
* Iterative map-making with two-level preconditioning for polarized Cosmic Microwave Background data sets (`1801.08937 `_)

Support
===============

.. raw:: html

    

Owner

  • Name: Julien
  • Login: JulienPeloton
  • Kind: user
  • Company: CNRS

JOSS Publication

Simulating instrumental systematics of Cosmic Microwave Background experiments with s4cmb
Published
April 06, 2021
Volume 6, Issue 60, Page 3022
Authors
Giulio Fabbian ORCID
Department of Physics & Astronomy, University of Sussex, Brighton BN1 9QH, UK, School of Physics and Astronomy, Cardiff University, The Parade, Cardiff, CF24 3AA, UK
Julien Peloton ORCID
Université Paris-Saclay, CNRS/IN2P3, IJCLab, Orsay, France
Editor
Monica Bobra ORCID
Tags
cosmology CMB telescopes systematics

GitHub Events

Total
  • Watch event: 1
  • Issue comment event: 5
  • Push event: 17
  • Pull request event: 2
  • Fork event: 2
Last Year
  • Watch event: 1
  • Issue comment event: 5
  • Push event: 17
  • Pull request event: 2
  • Fork event: 2

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 495
  • Total Committers: 12
  • Avg Commits per committer: 41.25
  • Development Distribution Score (DDS): 0.238
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
peloton j****n@s****k 377
Julien p****n@l****r 76
gfabbian g****n@i****r 23
mark m****n@s****k 10
Reijo Keskitalo r****o@g****m 2
gfabbian o****6@g****m 1
Joy Didier d****y@g****m 1
Mark Mirmelstein m****m@e****v 1
Mark Mirmelstein m****m@e****v 1
Mark Mirmelstein m****m@c****v 1
Mark Mirmelstein m****m@c****v 1
Julien j****n@J****l 1

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 30
  • Total pull requests: 38
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 3 days
  • Total issue authors: 9
  • Total pull request authors: 7
  • Average comments per issue: 2.27
  • Average comments per pull request: 1.55
  • Merged pull requests: 33
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 3.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • JulienPeloton (15)
  • smsimon (5)
  • joydidier (3)
  • MariaJK (2)
  • dpole (1)
  • aboucaud (1)
  • gfabbian (1)
  • markm42 (1)
  • Helbouha (1)
Pull Request Authors
  • JulienPeloton (26)
  • markm42 (6)
  • gfabbian (3)
  • Magwos (2)
  • joydidier (1)
  • keskitalo (1)
  • danielskatz (1)
Top Labels
Issue Labels
enhancement (9) question (4) continuous integration (3) help wanted (3) documentation (1) joss (1) bug (1) pointing (1) code quality (1) dependencies (1) python version (1) subtlety (1)
Pull Request Labels
continuous integration (5) bug (4) documentation (2) release (2) enhancement (1) pointing (1) code quality (1) beam (1) numpy/f2py (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 12 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 10
  • Total maintainers: 1
pypi.org: s4cmb

Simulate systematic effects in the context of CMB

  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 12 Last month
Rankings
Forks count: 8.9%
Dependent packages count: 10.1%
Average: 18.4%
Stargazers count: 18.5%
Dependent repos count: 21.6%
Downloads: 32.7%
Maintainers (1)
Last synced: 4 months ago

Dependencies

requirements.txt pypi
  • astropy >=1.2
  • coverage >=4.2
  • coveralls *
  • ephem >=3.7.6.0
  • healpy >=1.10.3
  • matplotlib >=2.0.0
  • mpi4py >=2.0.0
  • numpy >=1.14
  • scipy >=0.19.1
.github/workflows/lint-s4cmb.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/publish.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/test-s4cmb.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
Dockerfile docker
  • python 3.6 build
setup.py pypi