BayesEoR

BayesEoR: Bayesian 21-cm Power Spectrum Estimation from Interferometric Visibilities - Published in JOSS (2024)

https://github.com/psims/bayeseor

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 7 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
    3 of 5 committers (60.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords from Contributors

astronomy exoplanet

Scientific Fields

Mathematics Computer Science - 37% confidence
Last synced: 6 months ago · JSON representation

Repository

Code to estimate the power spectrum of redshifted 21-cm emission from interferometric observations, within a Bayesian forward modelling framework.

Basic Info
Statistics
  • Stars: 3
  • Watchers: 2
  • Forks: 3
  • Open Issues: 20
  • Releases: 2
Created about 8 years ago · Last pushed 6 months ago
Metadata Files
Readme License

README.md

BayesEoR

DOI

A Bayesian approach to estimating the power spectrum of the Epoch of Reionization (EoR) from interferometric observations.

BayesEoR provides a means of performing a joint Bayesian analysis of models for large-spectral-scale foreground emission and a stochastic signal from redshifted 21-cm emission emitted by neutral Hydrogen during the EoR.

For a detailed description of the methodology, see Sims et al. 2016 and Sims et al. 2019. For more detail on the methodology and demonstrations using simulated data, see Sims and Pober 2019 and Burba et al. 2023.

Installation

Hardware/Software Dependencies

BayesEoR relies on GPUs to perform a Cholesky decomposition on large matrices using the Matrix Algebra on GPU and Multicore Architectures (MAGMA) library. As currently implemented, the following software dependencies must be installed to run BayesEoR: - MAGMA - CUDA - MPI - MultiNest <!-- - PolyChord (better performance than MultiNest for large parameter spaces) -->

BayesEoR has been succesfully run with: - GPUs: NVIDIA P100, V100, and A100 architectures - MAGMA: 2.4.0, 2.5.4, and 2.7.1 - MPI: conda installation (mpich) and OpenMPI 4.0.5 - CUDA: 9.1.85.1 and 11.1.1 - MultiNest: conda installation and a source installation

This is not an exhaustive list of software versions which are compatible with our analysis, just a guide of what versions we have used succesfully in our BayesEoR analyses.

A Note on Using CPUs

While it is in principle possible to run BayesEoR on CPUs, we strongly suggest using GPUs due to their increased speed and precision relative to CPU-based methods.

Python Dependencies

BayesEoR is written primarily in python, with the exception of the MAGMA interface which is written in C (and wrapped in python). The required python dependencies are

  • astropy
  • astropy-healpix
  • gcc_linux-64
  • h5py
  • jsonargparse
  • mpi4py>=3.0.0
  • numpy
  • pip
  • pycuda
  • pymultinest
  • python
  • pyuvdata
  • rich
  • scipy
  • setuptools
  • setuptools_scm
  • sphinx

If you with to install all of these dependencies with conda, you can do so using the included environment.yaml file via conda env create -f environment.yaml

If you have pre-configured installations of CUDA or MPI, e.g. installations optimized/configured for a compute cluster, we suggest installing pycuda and/or mpi4py via pip (and commenting out pycuda and mpi4py in the environment.yaml file). If you install these dependencies with conda, conda will install its own CUDA and MPI binaries which may not be desirable. For pycuda, you need only have the path to your cuda binaries in your bash PATH variable prior to pip installation. For mpi4py, see this article to ensure mpi4py points to the desired MPI installation.

Similarly, if using a pre-configured implementation of MultiNest, pymultinest can also be installed with pip and forced to point to a particular installation by including the MultiNest installation in your LD_LIBRARY_PATH. See the pymultinest documentation for more details.

Documentation

Documentation on how to estimate the power spectrum of redshifted 21-cm emission in a radio interferometric data set using BayesEoR is hosted on ReadTheDocs.

Citation

Users of the code are requested to cite the BayesEoR papers:

  • https://ui.adsabs.harvard.edu/abs/2016MNRAS.462.3069S/abstract
  • https://ui.adsabs.harvard.edu/abs/2019MNRAS.484.4152S/abstract
  • https://ui.adsabs.harvard.edu/abs/2019MNRAS.488.2904S/abstract
  • https://ui.adsabs.harvard.edu/abs/2023MNRAS.520.4443B/abstract

in their publications.

Running BayesEoR

There are two ways to interface with variables in BayesEoR: command line arguments or config files. For a list of available command line arguments and their descriptions, run python run-analysis.py --help or see the documentation for more info on the analysis parameters used by BayesEoR.

The jsonargparse package allows for all of these command line arguments to be set via a yaml configuration file. An example yaml file has been provided (example-config.yaml). Any variable that can be set via a command line argument can also be set in this yaml configuration file (command line arguments containing dashes in the variable name must be replaced with underscores, i.e. the command line argument --data-path can be set in the configuration file via data_path: "/path/to/data.npy"). The example configuration file also specifies the minimally sufficient variables that must be set for a BayesEoR analysis.

run-analysis.py provides an example driver script for running BayesEoR. This file contains all of the necessary steps to set up the PowerSpectrumPosteriorProbability class and to run MultiNest and obtain power spectrum posteriors. If using a configuration file, this driver script can be run via python run-analysis.py --config /path/to/config.yaml

How to contribute

BayesEoR is an open source project and contributions to this package in any form are very welcome (e.g. new features, feature requests, bug reports, documentation fixes). Please make such contributions in the form of an issue and/or pull request. For any additional questions or comments, please contact one of the BayesEoR project managers: - Peter Sims - psims3 [at] asu.edu - Jacob Burba - jacob.burba [at] manchester.ac.uk - Jonathan Pober - jonathan_pober [at] brown.edu

JOSS Publication

BayesEoR: Bayesian 21-cm Power Spectrum Estimation from Interferometric Visibilities
Published
November 18, 2024
Volume 9, Issue 103, Page 6667
Authors
Peter H. Sims ORCID
School of Earth and Space Exploration, Arizona State University, USA
Jacob Burba ORCID
Department of Physics and Astronomy, University of Manchester, UK
Jonathan C. Pober ORCID
Department of Physics, Brown University, USA
Editor
Dan Foreman-Mackey ORCID
Tags
radio astronomy interferometry GPU power spectrum Bayes Epoch of Reionization

GitHub Events

Total
  • Create event: 4
  • Commit comment event: 1
  • Issues event: 19
  • Delete event: 4
  • Issue comment event: 23
  • Push event: 73
  • Pull request review event: 1
  • Pull request event: 7
Last Year
  • Create event: 4
  • Commit comment event: 1
  • Issues event: 19
  • Delete event: 4
  • Issue comment event: 24
  • Push event: 73
  • Pull request review event: 1
  • Pull request event: 7

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 445
  • Total Committers: 5
  • Avg Commits per committer: 89.0
  • Development Distribution Score (DDS): 0.357
Past Year
  • Commits: 29
  • Committers: 3
  • Avg Commits per committer: 9.667
  • Development Distribution Score (DDS): 0.069
Top Committers
Name Email Commits
jburba j****a@b****u 286
jburba j****a@m****k 138
PSims p****1@b****u 19
Warrick Ball w****l@g****m 1
Dan F-M f****y@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 40
  • Total pull requests: 32
  • Average time to close issues: 3 months
  • Average time to close pull requests: 14 days
  • Total issue authors: 4
  • Total pull request authors: 4
  • Average comments per issue: 1.1
  • Average comments per pull request: 1.13
  • Merged pull requests: 24
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 22
  • Pull requests: 11
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 7 days
  • Issue authors: 2
  • Pull request authors: 3
  • Average comments per issue: 0.32
  • Average comments per pull request: 2.55
  • Merged pull requests: 10
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • jburba (27)
  • zonca (9)
  • PSims (2)
  • musoke (2)
Pull Request Authors
  • jburba (24)
  • zonca (4)
  • dfm (2)
  • warrickball (2)
Top Labels
Issue Labels
enhancement (13) bug (9) docs (1)
Pull Request Labels
enhancement (7) bug (2)

Dependencies

docs/requirements.txt pypi
  • sphinx *
  • sphinx_rtd_theme *
pyproject.toml pypi
  • astropy *
  • astropy-healpix *
  • h5py *
  • jsonargparse *
  • numpy *
  • pymultinest *
  • pyuvdata *
  • rich *
  • scipy *
  • setuptools_scm *
environment.yaml conda
  • astropy
  • astropy-healpix
  • gcc_linux-64
  • h5py
  • jsonargparse
  • matplotlib
  • mpi4py >=3.0.0
  • numpy
  • pip
  • pycuda
  • pymultinest
  • python
  • pyuvdata
  • rich
  • scipy
  • setuptools
  • setuptools_scm
  • sphinx