gensbi.core.prior#
Gaussian prior factory for GenSBI pipelines.
Functions#
|
Check whether a prior is a Gaussian (Normal-based Independent). |
|
Create a Gaussian prior as a numpyro distribution. |
Module Contents#
- gensbi.core.prior.is_gaussian_prior(prior)[source]#
Check whether a prior is a Gaussian (Normal-based Independent).
- Parameters:
prior (numpyro.distributions.Distribution) – The prior to check.
- Returns:
True if the prior is
Independent(Normal(...), ...).- Return type:
bool
- gensbi.core.prior.make_gaussian_prior(dim, ch=None, *, mu=0.0, sigma=1.0)[source]#
Create a Gaussian prior as a numpyro distribution.
Two call forms:
make_gaussian_prior(dim, ch)— legacy rank-2 form,event_shape=(dim, ch).make_gaussian_prior(event_shape)— a single tuple of any rank, e.g.(H, W, C)for pixel-space fields.
muandsigmaare keyword-only:make_gaussian_prior(H, W, C)raisesTypeErrorinstead of silently readingCas the mean.- Returns:
Independent(Normal(loc, scale), len(event_shape)).- Return type:
dist.Independent