Skip to main content

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:

alt text

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

EffectiveHalos-1.1.0.tar.gz (25.1 kB view hashes)

Uploaded Source

Built Distribution

EffectiveHalos-1.1.0-py3-none-any.whl (30.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page