bubblebarrier


Namebubblebarrier JSON
Version 1.1.7 PyPI version JSON
download
home_pageNone
SummaryBarrier calculations for cosmic reionization models
upload_time2025-08-21 09:40:43
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT
keywords astrophysics cosmology reionization barrier halo ionization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # BubbleBarrier

[![PyPI version](https://badge.fury.io/py/bubblebarrier.svg)](https://badge.fury.io/py/bubblebarrier)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/SOYONAOC/BubbleBarrier/main.yml?branch=main)](https://github.com/SOYONAOC/BubbleBarrier/actions)

A Python package for barrier calculations in cosmic reionization models, providing essential tools for modeling the physics of ionized bubbles in the early universe.

## Overview

The `BubbleBarrier` package provides a framework for calculating the density barrier (δ_v) required for cosmic structure formation within ionized regions during the Epoch of Reionization. It implements self-consistent models for ionization balance, halo mass functions, and feedback mechanisms.

This tool is designed for researchers and students in cosmology and astrophysics studying the 21cm signal, reionization simulations, and the interplay between galaxies and the intergalactic medium.

## Core Features

- **Barrier Function Calculation**: Computes the critical density barrier `δ_v` for different halo masses.
- **Ionization Modeling**: Self-consistent calculation of ionizing photon production (`N_ion`).
- **Minihalo Effects**: Includes options to model the impact of X-ray heating from minihalos.
- **Custom Power Spectrum**: Utilizes `camb` for cosmological calculations and allows for custom power spectrum models.
- **Efficient & Cached**: Caches intermediate results to disk (`.npy` files) for significantly faster subsequent calculations.

## Installation

Install the package directly from PyPI:

```bash
pip install bubblebarrier
```

## Quick Start

Here is a simple example of how to calculate the barrier height for a given halo mass.

```python
import numpy as np
from bubblebarrier import Barrier

# 1. Initialize the barrier model for a specific redshift
#    (fesc, qion, etc., have default values but can be specified)
barrier_model = Barrier(z_v=10.0)

# 2. Define a halo mass in solar masses
halo_mass = 1e15  # M_sun

# 3. Calculate the barrier height
delta_v = barrier_model.Calcul_deltaVM(halo_mass)
print(f"For a halo of {halo_mass:.1e} M_sun at z={barrier_model.z:.1f}, the barrier height is δ_v = {delta_v:.3f}")

# 4. Calculate the barrier including effects from minihalo X-ray heating
delta_v_minihalo = barrier_model.Calcul_deltaVM_Minihalo(halo_mass)
print(f"Including minihalo effects, the barrier is δ_v = {delta_v_minihalo:.3f}")
```

## Dependencies

This package relies on a standard scientific Python stack:

- `numpy`
- `scipy`
- `astropy`
- `matplotlib`
- `pandas`
- `filelock`
- `camb`: For cosmological power spectra.
- `massfunc`: For halo mass function calculations.

## Citation

If you use `BubbleBarrier` in your research, please cite the repository.

```bibtex
@misc{bubblebarrier2025,
  author = {Hajime Hinata},
  title = {BubbleBarrier: A Python package for reionization bubble modeling},
  year = {2025},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/SOYONAOC/BubbleBarrier}}
}
```

## Contributing

Contributions are welcome! Please feel free to fork the repository, create a feature branch, and open a Pull Request.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "bubblebarrier",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "astrophysics, cosmology, reionization, barrier, halo, ionization",
    "author": null,
    "author_email": "Hajime Hinata <onmyojiflow@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e8/1e/6039098b6c7fffdc916f3780e5c99be4be20558b63a75ddb84ff68e97a40/bubblebarrier-1.1.7.tar.gz",
    "platform": null,
    "description": "# BubbleBarrier\n\n[![PyPI version](https://badge.fury.io/py/bubblebarrier.svg)](https://badge.fury.io/py/bubblebarrier)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)\n[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/SOYONAOC/BubbleBarrier/main.yml?branch=main)](https://github.com/SOYONAOC/BubbleBarrier/actions)\n\nA Python package for barrier calculations in cosmic reionization models, providing essential tools for modeling the physics of ionized bubbles in the early universe.\n\n## Overview\n\nThe `BubbleBarrier` package provides a framework for calculating the density barrier (\u03b4_v) required for cosmic structure formation within ionized regions during the Epoch of Reionization. It implements self-consistent models for ionization balance, halo mass functions, and feedback mechanisms.\n\nThis tool is designed for researchers and students in cosmology and astrophysics studying the 21cm signal, reionization simulations, and the interplay between galaxies and the intergalactic medium.\n\n## Core Features\n\n- **Barrier Function Calculation**: Computes the critical density barrier `\u03b4_v` for different halo masses.\n- **Ionization Modeling**: Self-consistent calculation of ionizing photon production (`N_ion`).\n- **Minihalo Effects**: Includes options to model the impact of X-ray heating from minihalos.\n- **Custom Power Spectrum**: Utilizes `camb` for cosmological calculations and allows for custom power spectrum models.\n- **Efficient & Cached**: Caches intermediate results to disk (`.npy` files) for significantly faster subsequent calculations.\n\n## Installation\n\nInstall the package directly from PyPI:\n\n```bash\npip install bubblebarrier\n```\n\n## Quick Start\n\nHere is a simple example of how to calculate the barrier height for a given halo mass.\n\n```python\nimport numpy as np\nfrom bubblebarrier import Barrier\n\n# 1. Initialize the barrier model for a specific redshift\n#    (fesc, qion, etc., have default values but can be specified)\nbarrier_model = Barrier(z_v=10.0)\n\n# 2. Define a halo mass in solar masses\nhalo_mass = 1e15  # M_sun\n\n# 3. Calculate the barrier height\ndelta_v = barrier_model.Calcul_deltaVM(halo_mass)\nprint(f\"For a halo of {halo_mass:.1e} M_sun at z={barrier_model.z:.1f}, the barrier height is \u03b4_v = {delta_v:.3f}\")\n\n# 4. Calculate the barrier including effects from minihalo X-ray heating\ndelta_v_minihalo = barrier_model.Calcul_deltaVM_Minihalo(halo_mass)\nprint(f\"Including minihalo effects, the barrier is \u03b4_v = {delta_v_minihalo:.3f}\")\n```\n\n## Dependencies\n\nThis package relies on a standard scientific Python stack:\n\n- `numpy`\n- `scipy`\n- `astropy`\n- `matplotlib`\n- `pandas`\n- `filelock`\n- `camb`: For cosmological power spectra.\n- `massfunc`: For halo mass function calculations.\n\n## Citation\n\nIf you use `BubbleBarrier` in your research, please cite the repository.\n\n```bibtex\n@misc{bubblebarrier2025,\n  author = {Hajime Hinata},\n  title = {BubbleBarrier: A Python package for reionization bubble modeling},\n  year = {2025},\n  publisher = {GitHub},\n  journal = {GitHub repository},\n  howpublished = {\\url{https://github.com/SOYONAOC/BubbleBarrier}}\n}\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to fork the repository, create a feature branch, and open a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Barrier calculations for cosmic reionization models",
    "version": "1.1.7",
    "project_urls": {
        "Bug Reports": "https://github.com/SOYONAOC/BubbleBarrier/issues",
        "Documentation": "https://github.com/SOYONAOC/BubbleBarrier#readme",
        "Homepage": "https://github.com/SOYONAOC/BubbleBarrier",
        "Repository": "https://github.com/SOYONAOC/BubbleBarrier"
    },
    "split_keywords": [
        "astrophysics",
        " cosmology",
        " reionization",
        " barrier",
        " halo",
        " ionization"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "25cbe45215aad83f1f0f77debcb6ce2ebdcdaac2e62de4086b4ee34d9c2629e4",
                "md5": "19a4c39fa7c7e1888cda13111f81831f",
                "sha256": "9fabb2c7ee699b8f10f5edf8a56029526c32db3175ceee374d1304b5878d1286"
            },
            "downloads": -1,
            "filename": "bubblebarrier-1.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "19a4c39fa7c7e1888cda13111f81831f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 12257,
            "upload_time": "2025-08-21T09:40:42",
            "upload_time_iso_8601": "2025-08-21T09:40:42.216932Z",
            "url": "https://files.pythonhosted.org/packages/25/cb/e45215aad83f1f0f77debcb6ce2ebdcdaac2e62de4086b4ee34d9c2629e4/bubblebarrier-1.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e81e6039098b6c7fffdc916f3780e5c99be4be20558b63a75ddb84ff68e97a40",
                "md5": "8eb19718362e5f3f2f432bf1387b1095",
                "sha256": "c9227f4a3f77c28c2397b17a3fd9f0a86e1a50450e91a47c71e7e406c7694bc2"
            },
            "downloads": -1,
            "filename": "bubblebarrier-1.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "8eb19718362e5f3f2f432bf1387b1095",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 14306,
            "upload_time": "2025-08-21T09:40:43",
            "upload_time_iso_8601": "2025-08-21T09:40:43.625628Z",
            "url": "https://files.pythonhosted.org/packages/e8/1e/6039098b6c7fffdc916f3780e5c99be4be20558b63a75ddb84ff68e97a40/bubblebarrier-1.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-21 09:40:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "SOYONAOC",
    "github_project": "BubbleBarrier",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "bubblebarrier"
}
        
Elapsed time: 0.68726s