Skip to main content

HAYASHI

(Halo-level AnalYsis of the Absorption Signal in HI)

arXiv DOI Python License: MIT

(hayashi means forest in japanese)

Python library for computing the number of absorption features of the 21 cm forest in a semianalytic formalism. Includes the enhancement of the signal due to the presence of substructures within minihalos, as studied in arXiv:2209.01305. It supports non-standard cosmologies with impact in the large scale structure, such as warm dark matter and primordial black holes. See the papers arXiv:2209.01305, arXiv:2104.10695 for more details.

Read the documentation here.

Installation

The code is written in Python3, and makes use of the package for cosmological computations Colossus, as well as several standard Python libraries(numpy,scipy,tqdm), which are automatically installed when hayashi is installed.

For installing the Python package from PyPI:

pip install hayashi

Usage

The basis of the code is the 21 cm Forest class. Given a redshift and the temperature of the intergalactic medium at that epoch, we can define an instance of the state of the 21 cm forest.

from hayashi.forest import Forest
from hayashi.cosmo import Tk_ad

# Define the redshift of interest
z = 10
# Get the adiabatic temperature of the intergalactic medium at z
Tk = Tk_ad(z)

21cmforest = Forest(z, Tk)

This allows to call different observables such as the optical depth or the number of absorbers.

# Get a the optical depth, as a matrix in mass and impact parameter
tau = 21cmforest.tau_tot

# Get the number of absorption features and its (logarithmic) derivative with respect to tau
Nabs, dNabsdtau = 21cmforest.num_absorbers()

It is straightforward to include non-standard cosmologies by replacing the halo mass function, either using those included in the code or defined by the user. This is an example with primordial black holes, which modify the halo mass function due to a shot noise isocurvature mode (see arXiv:2104.10695):

from hayashi.nlcdm import dndlnM_PBH

# Define a cosmology where 10 % of dark matter is composed by primordial black holes of 1 solar mass
21cmforest_PBH = Forest(z, Tk, dndlnM = lambda M, z: dndlnM_PBH(M, z, fpbh = 0.1, Mpbh = 1.))

See the source code at hayashi for more details, and the sample notebooks for examples of usage.

Notebook examples

In order to illustrate the usage of the library, we include several example notebooks:

  • absorbers_example.ipynb: computes all the relevant outputs for the 21 cm forest, such as the optical depth, the maximum impact parameter and the number of absorbers, comparing the cases with and without the subhalo contribution.

  • nlcdm_example.ipynb: compares the standard CDM 21 cm forest with different non-standard cosmologies: warm dark matter and primordial black holes.

  • density_profiles.ipynb: compares the 21 cm forest outputs for different density profiles: NFW and uniform.

  • tidal_disruption.ipynb: compares the 21 cm forest observables when tidal disruption is considered in subhalos.

Citation

If you use the code, please link this repository, and cite arXiv:2209.01305 and the DOI 10.5281/zenodo.7044255.

Contact

For comments, questions etc. you can contact me at pablo.villanueva.domingo@gmail.com

Metadata

Release files for hayashi 1.1.6

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

Source distribution (sdist)

Source distribution for hayashi 1.1.6
File Size Uploaded
hayashi-1.1.6.tar.gz 13.6 kB Details

Built distribution (wheel)

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

Total release size: 28.5 kB

Release files / hayashi-1.1.6.tar.gz

Download URL hayashi-1.1.6.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
53964d1e02564b3605a9baec9fbfc49d11a8cb468ea4f1fd7214096ba3d83a42
BLAKE2b-256 checksum
How to use checksums
9efcaf017fb6bd59e81cf57b6863f88620542d06177d404ddd5ef89f35a67fd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.0

Release files / hayashi-1.1.6-py3-none-any.whl

Download URL hayashi-1.1.6-py3-none-any.whl
Size 15.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9bf397798e83411f5da10c05c68771f8f05c44fcfb116ab234b17ba4e73b076
BLAKE2b-256 checksum
How to use checksums
89fa4baffdb4106808ac31eef0e3fc7716f5ef37ce981801a5a044c5970b3708
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.0

Release history Release notifications | RSS feed

This release

1.1.6 This release

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

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