Building the covariance model#
ML-GPR represents the covariance of the data as a sum of named components. A model can contain smooth intrinsic foreground emission, chromatic mode mixing, a 21-cm signal, and heteroscedastic thermal noise.
Configuration example#
This extract defines two foreground components, one 21-cm component, and the
noise-amplitude parameter. Settings not shown here are inherited from the
packaged defaults by
load_with_defaults().
kern.uv_bins_du = 20
kern.uv_bins_n_uni = 0
kern.fg = ["intrinsic", "mixing"]
kern.eor = ["signal"]
[intrinsic]
type = "MRBF"
variance.prior = "Uniform(0.8, 1.2)"
lengthscale.prior = "Uniform(10, 100)"
var_alpha.prior = "Fixed(0)"
ls_alpha.prior = "Fixed(0)"
[mixing]
type = "MMat32"
variance.prior = "Log10Uniform(-3, -0.5)"
variance.log_scale = true
lengthscale.prior = "Uniform(2, 60)"
var_alpha.prior = "Fixed(0)"
ls_alpha.prior = "Uniform(0, 1.5)"
[signal]
type = "MExponential"
variance.prior = "Log10Uniform(-5, -1)"
variance.log_scale = true
lengthscale.prior = "Uniform(0.2, 2)"
var_alpha.prior = "Fixed(0)"
ls_alpha.prior = "Fixed(0)"
[kern.noise]
alpha.prior = "Uniform(0.9, 1.6)"
Component names and composition#
Sections listed under kern.fg and kern.eor become components prefixed
with fg_ and eor_. The example therefore produces fg_intrinsic,
fg_mixing, eor_signal, and noise. These prefixes let posterior
methods select groups with patterns such as "fg*" and "eor*".
Listed sections are additive by default. Place "x" or "*" between two
section names to multiply their kernels into one component:
kern.fg = ["frequency_structure", "x", "second_structure", "foreground_2"]
This creates the components fg_frequency_structure (the product of the
first two kernels) and fg_foreground_2.
Available frequency kernels#
Stationary configuration types construct a
UVScaledKernel with the corresponding family:
TOML |
Kernel family |
Frequency covariance |
Additional parameter |
|---|---|---|---|
|
RBF |
Infinitely differentiable, very smooth covariance. |
— |
|
Matérn \(\nu=3/2\) |
Once-differentiable covariance. |
— |
|
Matérn \(\nu=5/2\) |
Twice-differentiable covariance. |
— |
|
Matérn \(\nu=1/2\) |
Exponential covariance with a sharp loss of correlation. |
— |
|
Cosine |
Periodic covariance; |
— |
|
Rational quadratic |
A scale mixture of RBF covariances. Both names map to the same current implementation. |
|
|
VAE 21-cm covariance |
Covariance derived from the power spectrum decoded at latent
coordinates |
|
Every stationary family has variance and either lengthscale /
ls_alpha or the wedge parameters described below. The VAE kernel has a
variance parameter in addition to its latent coordinates.
The noise component is constructed automatically as
WhiteHeteroscedasticKernel; its alpha
parameter scales the measured per-frequency, per-UV-bin noise variance.
Multi-epoch frequency kernels are wrapped by
TimeKron; the available time covariance models
are listed in Multi-epoch and Cross-GPR models.
Available priors#
Each candidate hyperparameter has a prior entry. The accepted
configuration expressions are:
Expression |
Arguments |
Meaning |
|---|---|---|
|
Natural-value lower and upper bounds. |
Constant density over the closed interval. Implemented by
|
|
Lower and upper \(\log_{10}\) bounds. |
Log-uniform density over positive natural values. For example,
|
|
Natural-value mean and standard deviation. |
Unbounded normal density. Implemented by
|
|
One natural value. |
Removes the parameter from the sampled vector and keeps it at the given value. |
Priors are defined on natural kernel values. The optional
parameter.log_scale = true setting is separate from the prior: it makes
the inference methods store and explore log10(parameter) while retaining
the stated natural-value prior and the corresponding transformation
Jacobian.
UV-dependent parameterizations#
UVScaledKernel evaluates one covariance per UV
bin. Its amplitude and frequency coherence can vary with the mean baseline
length \(u\):
Parameterization |
UV dependence |
Configuration |
|---|---|---|
Constant |
The same variance or lengthscale is used in every UV bin. |
|
Variance power law |
\(\mathrm{variance}(u) \propto (u/u_\mathrm{min})^{\mathrm{var\_alpha}}\), normalized across the fitted UV bins. |
Set a free or fixed |
Measured angular-power scaling |
The variance shape follows the angular power measured from the input data and is normalized across UV bins. |
|
Lengthscale evolution |
\(\ell(u) = \ell_0 / [1 + 10^{-3}\,\mathrm{ls\_alpha}\,\ell_0 (u-u_\mathrm{min})]\). |
Set a free or fixed |
Wedge/delay evolution |
The frequency scale is the inverse of a baseline-dependent delay built from a wedge angle and an additive delay buffer. |
|
use_uv_ps controls only the variance law and can be combined with either
lengthscale parameterization. uv_min and uv_max restrict a component
to a baseline interval; l_max and uv_break control the cap applied to
derived lengthscales.
Units and normalization#
The input is divided into UV bins and normalized before fitting. Model parameters use the following conventions:
stationary frequency lengthscales are in MHz;
UV coordinates and UV limits are in wavelengths;
theta_radis in radians;delay_buffer_usis in microseconds;kernel variances refer to the internally normalized data.
Noise model#
The noise input can be a measured noise realization, a
NoiseStdCube, or a scalar variance when constructing
MultiData directly. In the high-level
interface,
process_noise_cube() applies
the differencing, SEFD estimation, baseline scaling, and noise simulation
selected in the configuration.
Thermal noise is independent between frequencies in the likelihood. Its
measured variance sets the diagonal covariance, and kern.noise.alpha
optionally rescales that level during inference.