popsynth

popsynth: A generic astrophysical population synthesis framework - Published in JOSS (2021)

https://github.com/grburgess/popsynth

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: joss.theoj.org, zenodo.org
  • Committers with academic emails
    1 of 5 committers (20.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

astronomy astrophysics population population-synthesis simulation statistics
Last synced: 4 months ago · JSON representation

Repository

A generic flux/parameter population synthesis code

Basic Info
Statistics
  • Stars: 14
  • Watchers: 2
  • Forks: 5
  • Open Issues: 0
  • Releases: 2
Topics
astronomy astrophysics population population-synthesis simulation statistics
Created about 7 years ago · Last pushed about 2 years ago
Metadata Files
Readme License

README.md

CI codecov Codacy Badge Documentation Status DOI PyPI PyPI - Downloads status

popsynth

alt text

popsynth core function is to create observed surveys from latent population models.

First, let's define what a population of objects is in terms of a generative model. The two main ingredients are the objects' spatial distribution () and the distribution of their inherent properties (). Here, are the latent population parameters, are the spatial locations of the objects, and are the properties of the individual objects (luminosity, spin, viewing angle, mass, etc.). The spatial distribution is defined such that:

is the intensity of objects for a given set of population parameters. With these definitions we can define the probability for an object to have position and properties as

popsynth allows you to specify these spatial and property distributions in an object-oriented way to create surveys. The final ingredient to creating a sample for a survey is knowing how many objects to sample from the population (before any selection effects are applied). Often, we see this number in simulation frameworks presented as "we draw N objects to guarantee we have enough." This is incorrect. A survey takes place over a given period of time () in which observed objects are counted. This is a description of a Poisson process. Thus, the number of objects in a simulation of this survey is a draw from a Poisson distribution:

Thus, popsynth first numerically integrates the spatial distribution to determine the Poisson rate parameter for the given $\vec{\psi}$, then makes a Poisson draw for the number of objects in the population survey. For each object, positions and properties are drawn with arbitrary dependencies between them. Finally, selection functions are applied to either latent or observed (with or without measurement error) properties.

Note: If instead we draw a preset number of objects, as is done in many astrophysical population simulation frameworks, it is equivalent to running a survey up until that specific number of objects is detected. This process is distributed as a negative binomial process, i.e, wait for a number of successes and requires a different statistical framework to compare models to data.

Installation

bash pip install popsynth

Note: This is not synth pop! If you were looking for some hard driving beats out of a yamaha keyboard with bells... look elsewhere

alt text

Contributing

Contributions to popsynth are always welcome. They can come in the form of:

Bug reports

Please use the Github issue tracking system for any bugs, for questions, and or feature requests.

Code and more distributions

While it is easy to create custom distributions in your local setup, if you would like to add them to popsynth directly, go ahead. Please include tests to ensure that your contributions are compatible with the code and can be maintained in the long term.

Documentation

Additions or examples, tutorials, or better explanations are always welcome. To ensure that the documentation builds with the current version of the software, I am using jupytext to write the documentation in Markdown. These are automatically converted to and executed as jupyter notebooks when changes are pushed to Github.

Owner

  • Name: J. Michael Burgess
  • Login: grburgess
  • Kind: user
  • Location: München, Germany
  • Company: Max-Planck-Institut für extraterrestrische Physik

JOSS Publication

popsynth: A generic astrophysical population synthesis framework
Published
July 17, 2021
Volume 6, Issue 63, Page 3257
Authors
J. Michael Burgess ORCID
Max Planck Institute for Extraterrestrial Physics, Giessenbachstrasse, 85748 Garching, Germany
Francesca Capel ORCID
Technical University of Munich, Boltzmannstrasse 2, 85748 Garching, Germany
Editor
Juanjo Bazán ORCID
Tags
astronomy population synthesis cosmology

GitHub Events

Total
Last Year

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 785
  • Total Committers: 5
  • Avg Commits per committer: 157.0
  • Development Distribution Score (DDS): 0.096
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
grburgess j****s@g****m 710
Francesca Capel c****a@g****m 62
Elisa Schösser e****e@m****e 10
The Codacy Badger b****r@c****m 2
Juanjo Bazán j****n@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 0
  • Total pull requests: 50
  • Average time to close issues: N/A
  • Average time to close pull requests: about 15 hours
  • Total issue authors: 0
  • Total pull request authors: 5
  • Average comments per issue: 0
  • Average comments per pull request: 0.84
  • Merged pull requests: 49
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • grburgess (35)
  • cescalara (11)
  • codacy-badger (2)
  • eschoesser (1)
  • xuanxu (1)
Top Labels
Issue Labels
Pull Request Labels
enhancement (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 254 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 27
  • Total maintainers: 1
pypi.org: popsynth

A population synthesis code

  • Versions: 27
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 254 Last month
Rankings
Dependent packages count: 10.1%
Stargazers count: 14.9%
Forks count: 15.4%
Average: 19.6%
Dependent repos count: 21.6%
Downloads: 35.8%
Maintainers (1)
Last synced: 4 months ago

Dependencies

docs/requirements.txt pypi
  • astropy *
  • betagen *
  • better_apidoc *
  • class-registry *
  • cython *
  • h5py *
  • ipykernel *
  • ipython *
  • ipyvolume *
  • jupyterthemes *
  • matplotlib *
  • nbsphinx *
  • numba *
  • numpy >=1.20
  • pandas *
  • recommonmark *
  • scipy *
  • sphinx >=1.4
  • sphinx-gallery *
  • tqdm *
.github/workflows/autoyapf.yml actions
  • actions/checkout master composite
  • mritunjaysharma394/autoyapf v2 composite
.github/workflows/build_test.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • codecov/codecov-action v1 composite
  • pypa/gh-action-pypi-publish master composite
.github/workflows/docs.yml actions
  • actions/checkout v2 composite
  • actions/download-artifact master composite
  • actions/setup-python v2 composite
  • actions/upload-artifact v2 composite
  • ad-m/github-push-action master composite
  • sphinx-notes/pages master composite
  • ts-graphviz/setup-graphviz v1 composite
.github/workflows/paper.yml actions
  • actions/checkout v2 composite
  • actions/upload-artifact v1 composite
  • actions/upload-artifact v2 composite
  • docker://openjournals/paperdraft latest composite
  • openjournals/openjournals-draft-action master composite
pyproject.toml pypi
setup.py pypi