Skip to main content

distromax

arXiv DOI Anaconda-Server Badge Integration Tests Anaconda-Server Badge 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

distromax can also be installed using conda from the conda-forge channle as follows:

conda install -c conda-forge distromax

See the official documentation to learn about conda environments.

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 .

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

Metadata

Release files for distromax 1.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for distromax 1.2.3
File Size Uploaded
distromax-1.2.3.tar.gz 24.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for distromax 1.2.3
File Interpreter ABI Platform
distromax-1.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 37.1 kB

Release files / distromax-1.2.3.tar.gz

Download URL distromax-1.2.3.tar.gz
Size 24.5 kB
Tags Source
SHA-256 checksum
How to use checksums
92718c9313f77314d986077992186c2bf71639e3890b48bbbd0dddc5e326cde3
BLAKE2b-256 checksum
How to use checksums
3cb8f84ba4fe395707ea8822dde8e2b9a7c18a08530c978b0f4e073fab3b6685
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 8, 2025.

Transparency log

Release files / distromax-1.2.3-py3-none-any.whl

Download URL distromax-1.2.3-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ad4e54b9bdca308f85af84c46ac08747ef06b327c1785ad7cacf20066e12ff3
BLAKE2b-256 checksum
How to use checksums
d095f8fcd386e14031c4e37d7c0cb721d3f936ce496181ca18c50b16c4a58006
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 8, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.3 This release

2 release files

1.1.1

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page