Skip to content

torchsky.map.field.gaussian

Experimental surface

These APIs are under active development. Names, defaults, and result objects may change between minor releases; pin a version if you depend on them in production.

Fixed-band field operators with explicit joint Gaussian nuisance evidence.

Guides: likelihoods


This reference is generated from the package source. Names are grouped by the module that defines them; import every name from the public namespace torchsky.map.field.gaussian unless the group text says otherwise.

Top-level namespace

Fixed-band field operators with explicit joint Gaussian nuisance evidence.

This bridge binds a bounded exposure/tile group. It does not fit a global field, change its response convention, or make different bandpasses interchangeable. Shared coefficients are eliminated once across the complete declared group.

bind_linear_band_grid_likelihood

bind_linear_band_grid_likelihood(
    observations: tuple[FieldObservation, ...],
    domain: FieldDomain,
    *,
    spatial_resolution: int,
    spatial_bounds_local_deg: Sequence[float],
    measurement_ids: tuple[tuple[str, ...], ...],
    calibration_id: str,
    provenance_id: str,
    nuisance_bases: tuple[Tensor, ...] | None = None,
    nuisance_ids: tuple[str, ...] = (),
    nuisance_covariance_factor: Tensor | None = None,
    nuisance_mean: Tensor | None = None,
    rank_rtol: float | None = None,
    rank_atol: float = 0.0,
    spatial_tile_hw: tuple[int, int] | None = None,
    revision: Callable[[], object] | None = None,
) -> GaussianLikelihoodFactor

Bind native images to one fixed band-grid Gaussian likelihood factor.

Observations use the existing frozen discrete image-grid response and must share band metadata, product units and real float32/float64 dtype/device. This is not continuous/chromatic pre-pixel rendering. Fixed legacy output backgrounds and supported typed input/output means are subtracted in their declared detector stages. Physical raw additive/noise stages still reject.

Each optional nuisance_bases[e] has shape (*image.shape, k) in that detector product's units, with the same ordered coefficients/identifiers. No covariance factor means fixed unknown coefficients profiled jointly. With an independently calibrated L, covariance is L L.T and mean centering/determinant correction are applied jointly. All shared exposures must be in this factor; splitting shared coefficients across independent factors is invalid and their repeated IDs are rejected by the system.

Noise is fixed independent Gaussian with the existing support/weight convention. Conditional/calibrated densities include the observed-support normalization. No normalized predictive density is claimed for profiling. Explicit non-Gaussian detector laws reject rather than being approximated.

Original data, weights, masks, background/calibration tensors and response metadata are tracked by EvidenceSnapshot. A custom detector-to-sky or passband object requires revision for its otherwise hidden state. Rebuild the complete binding after changing dependencies or autograd graphs. Ordinary Torch writes and object replacements are checked; NumPy/.data alias writes still require a truthful caller revision.

Packing uses O(N) measurement storage and O(N k) nuisance storage for this bounded group, with no dense pixel covariance. This is not a streaming whole-survey shared-calibration solver. Use suitable exposure/tile groups and do not treat cropped pieces with shared errors as independent factors.