archeo


Namearcheo JSON
Version 1.1.0 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_time2024-12-18 12:45:39
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/29/86/b39c7d50e2d4996457ef3e3f934caf8833320b9f70e5b7926b7d4f521327/archeo-1.1.0.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.1.0",
    "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": "de769eac5eba733fde4a3078208706efe8e8293903b0d12cd0fc0851c0280d25",
                "md5": "f0c493fb8dcd01fb0ba5d1cb35620c5b",
                "sha256": "3a72abbb9aba98e2c05b30be815be720d7e074f6c5ff11c0997ca5c17e4b306e"
            },
            "downloads": -1,
            "filename": "archeo-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f0c493fb8dcd01fb0ba5d1cb35620c5b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 21867,
            "upload_time": "2024-12-18T12:45:38",
            "upload_time_iso_8601": "2024-12-18T12:45:38.631399Z",
            "url": "https://files.pythonhosted.org/packages/de/76/9eac5eba733fde4a3078208706efe8e8293903b0d12cd0fc0851c0280d25/archeo-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2986b39c7d50e2d4996457ef3e3f934caf8833320b9f70e5b7926b7d4f521327",
                "md5": "1a172dcb48ebb8c58616d91bc3c32060",
                "sha256": "a7d04f83dd13e89383b6ccfe4ff0c2fc89943fa6edf744d3d94a506a6f80060d"
            },
            "downloads": -1,
            "filename": "archeo-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1a172dcb48ebb8c58616d91bc3c32060",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 16023,
            "upload_time": "2024-12-18T12:45:39",
            "upload_time_iso_8601": "2024-12-18T12:45:39.689838Z",
            "url": "https://files.pythonhosted.org/packages/29/86/b39c7d50e2d4996457ef3e3f934caf8833320b9f70e5b7926b7d4f521327/archeo-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-18 12:45:39",
    "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: 2.32057s