archeo


Namearcheo JSON
Version 1.2.1 PyPI version JSON
download
home_pagehttps://pypi.org/project/archeo/
SummaryA Bayesian framework for estimating natal kick, ancestral masses and spins of black holes.
upload_time2025-01-10 16:24:55
maintainerNone
docs_urlNone
authorwyhwong
requires_python<4.0,>=3.9
licenseMIT
keywords black-holes gravitational-waves black-hole-archeology
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## ARCHEO - Inferring the natal kick and parental masses posterior of black holes in Pair-instability Supernova (PISN) gap.

[![github](https://img.shields.io/badge/GitHub-archeo-blue.svg)](https://github.com/wyhwong/archeo)
[![PyPI version](https://badge.fury.io/py/archeo.svg)](https://pypi.org/project/archeo/)
[![DOI](https://zenodo.org/badge/626377469.svg)](https://doi.org/10.5281/zenodo.14306853)
[![Downloads](https://img.shields.io/pepy/dt/archeo)](https://github.com/wyhwong/archeo)
[![Python version](https://img.shields.io/pypi/pyversions/archeo)](https://pypi.org/project/archeo/)
[![license](https://img.shields.io/badge/license-MIT-orange.svg)](https://github.com/wyhwong/archeo/blob/main/LICENSE)
[![CI](https://github.com/wyhwong/archeo/actions/workflows/main.yml/badge.svg)](https://github.com/wyhwong/archeo/actions/workflows/main.yml/)

## Basic Usage

The following example demonstrates how to use the package to visualize the prior and posterior distributions of a single event.

```python
import archeo

# Load the mass/spin samples from a file
# They are expected to be a list of floats
mass_posterior = [68.0, 71.4, ..., 91.4]
spin_posterior = [0.31, 0.54, ..., 0.64]

# Create a prior (preset priors are "precessing", "aligned_spin", and "positively_aligned_spin")
prior = archeo.Prior.from_config("precessing")
# Create a posterior from the samples and the prior
posterior = prior.to_posterior(mass_posterior, spin_posterior)

# Visualize the prior and the posterior
archeo.visualize_prior_distribution(prior, output_dir="./")
archeo.visualize_posterior_estimation({"GW190521": posterior}, output_dir="./")
```

## Configure your own prior

Check out the preset priors in [precessing.py](https://github.com/wyhwong/archeo/blob/main/src/archeo/preset/precessing.py) and [aligned_spin.py](https://github.com/wyhwong/archeo/blob/main/src/archeo/preset/aligned_spin.py). From that, one should be able to create their own prior by following the same structure.

# Credits
The code is maintained by [Henry Wong](https://github.com/wyhwong) under [Juan Calderon Bustillo](https://git.ligo.org/juan.calderonbustillo)'s supervision. You can find the [list of contributors](https://github.com/wyhwong/archeo/graphs/contributors) here. Please report bugs by raising an issue on our [GitHub](https://github.com/wyhwong/archeo) repository.

            

Raw data

            {
    "_id": null,
    "home_page": "https://pypi.org/project/archeo/",
    "name": "archeo",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "black-holes, gravitational-waves, black-hole-archeology",
    "author": "wyhwong",
    "author_email": "wyhwong@link.cuhk.edu.hk",
    "download_url": "https://files.pythonhosted.org/packages/71/a9/fc2a5b2a490a22e10bb1714c957e07b565270f3f39880461af6ddd04f0d8/archeo-1.2.1.tar.gz",
    "platform": null,
    "description": "## ARCHEO - Inferring the natal kick and parental masses posterior of black holes in Pair-instability Supernova (PISN) gap.\n\n[![github](https://img.shields.io/badge/GitHub-archeo-blue.svg)](https://github.com/wyhwong/archeo)\n[![PyPI version](https://badge.fury.io/py/archeo.svg)](https://pypi.org/project/archeo/)\n[![DOI](https://zenodo.org/badge/626377469.svg)](https://doi.org/10.5281/zenodo.14306853)\n[![Downloads](https://img.shields.io/pepy/dt/archeo)](https://github.com/wyhwong/archeo)\n[![Python version](https://img.shields.io/pypi/pyversions/archeo)](https://pypi.org/project/archeo/)\n[![license](https://img.shields.io/badge/license-MIT-orange.svg)](https://github.com/wyhwong/archeo/blob/main/LICENSE)\n[![CI](https://github.com/wyhwong/archeo/actions/workflows/main.yml/badge.svg)](https://github.com/wyhwong/archeo/actions/workflows/main.yml/)\n\n## Basic Usage\n\nThe following example demonstrates how to use the package to visualize the prior and posterior distributions of a single event.\n\n```python\nimport archeo\n\n# Load the mass/spin samples from a file\n# They are expected to be a list of floats\nmass_posterior = [68.0, 71.4, ..., 91.4]\nspin_posterior = [0.31, 0.54, ..., 0.64]\n\n# Create a prior (preset priors are \"precessing\", \"aligned_spin\", and \"positively_aligned_spin\")\nprior = archeo.Prior.from_config(\"precessing\")\n# Create a posterior from the samples and the prior\nposterior = prior.to_posterior(mass_posterior, spin_posterior)\n\n# Visualize the prior and the posterior\narcheo.visualize_prior_distribution(prior, output_dir=\"./\")\narcheo.visualize_posterior_estimation({\"GW190521\": posterior}, output_dir=\"./\")\n```\n\n## Configure your own prior\n\nCheck out the preset priors in [precessing.py](https://github.com/wyhwong/archeo/blob/main/src/archeo/preset/precessing.py) and [aligned_spin.py](https://github.com/wyhwong/archeo/blob/main/src/archeo/preset/aligned_spin.py). From that, one should be able to create their own prior by following the same structure.\n\n# Credits\nThe code is maintained by [Henry Wong](https://github.com/wyhwong) under [Juan Calderon Bustillo](https://git.ligo.org/juan.calderonbustillo)'s supervision. You can find the [list of contributors](https://github.com/wyhwong/archeo/graphs/contributors) here. Please report bugs by raising an issue on our [GitHub](https://github.com/wyhwong/archeo) repository.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Bayesian framework for estimating natal kick, ancestral masses and spins of black holes.",
    "version": "1.2.1",
    "project_urls": {
        "Homepage": "https://pypi.org/project/archeo/",
        "Repository": "https://github.com/wyhwong/archeo"
    },
    "split_keywords": [
        "black-holes",
        " gravitational-waves",
        " black-hole-archeology"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e7b0900e95afacc7ae16f9412a3cf04b6e3823ba770b69cb8c10ae5e2a3b5f8c",
                "md5": "3b3804687afc5c81ab5957eedb017229",
                "sha256": "55186866a7594648e12f8cfc403aad9e53a4521d8bb97f5d0d4e963656fef7d3"
            },
            "downloads": -1,
            "filename": "archeo-1.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3b3804687afc5c81ab5957eedb017229",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 22042,
            "upload_time": "2025-01-10T16:24:54",
            "upload_time_iso_8601": "2025-01-10T16:24:54.844017Z",
            "url": "https://files.pythonhosted.org/packages/e7/b0/900e95afacc7ae16f9412a3cf04b6e3823ba770b69cb8c10ae5e2a3b5f8c/archeo-1.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "71a9fc2a5b2a490a22e10bb1714c957e07b565270f3f39880461af6ddd04f0d8",
                "md5": "9849b5c83b393e6fdc98b96fc80cf75f",
                "sha256": "cab54cfe10c30c081bc8b0702a74c315b13470babc77398046c4fbc9739347c5"
            },
            "downloads": -1,
            "filename": "archeo-1.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "9849b5c83b393e6fdc98b96fc80cf75f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 16167,
            "upload_time": "2025-01-10T16:24:55",
            "upload_time_iso_8601": "2025-01-10T16:24:55.865900Z",
            "url": "https://files.pythonhosted.org/packages/71/a9/fc2a5b2a490a22e10bb1714c957e07b565270f3f39880461af6ddd04f0d8/archeo-1.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-10 16:24:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "wyhwong",
    "github_project": "archeo",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "archeo"
}
        
Elapsed time: 0.46029s