Configuration#

The configuration loader merges a user TOML file over the packaged defaults. Kernel sections become named model components; priors decide which hyperparameters are sampled and Fixed(value) pins the others.

Load an ML-GPR TOML configuration and build its covariance model.

Kernel sections listed under kern.fg and kern.eor become components named fg_* and eor_*. Lists are additive by default; place x or * between two section names to multiply their kernels. Each parameter must define a prior or use Fixed(value).

ps_eor.ml_gpr.config.build_kern_from_dict(kern_type, name, d)[source]#

Build a kernel from one parsed TOML section.

ps_eor.ml_gpr.config.build_noise_kern(d)[source]#

Build the heteroscedastic noise kernel from kern.noise.

ps_eor.ml_gpr.config.build_kern(config)[source]#

Build the complete covariance model described by config.

Returns:

A Components mapping containing foreground, EoR, and noise kernels.

class ps_eor.ml_gpr.config.MLGPRConfigFile(file, d)[source]#

Bases: BaseSettings

ML-GPR settings layered over the packaged defaults.

Use load_with_defaults() to read a TOML file and get_kern() to build the configured covariance model.

get_kern()[source]#

Build and return the configured covariance components.

static load_from_string_with_defaults(string)[source]#

Parse TOML text and merge it over the packaged defaults.