noise

classes.noise

Runtime Noise wrapper, and the public import location for Integrator.

Noise is still a subclass: it registers itself as a JAX pytree, which is a decorator on the class being defined and so cannot come from a mixin. Integrator has no wrapper — its behaviour lives in :mod:tvbo.behaviour.integrator, attached to the generated class, and is re-exported here so the import path is unchanged.

Attributes

Name Description
Integrator The generated class itself. Its behaviour lives in :mod:tvbo.behaviour.integrator and

Classes

Name Description
Noise Datamodel Noise with property-based conveniences and no runtime caches.

Noise

classes.noise.Noise(**kwargs)

Datamodel Noise with property-based conveniences and no runtime caches.

  • Inherits all serializable fields from tvbo_datamodel.Noise directly.
  • Provides computed properties for sigma and nsig based on parameters.
  • No mutation of parameters and no cached fields; safe for serialization.

Attributes

Name Description
nsig The noise dispersion nsig, derived from sigma as \(0.5\\,\\sigma^2\) if needed.
parameters_dict The noise parameters normalized to a dict-like view (empty dict if unset).
sigma The noise standard deviation sigma, derived from nsig as \(\\sqrt{2\\,nsig}\) if needed.
symbolic The symbolic noise term \(\\sqrt{dt}\\,\\sigma\\,\\xi\) for gaussian/white noise.

Methods

Name Description
execute Render, execute, and instantiate the noise backend object.
render_code Render the noise as source code for the requested backend.
tree_flatten Flatten into JAX pytree (children, aux).
tree_unflatten Reconstruct a Noise instance from JAX pytree aux_data and children.
execute
classes.noise.Noise.execute(format='tvb')

Render, execute, and instantiate the noise backend object.

The rendered code is executed to obtain the Noise class, which is stored on self.tvb and returned.

Parameters
Name Type Description Default
format Target backend passed through to code generation. 'tvb'
Returns
Name Type Description
The executed backend noise object.
render_code
classes.noise.Noise.render_code(format='tvb')

Render the noise as source code for the requested backend.

Parameters
Name Type Description Default
format Target backend; "tvb" selects the TVB template, while "autodiff" or "jax" selects the JAX template. 'tvb'
Returns
Name Type Description
The rendered source code as a string.
tree_flatten
classes.noise.Noise.tree_flatten()

Flatten into JAX pytree (children, aux).

A present sigma_vec is exposed as the single array child so it can participate in vmap batching; the reconstruction kwargs go in aux.

tree_unflatten
classes.noise.Noise.tree_unflatten(aux_data, children)

Reconstruct a Noise instance from JAX pytree aux_data and children.