Skip to main content

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.

Metadata

Release files for EffectiveHalos 1.1.0

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

Source distribution (sdist)

Source distribution for EffectiveHalos 1.1.0
File Size Uploaded
EffectiveHalos-1.1.0.tar.gz 25.1 kB Details

Built distribution (wheel)

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

Total release size: 55.8 kB

Release files / EffectiveHalos-1.1.0.tar.gz

Download URL EffectiveHalos-1.1.0.tar.gz
Size 25.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e38921809c3183f08bc911ab1ce4c916d0543880e84f4367d4e6582e3673b85b
BLAKE2b-256 checksum
How to use checksums
849e5fec889d98ca747996397047348d10cfed4a7271c75ace70a20d533d1cf1
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / EffectiveHalos-1.1.0-py3-none-any.whl

Download URL EffectiveHalos-1.1.0-py3-none-any.whl
Size 30.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
750835745c6ba48425d3b6afd74dfb7b13aa2f5c1eb8ca8be3653c9a440a962d
BLAKE2b-256 checksum
How to use checksums
5c7f7c45c3830c9388131b5cb6368f04f2cccc3a92dd21c1309a5486a0b4395a
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

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