jaxqsofit.CustomComponentSpec#

class jaxqsofit.CustomComponentSpec(name: str, parameter_priors: ~typing.Mapping[str, ~typing.Mapping[str, ~typing.Any]], evaluate: ~typing.Callable[[~typing.Any, ~typing.Mapping[str, ~typing.Any], ~typing.Mapping[str, ~typing.Any]], ~typing.Any], metadata: ~typing.Mapping[str, ~typing.Any] = <factory>)[source]#

Bases: object

Generic additive continuum component.

The component is fully defined by: - parameter_priors: local parameter names -> prior config dictionaries - evaluate: callable evaluate(wave, params, metadata)

The evaluator is responsible for any shifts, broadenings, template interpolation, or other transformations.

name: str#
parameter_priors: Mapping[str, Mapping[str, Any]]#
evaluate: Callable[[Any, Mapping[str, Any], Mapping[str, Any]], Any]#
metadata: Mapping[str, Any]#
property prefix: str#

Return the parameter-site prefix used in samples/priors.

property output_name: str#

Return the public output component key.

property deterministic_site_name: str#

Return the Predictive deterministic site name.

site_name(param_name: str) str[source]#

Return the full NumPyro sample-site name for one local parameter.

to_state() dict[str, Any][source]#

Return a pickle-friendly representation.

classmethod from_state(state: Mapping[str, Any]) CustomComponentSpec[source]#

Rebuild a spec from to_state().