shine.prior_utils¶
Shared prior-parsing utilities for SHINE scene builders.
Converts DistributionConfig entries (or fixed numeric values) into NumPyro
sample sites. Supports catalog-centered priors via the center="catalog"
mechanism, where the distribution location parameter comes from per-source
catalog data at runtime.
prior_utils
¶
Shared prior-parsing utilities for SHINE scene builders.
Converts :class:~shine.config.DistributionConfig entries (or fixed
numeric values) into NumPyro sample sites. Supports catalog-centered
priors via the center="catalog" mechanism.
parse_prior(name, param_config, catalog_values=None)
¶
Create a NumPyro sample site from a config entry, or return a fixed value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Parameter name for the NumPyro sample site. |
required |
param_config
|
Union[float, int, DistributionConfig]
|
Either a fixed numeric value or a
:class: |
required |
catalog_values
|
Optional[ndarray]
|
Per-source catalog values used as the location
parameter when |
None
|
Returns:
| Type | Description |
|---|---|
Union[float, ndarray]
|
Sampled value(s) from the distribution, or the fixed value. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the distribution type is not recognized, or if
|