Skip to main content

apply_observation

observations.apply_observation(monitor, solution, *, t_offset=0.0)

Apply a streaming monitor’s recipe to a stored trajectory.

This is the shared post-hoc executor for custom monitors. A monitor normally delegates its __call__ method here so post-hoc and native observe= execution use the same prepared callbacks.

Parameters

Name Type Description Default
monitor A streaming monitor: any object with a callable prepare method returning a PreparedObservation. required
solution An object exposing ys, ts, and a concrete dt. Values must be shaped [samples, channels, nodes] with one timestamp per sample. required
t_offset Scalar added to output timestamps. It may be a scalar JAX value under jax.jit and does not change the observed values. 0.0

Returns

Name Type Description
NativeSolution or dict[str, NativeSolution] One regular observed series, or the flat named result mapping produced by JointObservation.