tvboptim
adapters.tvboptim
tvboptim adapter for tvbo.
Export (tvbo → tvboptim)
- :func:
to_tvboptim— Network → tvboptim Network or DenseGraph / DenseDelayGraph
Functions
| Name | Description |
|---|---|
| to_tvboptim | Export a tvbo Network to a tvboptim Network or graph object. |
to_tvboptim
adapters.tvboptim.to_tvboptim(
network,
delays=None,
return_type='network',
dynamics=None,
coupling=None,
noise=None,
max_delay=None,
interpolate_delays=False,
**kwargs,
)Export a tvbo Network to a tvboptim Network or graph object.
When dynamics / coupling are not provided explicitly, they are auto-extracted from network.dynamics and network.coupling using each object’s .execute('tvboptim') method.
Parameters
network : Network tvbo Network instance with weights (and optionally lengths) matrices. delays : bool or None, default=None Whether to include delay matrices in the graph. When None (default), auto-inferred from network.coupling: uses delays only when at least one coupling has delayed=True. return_type : str, default=“network” "network" — return a full tvboptim.experimental.network_dynamics.Network (requires dynamics and coupling). "graph" — return only the DenseGraph / DenseDelayGraph. dynamics : AbstractDynamics, optional tvboptim dynamics instance. If not given, auto-extracted from network.dynamics. coupling : AbstractCoupling | dict, optional tvboptim coupling instance(s). If not given, auto-extracted from network.coupling. noise : AbstractNoise, optional tvboptim noise instance. Optional. max_delay : float, optional Concrete upper bound on the delay, forwarded to DenseDelayGraph to size the static history buffer. Pass it when the delays are meant to vary differentiably (e.g. delays = lengths / speed with speed optimised) so the buffer length stays static while the delays may be JAX tracers. When None, derived from the concrete delays. interpolate_delays : bool, default=False When True, enable linear interpolation between bracketing history steps on every delayed coupling, making the coupling differentiable w.r.t. the continuous delay (and hence conduction speed). Requires the "roll" buffer strategy (the default). **kwargs Extra keyword arguments forwarded to the tvboptim Network constructor.
Returns
Network or DenseGraph or DenseDelayGraph