tvbopydantic

datamodel.tvbopydantic

Classes

Name Description
Aggregation Specifies how to aggregate values across a dimension. Used for loss functions to define per-element loss with reduction.
AggregationType How to aggregate time series data
Algorithm A complete specification of an iterative parameter tuning algorithm. Combines update rules, objectives, observations, and hyperparameters.
AlgorithmInclude Reference to an included algorithm with optional argument overrides. Allows combining algorithms with different hyperparameter values.
Argument A function argument with explicit value specification. Value can be: literal (number/string), reference to input (input.key), or cross-observation reference (observation_name.output_key).
BrainAtlas A schema for representing a version of a brain atlas.
BrainRegionSeries A series whose values represent latitude
ClassReference Reference to a class that can be instantiated and called. Used for external library classes (e.g., tvboptim.Bold, custom monitors). The class is instantiated with constructor_args, then called with call_args. Generalizable pattern: works for tvboptim, TVB, or any Python class.
ClinicalImprovement Relative improvement on a defined clinical score.
ClinicalScale A clinical assessment inventory or structured scale composed of multiple scores or items.
ClinicalScore Metadata about a clinical score or scale.
CommonCoordinateSpace A schema for representing a version of a common coordinate space.
ConditionalBlock A single condition and its corresponding equation segment.
Contact Individual contact on a DBS electrode.
Coordinate A 3D coordinate with X, Y, Z values.
CouplingInput Specification of a coupling input channel for multi-coupling dynamics
DBSProtocol A protocol describing DBS therapy, potentially bilateral or multi-lead.
DataSource Specification for loading external/empirical data.
Dataset Collection of data related to a specific DBS study.
DerivedObservation Observation derived from one or more other observations. Examples: - fc (from bold) - single source transformation - fc_corr (from fc and fc_target) - multi-source comparison Unlike regular Observations, these don’t generate monitor classes but are computed from existing observation values.
DimensionType Dimensions along which operations can be applied
EField Simulated electric field from DBS modeling.
Edge A directed edge in a network with coupling and connectivity properties. Edge properties (weight, delay, distance) are stored in the parameters slot with optional units.
Electrode Implanted DBS electrode and contact geometry.
ExecutionConfig Configuration for computational execution (parallelization, precision, hardware).
Exploration Parameter space exploration (grid search, sweep).
Function A function with explicit input → transformation → output flow. Can be equation-based (symbolic) or software-based (callable). In a pipeline, functions are chained: output of one becomes input of next.
FunctionCall Invocation of a function in a pipeline. Can reference a defined Function by name, OR inline a callable directly for external library functions. OR inline a class_call for classes that need instantiation then calling. Use arguments to specify inputs by name (referencing previous outputs or values).
LossFunction A loss function for optimization with optional aggregation. Extends Function with aggregation specification for per-element losses.
Matrix Adjacency matrix of a network.
Network Network specification with nodes, edges, and reusable coupling configurations. Supports both explicit node/edge representation and matrix-based connectivity (Connectome compatibility).
Node A node in a network with its own dynamics and properties
Observation Unified class for all observation/measurement specifications. Covers monitors (BOLD, EEG), tuning observables, and derived quantities. Pipeline is a sequence of Functions with input → output flow.
Optimization Configuration for parameter optimization. Inherits single-stage fields from OptimizationStage. For multi-stage workflows, use ‘stages’ (ignores inherited single-stage fields). Loss equation references observations directly by name.
OptimizationStage A single stage in a multi-stage optimization workflow. Stages run sequentially, with each stage potentially using different parameters, shapes, learning rates, and algorithms.
PDE Partial differential equation problem definition.
ParcellationEntity A schema for representing a parcellation entity, which is an anatomical location or study target.
ParcellationTerminology A schema for representing a parcellation terminology, which consists of parcellation entities.
Range Specifies a range for array generation, parameter bounds, or grid exploration.
ReductionType Operations for reducing/aggregating values across dimensions
RegionMapping Maps vertices to parent regions for hierarchical/aggregated coupling
SoftwarePackage Identity information about a software package independent of a specific version requirement.
SpecimenEnum A set of permissible types for specimens used in brain atlas creation.
StimulationSetting DBS parameters for a specific session.
Subject Human or animal subject receiving DBS.
TimeSeries Time series data from simulations or measurements. Supports BIDS-compatible export for computational modeling (BEP034).
Tractogram Reference to tractography/diffusion MRI data used to derive structural connectivity
TuningObjective Defines what the tuning algorithm optimizes for. Can be an activity target (FIC) or a connectivity target (EIB).
UpdateRule Defines how a parameter is updated based on observables. Represents iterative learning rules like FIC or EIB updates. Functions from experiment.functions are available in the equation.

Aggregation

datamodel.tvbopydantic.Aggregation()

Specifies how to aggregate values across a dimension. Used for loss functions to define per-element loss with reduction.

AggregationType

datamodel.tvbopydantic.AggregationType()

How to aggregate time series data

Attributes

Name Description
first First value in window
last Last value in window
mean Average over time
none No aggregation
window Sliding window aggregation

Algorithm

datamodel.tvbopydantic.Algorithm()

A complete specification of an iterative parameter tuning algorithm. Combines update rules, objectives, observations, and hyperparameters.

AlgorithmInclude

datamodel.tvbopydantic.AlgorithmInclude()

Reference to an included algorithm with optional argument overrides. Allows combining algorithms with different hyperparameter values.

Argument

datamodel.tvbopydantic.Argument()

A function argument with explicit value specification. Value can be: literal (number/string), reference to input (input.key), or cross-observation reference (observation_name.output_key).

BrainAtlas

datamodel.tvbopydantic.BrainAtlas()

A schema for representing a version of a brain atlas.

BrainRegionSeries

datamodel.tvbopydantic.BrainRegionSeries()

A series whose values represent latitude

ClassReference

datamodel.tvbopydantic.ClassReference()

Reference to a class that can be instantiated and called. Used for external library classes (e.g., tvboptim.Bold, custom monitors). The class is instantiated with constructor_args, then called with call_args. Generalizable pattern: works for tvboptim, TVB, or any Python class.

ClinicalImprovement

datamodel.tvbopydantic.ClinicalImprovement()

Relative improvement on a defined clinical score.

ClinicalScale

datamodel.tvbopydantic.ClinicalScale()

A clinical assessment inventory or structured scale composed of multiple scores or items.

ClinicalScore

datamodel.tvbopydantic.ClinicalScore()

Metadata about a clinical score or scale.

CommonCoordinateSpace

datamodel.tvbopydantic.CommonCoordinateSpace()

A schema for representing a version of a common coordinate space.

ConditionalBlock

datamodel.tvbopydantic.ConditionalBlock()

A single condition and its corresponding equation segment.

Contact

datamodel.tvbopydantic.Contact()

Individual contact on a DBS electrode.

Coordinate

datamodel.tvbopydantic.Coordinate()

A 3D coordinate with X, Y, Z values.

CouplingInput

datamodel.tvbopydantic.CouplingInput()

Specification of a coupling input channel for multi-coupling dynamics

DBSProtocol

datamodel.tvbopydantic.DBSProtocol()

A protocol describing DBS therapy, potentially bilateral or multi-lead.

DataSource

datamodel.tvbopydantic.DataSource()

Specification for loading external/empirical data.

Dataset

datamodel.tvbopydantic.Dataset()

Collection of data related to a specific DBS study.

DerivedObservation

datamodel.tvbopydantic.DerivedObservation()

Observation derived from one or more other observations. Examples: - fc (from bold) - single source transformation - fc_corr (from fc and fc_target) - multi-source comparison Unlike regular Observations, these don’t generate monitor classes but are computed from existing observation values.

DimensionType

datamodel.tvbopydantic.DimensionType()

Dimensions along which operations can be applied

Attributes

Name Description
batch Batch dimension (for parallel processing)
frequency Frequency dimension (spectral analysis)
mode Mode dimension (e.g., coupling modes)
node Network node dimension (general graph term)
region Spatial/regional dimension (alias for node in brain networks)
sample Sample/trial/realization dimension
state State variable dimension
time Temporal dimension

EField

datamodel.tvbopydantic.EField()

Simulated electric field from DBS modeling.

Edge

datamodel.tvbopydantic.Edge()

A directed edge in a network with coupling and connectivity properties. Edge properties (weight, delay, distance) are stored in the parameters slot with optional units.

Electrode

datamodel.tvbopydantic.Electrode()

Implanted DBS electrode and contact geometry.

ExecutionConfig

datamodel.tvbopydantic.ExecutionConfig()

Configuration for computational execution (parallelization, precision, hardware).

Exploration

datamodel.tvbopydantic.Exploration()

Parameter space exploration (grid search, sweep).

Function

datamodel.tvbopydantic.Function()

A function with explicit input → transformation → output flow. Can be equation-based (symbolic) or software-based (callable). In a pipeline, functions are chained: output of one becomes input of next.

FunctionCall

datamodel.tvbopydantic.FunctionCall()

Invocation of a function in a pipeline. Can reference a defined Function by name, OR inline a callable directly for external library functions. OR inline a class_call for classes that need instantiation then calling. Use arguments to specify inputs by name (referencing previous outputs or values).

LossFunction

datamodel.tvbopydantic.LossFunction()

A loss function for optimization with optional aggregation. Extends Function with aggregation specification for per-element losses.

Matrix

datamodel.tvbopydantic.Matrix()

Adjacency matrix of a network.

Network

datamodel.tvbopydantic.Network()

Network specification with nodes, edges, and reusable coupling configurations. Supports both explicit node/edge representation and matrix-based connectivity (Connectome compatibility).

Node

datamodel.tvbopydantic.Node()

A node in a network with its own dynamics and properties

Observation

datamodel.tvbopydantic.Observation()

Unified class for all observation/measurement specifications. Covers monitors (BOLD, EEG), tuning observables, and derived quantities. Pipeline is a sequence of Functions with input → output flow.

Optimization

datamodel.tvbopydantic.Optimization()

Configuration for parameter optimization. Inherits single-stage fields from OptimizationStage. For multi-stage workflows, use ‘stages’ (ignores inherited single-stage fields). Loss equation references observations directly by name.

OptimizationStage

datamodel.tvbopydantic.OptimizationStage()

A single stage in a multi-stage optimization workflow. Stages run sequentially, with each stage potentially using different parameters, shapes, learning rates, and algorithms.

PDE

datamodel.tvbopydantic.PDE()

Partial differential equation problem definition.

ParcellationEntity

datamodel.tvbopydantic.ParcellationEntity()

A schema for representing a parcellation entity, which is an anatomical location or study target.

ParcellationTerminology

datamodel.tvbopydantic.ParcellationTerminology()

A schema for representing a parcellation terminology, which consists of parcellation entities.

Range

datamodel.tvbopydantic.Range()

Specifies a range for array generation, parameter bounds, or grid exploration.

ReductionType

datamodel.tvbopydantic.ReductionType()

Operations for reducing/aggregating values across dimensions

Attributes

Name Description
max Maximum value
mean Arithmetic mean
min Minimum value
none No reduction (return per-element values)
sum Sum of values

RegionMapping

datamodel.tvbopydantic.RegionMapping()

Maps vertices to parent regions for hierarchical/aggregated coupling

SoftwarePackage

datamodel.tvbopydantic.SoftwarePackage()

Identity information about a software package independent of a specific version requirement.

SpecimenEnum

datamodel.tvbopydantic.SpecimenEnum()

A set of permissible types for specimens used in brain atlas creation.

StimulationSetting

datamodel.tvbopydantic.StimulationSetting()

DBS parameters for a specific session.

Subject

datamodel.tvbopydantic.Subject()

Human or animal subject receiving DBS.

TimeSeries

datamodel.tvbopydantic.TimeSeries()

Time series data from simulations or measurements. Supports BIDS-compatible export for computational modeling (BEP034).

Tractogram

datamodel.tvbopydantic.Tractogram()

Reference to tractography/diffusion MRI data used to derive structural connectivity

TuningObjective

datamodel.tvbopydantic.TuningObjective()

Defines what the tuning algorithm optimizes for. Can be an activity target (FIC) or a connectivity target (EIB).

UpdateRule

datamodel.tvbopydantic.UpdateRule()

Defines how a parameter is updated based on observables. Represents iterative learning rules like FIC or EIB updates. Functions from experiment.functions are available in the equation.