Combining the Halo Model and Perturbation Theory: A 1% Accurate Model to k = 1 h/Mpc
Project description
EffectiveHalos
EffectiveHalos is a fast Python code providing models of the real-space matter power spectrum, based a combination of the Halo Model and Effective Field Theory, which are 1% accurate up to k = 1 h/Mpc, across a range of cosmologies, including those with massive neutrinos. It can additionally compute accurate halo count covariances (including a model of halo exclusion), both alone and in combination with the matter power spectrum.
This is based on the work of Philcox, Spergel & Villaescusa-Navarro (2020), and full documentation is availble on ReadTheDocs.
Authors
Main Authors
- Oliver Philcox (Princeton)
Collaborators
- David Spergel (Princeton / CCA)
- Francisco Villaescusa-Navarro (Princeton / CCA)
Installation
EffectiveHalos can be simply installed using pip:
pip install EffectiveHalos (--user)
Note that you will need a CLASS installation, including the 'classy' Python wrapper, to run EffectiveHalos.
Basic Usage
To compute a matter power spectrum in EffectiveHalos, simply run the following:
from EffectiveHalos import *
import numpy as np
## Parameters
z = 0. # redshift
cs2 = 8. # effective speed of sound (should be calibrated from simulations)
R = 1. # smoothing scale (should be calibrated from simulations)
k = np.arange(0.01, 1., 0.005) # wavenumbers in h/Mpc
## Load general classes
cosmology = Cosmology(z, 'Planck18') # use Planck 2018 cosmology
mass_function = MassFunction(cosmology, 'Bhattacharya') # Bhattacharya 2010 mass function
halo_physics = HaloPhysics(cosmology, mass_function, 'Duffy', 'NFW') # Duffy 08 concentration relation, NFW halo profiles
## Load HaloModel class
halo_model = HaloModel(cosmology, mass_function, halo_physics, k)
## Compute the power spectrum in both Effective and Standard Halo Models
power_spectrum_EHM = halo_model.halo_model(cs2, R)
power_spectrum_SHM = halo_model.halo_model(cs2, R, 'Linear', 0, 0, 0)
This generates an estimate for the matter power spectrum in a few seconds. Let's plot this:
A full tutorial can be found here.
New for version 1.1: Accurate models for the power spectrum in massive neutrino cosmologies.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file EffectiveHalos-1.1.0.tar.gz
.
File metadata
- Download URL: EffectiveHalos-1.1.0.tar.gz
- Upload date:
- Size: 25.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e38921809c3183f08bc911ab1ce4c916d0543880e84f4367d4e6582e3673b85b |
|
MD5 | 76e0261978f6040329158327f6885e7a |
|
BLAKE2b-256 | 849e5fec889d98ca747996397047348d10cfed4a7271c75ace70a20d533d1cf1 |
File details
Details for the file EffectiveHalos-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: EffectiveHalos-1.1.0-py3-none-any.whl
- Upload date:
- Size: 30.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 750835745c6ba48425d3b6afd74dfb7b13aa2f5c1eb8ca8be3653c9a440a962d |
|
MD5 | 6c79228ca783e5ca5d0d0bb43e414eb7 |
|
BLAKE2b-256 | 5c7f7c45c3830c9388131b5cb6368f04f2cccc3a92dd21c1309a5486a0b4395a |