py21cmemu.inputs

Module containing functionality for handling emulator inputs.

Input Parameters by Emulator

All parameters can be supplied as dicts (recommended) or as numpy arrays/lists in the order specified below. The emulator accepts values in 21cmFAST units (no astropy.units needed).

MCG Emulator (mcg/v3)

11 parameters (6 must be provided in log10 space — see MHEmulatorInput.LOG_PARAMETERS):

Key

Description

Unit

Valid Range

F_STAR10

Star formation efficiency at 10^10 M_sun

log10

[-2.0, 1.0]

ALPHA_STAR

Power-law index of star formation efficiency

linear

[0.0, 1.17]

t_STAR

Star formation timescale in units of Hubble time

linear

[0.01, 1.0]

F_ESC10

Escape fraction at 10^10 M_sun

log10

[-3.0, 0.0]

ALPHA_ESC

Power-law index of escape fraction

linear

[-1.0, 1.0]

F_STAR7_MINI

Star formation efficiency for mini-halos at 10^7 M

log10

[-4.0, -1.0]

F_ESC7_MINI

Escape fraction for mini-halos at 10^7 M_sun

log10

[-3.0, -1.0]

L_X

X-ray luminosity per SFR for ACG

log10 (erg/s /M_sun /yr)

[38, 43] log10(erg s^-1 M_sun^-1 yr)

L_X_MINI

X-ray luminosity per SFR for MCG

log10

[39, 44] log10(erg s^-1 M_sun^-1 yr)

NU_X_THRESH

X-ray energy threshold

eV

[100, 1500]

SIGMA_8

Amplitude of matter fluctuations

linear

[0.76, 0.85]

ACG Emulator (acg/v1)

9 parameters for atomic cooling galaxies:

Key

Description

Unit

Valid Range

F_STAR10

log10 star formation eff.

log10

[-3.0, 0.0]

ALPHA_STAR

Power-law index

linear

[-0.5, 1.0]

F_ESC10

log10 escape fraction

log10

[-3.0, 0.0]

ALPHA_ESC

Escape fraction index

linear

[-1.0, 0.5]

M_TURN

log10 turnover halo mass

log10 M_sun

[8.0, 10.0]

t_STAR

Star formation timescale

linear

[0.01, 1.0]

L_X

log10 X-ray luminosity

log10

[38, 42]

NU_X_THRESH

X-ray energy threshold

eV

[100, 1500]

X_RAY_SPEC _INDEX

X-ray spectral index

linear

[-1.0, 3.0]

Radio Emulator (radio/v2)

5 parameters for radio background:

Key

Description

Unit

Valid Range

fR_mini

log10 radio efficiency

log10

[-2, 6]

L_X_MINI

log10 X-ray luminosity

log10

[33, 45]

F_STAR7_MINI

log10 star formation eff.

log10

[-5, 0]

F_ESC7_MINI

log10 escape fraction

log10

[-6, -1]

A_LW

Lyman-Werner feedback

linear

[0, 10]

Example

>>> from py21cmemu import Emulator
>>> emu = Emulator(emulator="mcg")
>>> params = {
...     'F_STAR10': -1.3,       # log10(f_*,10) — valid range [-2.0, 1.0]
...     'ALPHA_STAR': 0.5,
...     't_STAR': 0.5,
...     'F_ESC10': -1.0,        # log10(f_esc,10) — valid range [-3.0, 0.0]
...     'ALPHA_ESC': 0.0,
...     'F_STAR7_MINI': -3.0,   # log10(f_*,7) — valid range [-4.0, -1.0]
...     'F_ESC7_MINI': -2.0,    # log10(f_esc,7) — valid range [-3.0, -1.0]
...     'L_X': 40.0,            # log10(erg/s/(Msun/yr))
...     'L_X_MINI': 40.0,       # log10(erg/s/(Msun/yr))
...     'NU_X_THRESH': 500,     # eV
...     'SIGMA_8': 0.82,
... }
>>> thetas, output, errors = emu.predict(params)

Classes

ACGEmulatorInput()

Class for handling ACG (v1) emulator inputs.

EmulatorInput([emulator])

Class for handling emulator inputs.

MCGEmulatorInput()

Class for handling MCG/minihalo (v3) emulator inputs.

RadioEmulatorInput()

Class for handling radio background (v2) emulator inputs.