Skip to main content

Empirically estimating the distribution of the loudest candidate from a gravitational-wave search

Project description

distromax

arXiv DOI Integration Tests PyPI version

Empirically estimating the distribution of the loudest candidate from a gravitational-wave search

This package implements the methods described in Tenorio, Modafferi, Keitel, Sintes (2021) to estimate the distribution of the loudest candidate from a search.

The actual implementation includes:

  • fit.py:
    • BatchMaxGumbel: Basic distromax method. Construct the batchmax distribution of a set of samples and return the corresponding Gumbel fit. Max. propagation is included as a method.
    • BatchMaxGumbelNotchingOutlier: Thin wrapper around BatchMaxGumbel to notch narrow-band outliers before computing the batchmax distribution. The specifics of this implementation are discussed on appendix B of the accompanying publication.
  • analytical.py:
    • AnalyticalGammaToGumbel: Compute the Gumbel distribution associated to the maximum of a set of independent Gamma random variables using the formulas derived in Gasull, López-Salcedo, Utzet (2015).

See the examples for concrete applications of these classes.

Citing this work

If distromax was useful for your work, we would appreciate if you cite both the software version DOI under Zenodo and one or more of the following scientific papers:

Here is a better-formatted bibtex entry for the version-independent Zenodo:

@misc{distromax,
  author       = {Tenorio, Rodrigo and
                  Modafferi, Luana M. and
                  Keitel, David and
                  Sintes, Alicia M.},
  title        = {distromax: Empirically estimating the distribution of the loudest candidate from a gravitational-wave search},
  month        = dec,
  year         = 2021,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.5763765},
  url          = {https://doi.org/10.5281/zenodo.5763765},
  note         = {\url{https://doi.org/10.5281/zenodo.5763765}}
}

For individual version DOIs, see the right sidebar at Zenodo

How to install

Please, make sure you are running on a virtual environment to avoid any conflicts with system libraries.

The simplest way is to install distromax from PyPI using pip:

pip install distromax

To install directly from source, clone this repo with git clone and install using pip

git clone https://github.com/Rodrigo-Tenorio/distromax.git
cd distromax
pip install .

Support for installations from conda-forge will be ready in a few.

Troubleshooting

In some conservative systems the default setuptools may not be the latest version and installing from source may produce an erorr message such as

ERROR: setuptools==44.1.1 is used in combination with setuptools_scm>=6.x

Your build configuration is incomplete and previously worked by accident!


This happens as setuptools is unable to replace itself when a activated build dependency
requires a more recent setuptools version
(it does not respect "setuptools>X" in setup_requires).


setuptools>=31 is required for setup.cfg metadata support
setuptools>=42 is required for pyproject.toml configuration support

Suggested workarounds if applicable:
 - preinstalling build dependencies like setuptools_scm before running setup.py
 - installing setuptools_scm using the system package manager to ensure consistency
 - migrating from the deprecated setup_requires mechanism to pep517/518
   and using a pyproject.toml to declare build dependencies
   which are reliably pre-installed before running the build tools

A simple workaround in that case is to update the pip and setuptools packages

pip install --upgrade pip setuptools

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

distromax-1.0.2.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

distromax-1.0.2-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file distromax-1.0.2.tar.gz.

File metadata

  • Download URL: distromax-1.0.2.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for distromax-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d8591df824bfa320dbbc6e8fcf7cdd250cdb36a38a2f19313273cae1105a4034
MD5 2abcc17c87ed2c0c2dbe4b06220554de
BLAKE2b-256 d8a1dd58d779de9bffc6bfd2fea8a457f6471ebb50cc387cf1c5d0f304a31cbb

See more details on using hashes here.

File details

Details for the file distromax-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: distromax-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for distromax-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f7a8d5b18dd316166203bf9e088cb41081f4fbe85934e63d2224b6e1b5a0f29e
MD5 7a7174ddc9070ecf2ba48735d5fbe0d2
BLAKE2b-256 f71818e9e000e9a1fba438973a5f67ebb18c0d3065bfa64246333f2c5ea60edd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page