scene_model

nyx.infer.numpyro_bridge.scene_model(model, data, priors, likelihood)[source]

A NumPyro model sampling model’s unfrozen parameters.

One site per free parameter, named and shaped as the parameter already is, and carrying physical values, so priors are in physical units.

Parameters:
  • model (Scene or MultiTargetFit) – Free parameters unfrozen, as Optimizer reads it.

  • data (mapping of str to array-like) – Observed pixel rates per instrument, (nobs, n_pixels).

  • priors (mapping of str to numpyro.distributions.Distribution) – One per free parameter; keys may glob, and a scalar distribution is broadcast to the parameter’s shape.

  • likelihood (callable) – (predicted) -> distribution for one instrument’s rates.

Returns:

The NumPyro model.

Return type:

callable