The Virtual Brain Project

Table Of Contents

Previous topic

traits Package

Next topic

simulator Package

This Page

datatypes Package

TVB DataTypes, as a dictionary between multiple algorithms.

annotations

tvb.datatypes.annotations.AnnotationArray[source]

Holds a flatten form for the annotations for a full connectivity. Each region in the connectivity can have None, or a tree of AnnotationTerms To be stored in a compound DS in H5.

traits on this class:

dtype ()

default: [(‘id’, ‘<i4’), (‘parent_id’, ‘<i4’), (‘parent_left’, ‘<i4’), (‘parent_right’, ‘<i4’), (‘relation’, ‘S16’), (‘label’, ‘S128’), (‘definition’, ‘S1024’), (‘synonym’, ‘S2048’), (‘uri’, ‘S248’), (‘synonym_tvb_left’, ‘<i4’), (‘synonym_tvb_right’, ‘<i4’)]
class tvb.datatypes.annotations.AnnotationTerm(id, parent, parent_left, parent_right, relation, label, definition=None, synonym=None, uri=None, tvb_left=None, tvb_right=None)[source]

Bases: object

One single annotation node (in the tree of annotations / region)

add_child(annotation_child)[source]
to_json(is_right_hemisphere=False, activation_patterns=None)[source]
to_tuple()[source]
tvb.datatypes.annotations.ConnectivityAnnotations[source]

Ontology annotations for a Connectivity.

traits on this class:

connectivity ()

default: None
region_annotations (Region Annotations)
Flat tree of annotations for every connectivity region.
default: []

arrays

The Array datatypes. This brings together the scientific and framework methods that are associated with the Array datatypes.

tvb.datatypes.arrays.BaseArray[source]

Base class for array-type traits. traits on this class:

dtype ()

default: None
tvb.datatypes.arrays.BoolArray[source]

traited class BoolArray traits on this class:

dtype ()

default: <type ‘bool’>
tvb.datatypes.arrays.ComplexArray[source]

traited class ComplexArray traits on this class:

dtype ()

default: <type ‘numpy.complex128’>
tvb.datatypes.arrays.FloatArray[source]

traited class FloatArray traits on this class:

dtype ()

default: <type ‘numpy.float64’>
tvb.datatypes.arrays.IndexArray[source]

traited class IndexArray traits on this class:

dtype ()

default: None
target (Indexed array)
A link to the array that the indices index.
default: None
tvb.datatypes.arrays.IntegerArray[source]

traited class IntegerArray traits on this class:

dtype ()

default: <type ‘numpy.int32’>
tvb.datatypes.arrays.MappedArray[source]

An array stored in the database. traits on this class:

aggregation_functions ()

default: None
array_data ()

default: None
dimensions_labels ()

default: None
label_x ()

default: None
label_y ()

default: None
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
nr_dimensions ()

default: None
title ()

default: None
tvb.datatypes.arrays.OrientationArray[source]

traited class OrientationArray traits on this class:

coordinate_system_or (Coordinate system)

default: cartesian
dtype ()

default: <type ‘numpy.float64’>
tvb.datatypes.arrays.PositionArray[source]

traited class PositionArray traits on this class:

coordinate_space (Coordinate space)
The standard space the positions are in, eg, ‘MNI’, ‘colin27’
default: None
coordinate_system (Coordinate system)
The coordinate system used to specify the positions. Eg: ‘spherical’, ‘polar’
default: cartesian
dtype ()

default: <type ‘numpy.float64’>
tvb.datatypes.arrays.StringArray[source]

traited class StringArray traits on this class:

connectivity

The Connectivity datatype. This brings together the scientific and framework methods that are associated with the connectivity data.

tvb.datatypes.connectivity.Connectivity[source]

traited class Connectivity traits on this class:

areas (Area of regions)
Estimated area represented by the regions in the connectivity matrix. NOTE: Unknown data should be zeros.
default: None
centres (Region centres)
An array specifying the location of the centre of each region.
default: None
cortical (Cortical)
A boolean vector specifying whether or not a region is part of the cortex.
default: None
delays (Conduction delay)
Matrix of time delays between regions in physical units, setting conduction speed automatically combines with tract lengths to update this matrix, i.e. don’t try and change it manually.
default: None
hemispheres (Hemispheres (True for Right and False for Left Hemisphere)
A boolean vector specifying whether or not a region is part of the right hemisphere
default: None
idelays (Conduction delay indices)
An array of time delays between regions in integration steps.
default: None
number_of_connections (Number of connections)
The number of non-zero entries represented in this Connectivity
default: None
number_of_regions (Number of regions)
The number of regions represented in this Connectivity
default: None
orientations (Average region orientation)
Unit vectors of the average orientation of the regions represented in the connectivity matrix. NOTE: Unknown data should be zeros.
default: None
parent_connectivity ()

default: None
region_labels (Region labels)
Short strings, ‘labels’, for the regions represented by the connectivity matrix.
default: None
saved_selection ()

default: None
speed (Conduction speed)
A single number or matrix of conduction speeds for the myelinated fibre tracts between regions.
default: [ 3.]
tract_lengths (Tract lengths)
The length of myelinated fibre tracts between regions. If not provided Euclidean distance between region centres is used.
default: None
undirected ()
1, when the weights matrix is square and symmetric over the main diagonal, 0 when directed graph.
default: 0
weights (Connection strengths)
Matrix of values representing the strength of connections between regions, arbitrary units.
default: None

cortex

tvb.datatypes.cortex.Cortex[source]

Wrapper Class over a CorticalSurface, to be used when preparing a simulation launch.

traits on this class:

bi_hemispheric ()

default: None
coupling_strength (Local coupling strength)
A factor that rescales local connectivity strengths.
default: [ 1.]
range: low = 0.0 ; high = 20.0
edge_max_length ()

default: None
edge_mean_length ()

default: None
edge_min_length ()

default: None
eeg_projection (EEG projection)
A 2-D array which projects the neural activity on the cortical surface to a set of EEG sensors.
default: None
geodesic_distance_matrix (Geodesic distance matrix)
A sparse matrix of truncated geodesic distances
default: None
hemisphere_mask (An array specifying if a vertex belongs to the right hemisphere)

default: None
internal_projection (Internal projection)
A 2-D array which projects the neural activity on the cortical surface to a set of embeded sensors.
default: None
local_connectivity (Local Connectivity)
Define the interaction between neighboring network nodes. This is implicitly integrated in the definition of a given surface as an excitatory mean coupling of directly adjacent neighbors to the first state variable of each population model (since these typically represent the mean-neural membrane voltage). This coupling is instantaneous (no time delays).
default: None
meg_projection (MEG projection)
A 2-D array which projects the neural activity on the cortical surface to a set of MEG sensors.
default: None
number_of_split_slices ()

default: None
number_of_triangles (Number of triangles)
The number of triangles making up this surface.
default: None
number_of_vertices (Number of vertices)
The number of vertices making up this surface.
default: None
region_mapping_data (region mapping)
An index vector of length equal to the number_of_vertices + the number of non-cortical regions, with values that index into an associated connectivity matrix.
default: None
split_slices ()

default: None
split_triangles ()

default: None
surface_type ()

default: Cortical Surface
triangle_normals (Triangle normal vectors)
An array of unit normal vectors for the surfaces triangles.
default: None
triangles (Triangles)
Array of indices into the vertices, specifying the triangles which define the surface.
default: None
valid_for_simulations ()

default: None
vertex_normals (Vertex normal vectors)
An array of unit normal vectors for the surfaces vertices.
default: None
vertices (Vertex positions)
An array specifying coordinates for the surface vertices.
default: None
zero_based_triangles ()

default: None

equations

The Equation datatypes. This brings together the scientific and framework methods that are associated with the Equation datatypes.

tvb.datatypes.equations.Alpha[source]

An Alpha function belonging to the Exponential function family.

traits on this class:

equation (Alpha Equation)
\((\alpha * \beta) / (\beta - \alpha) * (\exp(-\alpha * (x-onset)) - \exp(-\beta * (x-onset)))\) for \((x-onset) > 0\)
default: where((var-onset) > 0, (alpha * beta) / (beta - alpha) * (exp(-alpha * (var-onset)) - exp(-beta * (var-onset))), 0.0 * var)
parameters (Alpha Parameters)

default: {‘onset’: 0.5, ‘alpha’: 13.0, ‘beta’: 42.0}
tvb.datatypes.equations.Cosine[source]

A Cosine equation.

traits on this class:

equation (Cosine Equation)
\(amp \cos(2.0 \pi frequency x)\)
default: amp * cos(6.283185307179586 * frequency * var)
parameters (Cosine Parameters)

default: {‘amp’: 1.0, ‘frequency’: 0.01}
tvb.datatypes.equations.DiscreteEquation[source]

A special case for ‘discrete’ spaces, such as the regions, where each point in the space is effectively just assigned a value.

traits on this class:

equation (Discrete Equation)
The equation defines a function of \(x\)
default: var
parameters (Parameters in a dictionary.)
Should be a list of the parameters and their meaning, Traits should be able to take defaults and sensible ranges from any traited information that was provided.
default: {}
tvb.datatypes.equations.DoubleExponential[source]

A difference of two exponential functions to define a kernel for the bold monitor.

Parameters :

  • \(\tau_1\): Time constant of the second exponential function [s]
  • \(\tau_2\): Time constant of the first exponential function [s].
  • \(f_1\) : Frequency of the first sine function [Hz].
  • \(f_2\) : Frequency of the second sine function [Hz].
  • \(amp_1\): Amplitude of the first exponential function.
  • \(amp_2\): Amplitude of the second exponential function.
  • \(a\) : Amplitude factor after normalization.

Reference:

[P_2000]Alex Polonsky, Randolph Blake, Jochen Braun and David J. Heeger (2000). Neuronal activity in human primary visual cortex correlates with perception during binocular rivalry. Nature Neuroscience 3: 1153-1159

traits on this class:

equation (Double Exponential Equation)
\(h(var) = amp_1\exp(\frac{-var}{ au_1}) \sin(2\cdot\pi f_1 \cdot var) - amp_2\cdot \exp(-\frac{var} {\tau_2})*\sin(2\pi f_2 var)\).
default: ((amp_1 * exp(-var/tau_1) * sin(2.*pi*f_1*var)) - (amp_2 * exp(-var/ tau_2) * sin(2.*pi*f_2*var)))
parameters (Double Exponential Parameters)

default: {‘a’: 0.1, ‘amp_2’: 0.1, ‘amp_1’: 0.1, ‘f_1’: 0.03, ‘f_2’: 0.12, ‘pi’: 3.141592653589793, ‘tau_2’: 7.4, ‘tau_1’: 7.22}
tvb.datatypes.equations.DoubleGaussian[source]

A Mexican-hat function approximated by the difference of Gaussians functions.

traits on this class:

equation (Double Gaussian Equation)
\(amp_1 \exp\left(-\left((x-midpoint_1)^2 / \left(2.0 \sigma_1^2\right)\right)\right) - amp_2 \exp\left(-\left((x-midpoint_2)^2 / \left(2.0 \sigma_2^2\right)\right)\right)\)
default: (amp_1 * exp(-((var-midpoint_1)**2 / (2.0 * sigma_1**2)))) - (amp_2 * exp(-((var-midpoint_2)**2 / (2.0 * sigma_2**2))))
parameters (Double Gaussian Parameters)

default: {‘midpoint_2’: 0.0, ‘midpoint_1’: 0.0, ‘amp_2’: 1.0, ‘amp_1’: 0.5, ‘sigma_2’: 10.0, ‘sigma_1’: 20.0}
tvb.datatypes.equations.Equation[source]

Base class for Equation data types. traits on this class:

equation (Equation as a string)
A latex representation of the equation, with the extra escaping needed for interpretation via sphinx.
default: None
parameters (Parameters in a dictionary.)
Should be a list of the parameters and their meaning, Traits should be able to take defaults and sensible ranges from any traited information that was provided.
default: {}
tvb.datatypes.equations.FiniteSupportEquation[source]

Equations that decay to zero as the variable moves away from zero. It is necessary to restrict spatial equation evaluated on a surface to this class, are . The main purpose of this class is to facilitate filtering in the UI, for patters on surface (stimuli surface and localConnectivity).

traits on this class:

equation (Equation as a string)
A latex representation of the equation, with the extra escaping needed for interpretation via sphinx.
default: None
parameters (Parameters in a dictionary.)
Should be a list of the parameters and their meaning, Traits should be able to take defaults and sensible ranges from any traited information that was provided.
default: {}
tvb.datatypes.equations.FirstOrderVolterra[source]

Integral form of the first Volterra kernel of the three used in the Ballon Windekessel model for computing the Bold signal. This function describes a damped Oscillator.

Parameters :

  • \(\tau_s\): Dimensionless? exponential decay parameter.
  • \(\tau_f\): Dimensionless? oscillatory parameter.
  • \(k_1\) : First Volterra kernel coefficient.
  • \(V_0\) : Resting blood volume fraction.

References :

[F_2000]Friston, K., Mechelli, A., Turner, R., and Price, C., Nonlinear Responses in fMRI: The Balloon Model, Volterra Kernels, and Other Hemodynamics, NeuroImage, 12, 466 - 477, 2000.

traits on this class:

equation (First Order Volterra Kernel)
\(G(t - t^{\prime}) = e^{\frac{1}{2} \left(\frac{t - t^{\prime}}{\tau_s} \right)} \frac{\sin\left((t - t^{\prime}) \sqrt{\frac{1}{\tau_f} - \frac{1}{4 \tau_s^2}}\right)} {\sqrt{\frac{1}{\tau_f} - \frac{1}{4 \tau_s^2}}} \; \; \; \; \; \; for \; \; \; t \geq t^{\prime} = 0 \; \; \; \; \; \; for \; \; \; t < t^{\prime}\).
default: 1/3. * exp(-0.5*(var / tau_s)) * (sin(sqrt(1./tau_f - 1./(4.*tau_s**2)) * var)) / (sqrt(1./tau_f - 1./(4.*tau_s**2)))
parameters (Mixture of Gammas Parameters)

default: {‘tau_f’: 0.4, ‘k_1’: 5.6, ‘V_0’: 0.02, ‘tau_s’: 0.8}
tvb.datatypes.equations.Gamma[source]

A Gamma function for the bold monitor. It belongs to the family of Exponential functions.

Parameters:

  • \(\tau\) : Exponential time constant of the gamma function [seconds].

  • \(n\) : The phase delay of the gamma function.

  • math:factorial : (n-1)!. numexpr does not support factorial yet.
  • math:a : Amplitude factor after normalization.

Reference:

[B_1996]Geoffrey M. Boynton, Stephen A. Engel, Gary H. Glover and David J. Heeger (1996). Linear Systems Analysis of Functional Magnetic Resonance Imaging in Human V1. J Neurosci 16: 4207-4221

Note

might be filtered from the equations used in Stimulus and Local Connectivity.

traits on this class:

equation (Gamma Equation)
\(h(var) = \frac{(\frac{var}{\tau})^{(n-1)}\exp{-(\frac{var}{\tau})}}{\tau(n-1)!}\).
default: ((var / tau) ** (n - 1) * exp(-(var / tau)) )/ (tau * factorial)
parameters (Gamma Parameters)

default: {‘factorial’: 2.0, ‘tau’: 1.08, ‘a’: 0.1, ‘n’: 3.0}
tvb.datatypes.equations.Gaussian[source]

A Gaussian equation. offset: parameter to extend the behaviour of this function when spatializing model parameters.

traits on this class:

equation (Gaussian Equation)
\((amp \exp\left(-\left(\left(x-midpoint\right)^2 / \left(2.0 \sigma^2\right)\right)\right)) + offset\)
default: (amp * exp(-((var-midpoint)**2 / (2.0 * sigma**2))))+offset
parameters (Gaussian Parameters)

default: {‘amp’: 1.0, ‘sigma’: 1.0, ‘midpoint’: 0.0, ‘offset’: 0.0}
tvb.datatypes.equations.GeneralizedSigmoid[source]

A General Sigmoid equation.

traits on this class:

equation (Generalized Sigmoid Equation)
\(low + (high - low) / (1.0 + \exp(-\pi/\sqrt(3.0) (x-midpoint)/\sigma))\)
default: low + (high - low) / (1.0 + exp(-1.8137993642342178 * (var-midpoint)/sigma))
parameters (Sigmoid Parameters)

default: {‘high’: 1.0, ‘midpoint’: 1.0, ‘sigma’: 0.3, ‘low’: 0.0}
tvb.datatypes.equations.HRFKernelEquation[source]

Base class for hemodynamic response functions. traits on this class:

equation (Equation as a string)
A latex representation of the equation, with the extra escaping needed for interpretation via sphinx.
default: None
parameters (Parameters in a dictionary.)
Should be a list of the parameters and their meaning, Traits should be able to take defaults and sensible ranges from any traited information that was provided.
default: {}
tvb.datatypes.equations.Linear[source]

A linear equation.

traits on this class:

equation (Linear Equation)
\(result = a * x + b\)
default: a * var + b
parameters (Linear Parameters)

default: {‘a’: 1.0, ‘b’: 0.0}
tvb.datatypes.equations.MixtureOfGammas[source]

A mixture of two gamma distributions to create a kernel similar to the one used in SPM.

>> import scipy.stats as sp_stats >> import numpy >> t = numpy.linspace(1,20,100) >> a1, a2 = 6., 10. >> lambda = 1. >> c = 0.5 >> hrf = sp_stats.gamma.pdf(t, a1, lambda) - c * sp_stats.gamma.pdf(t, a2, lambda)

gamma.pdf(x, a, theta) = (lambda*x)**(a-1) * exp(-lambda*x) / gamma(a) a : shape parameter theta: 1 / lambda : scale parameter

References:

[G_1999](1, 2) Glover, G. Deconvolution of Impulse Response in Event-Related BOLD fMRI. NeuroImage 9, 416-429, 1999.

Parameters:

  • \(a_{1}\) : shape parameter first gamma pdf.
  • \(a_{2}\) : shape parameter second gamma pdf.
  • \(\lambda\) : scale parameter first gamma pdf.

Default values are based on [G_1999]: * \(a_{1} - 1 = n_{1} = 5.0\) * \(a_{2} - 1 = n_{2} = 12.0\) * \(c \equiv a_{2} = 0.4\)

Alternative values \(a_{2}=10\) and \(c=0.5\)

NOTE: gamma_a_1 and gamma_a_2 are placeholders, the true values are computed before evaluating the expression, because numexpr does not support certain functions.

NOTE: [G_1999] used a different analytical function that can be approximated by this difference of gamma pdfs

traits on this class:

equation (Mixture of Gammas)
\(\frac{\lambda \,t^{a_{1} - 1} \,\, \exp^{-\lambda \,t}}{\Gamma(a_{1})} - 0.5 \frac{\lambda \,t^{a_{2} - 1} \,\, \exp^{-\lambda \,t}}{\Gamma(a_{2})}\).
default: (l * var)**(a_1-1) * exp(-l*var) / gamma_a_1 - c * (l*var)**(a_2-1) * exp(-l*var) / gamma_a_2
parameters (Double Exponential Parameters)

default: {‘gamma_a_2’: 1.0, ‘gamma_a_1’: 1.0, ‘a_2’: 13.0, ‘a_1’: 6.0, ‘c’: 0.4, ‘l’: 1.0}
tvb.datatypes.equations.PulseTrain[source]

A pulse train , offset with respect to the time axis.

Parameters:

  • \(\tau\) : pulse width or pulse duration
  • \(T\) : pulse repetition period
  • \(f\) : pulse repetition frequency (1/T)
  • duty cycle : :math:\frac{\tau}{T} (for a square wave: 0.5)
  • onset time :

traits on this class:

equation (Pulse Train)
\(\frac{\tau}{T} +\sum_{n=1}^{\infty}\frac{2}{n\pi} \sin\left(\frac{\pi\,n\tau}{T}\right) \cos\left(\frac{2\pi\,n}{T} var\right)\). The starting time is halfway through the first pulse. The phase can be offset t with t - tau/2
default: where((var % T) < tau, amp, 0)
parameters (Pulse Train Parameters)

default: {‘onset’: 30.0, ‘tau’: 13.0, ‘T’: 42.0, ‘amp’: 1.0}
tvb.datatypes.equations.Sigmoid[source]

A Sigmoid equation. offset: parameter to extend the behaviour of this function when spatializing model parameters.

traits on this class:

equation (Sigmoid Equation)
\((amp / (1.0 + \exp(-\pi/\sqrt(3.0) (radius-x)/\sigma))) + offset\)
default: (amp / (1.0 + exp(-1.8137993642342178 * (radius-var)/sigma))) + offset
parameters (Sigmoid Parameters)

default: {‘amp’: 1.0, ‘radius’: 5.0, ‘sigma’: 1.0, ‘offset’: 0.0}
tvb.datatypes.equations.Sinusoid[source]

A Sinusoid equation.

traits on this class:

equation (Sinusoid Equation)
\(amp \sin(2.0 \pi frequency x)\)
default: amp * sin(6.283185307179586 * frequency * var)
parameters (Sinusoid Parameters)

default: {‘amp’: 1.0, ‘frequency’: 0.01}
tvb.datatypes.equations.SpatialApplicableEquation[source]

Abstract class introduced just for filtering what equations to be displayed in UI, for setting model parameters on the Surface level.

traits on this class:

equation (Equation as a string)
A latex representation of the equation, with the extra escaping needed for interpretation via sphinx.
default: None
parameters (Parameters in a dictionary.)
Should be a list of the parameters and their meaning, Traits should be able to take defaults and sensible ranges from any traited information that was provided.
default: {}
tvb.datatypes.equations.TemporalApplicableEquation[source]

Abstract class introduced just for filtering what equations to be displayed in UI, for setting the temporal component in Stimulus on region and surface.

traits on this class:

equation (Equation as a string)
A latex representation of the equation, with the extra escaping needed for interpretation via sphinx.
default: None
parameters (Parameters in a dictionary.)
Should be a list of the parameters and their meaning, Traits should be able to take defaults and sensible ranges from any traited information that was provided.
default: {}

fcd

Adapter that uses the traits module to generate interfaces for ... Analyzer.

tvb.datatypes.fcd.Fcd[source]

traited class Fcd traits on this class:

aggregation_functions ()

default: None
array_data ()

default: None
dimensions_labels ()

default: None
label_x ()

default: None
label_y ()

default: None
labels_ordering (Dimension Names)
List of strings representing names of each data dimension
default: [‘Time’, ‘Time’, ‘State Variable’, ‘Mode’]
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
nr_dimensions ()

default: None
source (Source time-series)
Links to the time-series on which FCD is calculated.
default: None
sp (Spanning between two consecutive sliding window (ms))
Spanning= (time windows length)-(overlapping between two consecutive time window). FCD matrix is calculated in the following way: the time series is divided in time window of fixed length and with an overlapping of fixed length. The datapoints within each window, centered at time ti, are used to calculate FC(ti) as Pearson correlation. The ij element of the FCD matrix is calculated as the Pearson correlation between FC(ti) and FC(tj) arranged in a vector
default: 2000
sw (Sliding window length (ms))
Length of the time window used to divided the time series. FCD matrix is calculated in the following way: the time series is divided in time window of fixed length and with an overlapping of fixed length. The datapoints within each window, centered at time ti, are used to calculate FC(ti) as Pearson correlation. The ij element of the FCD matrix is calculated as the Pearson correlation between FC(ti) and FC(tj) arranged in a vector.
default: 120000
title ()

default: None

graph

The Graph datatypes. This brings together the scientific and framework methods that are associated with the Graph datatypes.

tvb.datatypes.graph.ConnectivityMeasure[source]

Measurement of based on a connectivity. traits on this class:

aggregation_functions ()

default: None
array_data ()

default: None
connectivity ()

default: None
dimensions_labels ()

default: None
label_x ()

default: None
label_y ()

default: None
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
nr_dimensions ()

default: None
title ()

default: None
tvb.datatypes.graph.CorrelationCoefficients[source]

Correlation coefficients datatype. traits on this class:

aggregation_functions ()

default: None
array_data ()

default: None
dimensions_labels ()

default: None
label_x ()

default: None
label_y ()

default: None
labels_ordering (Dimension Names)
List of strings representing names of each data dimension
default: [‘Node’, ‘Node’, ‘State Variable’, ‘Mode’]
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
nr_dimensions ()

default: None
source (Source time-series)
Links to the time-series on which Correlation (coefficients) is applied.
default: None
title ()

default: None
tvb.datatypes.graph.Covariance[source]

Covariance datatype. traits on this class:

aggregation_functions ()

default: None
array_data ()

default: None
dimensions_labels ()

default: None
label_x ()

default: None
label_y ()

default: None
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
nr_dimensions ()

default: None
source (Source time-series)
Links to the time-series on which NodeCovariance is applied.
default: None
title ()

default: None

local_connectivity

tvb.datatypes.local_connectivity.LocalConnectivity[source]

A sparse matrix for representing the local connectivity within the Cortex.

traits on this class:

cutoff (Cutoff distance (mm))
Distance at which to truncate the evaluation in mm.
default: 40.0
equation (Spatial)

default: <class ‘tvb.datatypes.equations.Gaussian’>
matrix ()

default: None
surface (Surface)

default: None

lookup_tables

The LookUpTable datatype. This brings together the scientific and framework methods that are associated with the precalculated look up tables.

tvb.datatypes.lookup_tables.LookUpTable[source]

Lookup Tables for storing pre-computed functions. Specific table subclasses are implemented below.

traits on this class:

data (data)
Tabulated values
default: None
df (df)
.
default: None
dx (dx)
Tabulation step
default: []
equation (String representation of the precalculated function)
A latex representation of the function whose values are stored in the table, with the extra escaping needed for interpretation via sphinx.
default: None
invdx (invdx)
.
default: []
number_of_values (Number of values)
The number of values in the table
default: 0
xmax (x-max)
Maximum value
default: None
xmin (x-min)
Minimum value
default: None
tvb.datatypes.lookup_tables.NerfTable[source]

Look up table containing the values of Nerf integral within the \(\phi\) function that describes how the discharge rate vary as a function of parameters defining the statistical properties of the membrane potential in presence of synaptic inputs.

traits on this class:

data (data)
Tabulated values
default: None
df (df)
.
default: None
dx (dx)
Tabulation step
default: []
equation (String representation of the precalculated function)
A latex representation of the function whose values are stored in the table, with the extra escaping needed for interpretation via sphinx.
default: None
invdx (invdx)
.
default: []
number_of_values (Number of values)
The number of values in the table
default: 0
xmax (x-max)
Maximum value
default: None
xmin (x-min)
Minimum value
default: None
tvb.datatypes.lookup_tables.PsiTable[source]

Look up table containing the values of a function representing the time-averaged gating variable \(\psi(\nu)\) as a function of the presynaptic rates \(\nu\)

traits on this class:

data (data)
Tabulated values
default: None
df (df)
.
default: None
dx (dx)
Tabulation step
default: []
equation (String representation of the precalculated function)
A latex representation of the function whose values are stored in the table, with the extra escaping needed for interpretation via sphinx.
default: None
invdx (invdx)
.
default: []
number_of_values (Number of values)
The number of values in the table
default: 0
xmax (x-max)
Maximum value
default: None
xmin (x-min)
Minimum value
default: None

mapped_values

tvb.datatypes.mapped_values.DatatypeMeasure[source]

Class to hold the metric for a previous stored DataType. E.g. Measure (single value) for any TimeSeries resulted in a group of Simulations

traits on this class:

analyzed_datatype ()

default: None
metrics ()

default: None
tvb.datatypes.mapped_values.ValueWrapper[source]

Class to wrap a singular value storage in DB.

traits on this class:

data_name ()

default: None
data_type ()

default: unknown
data_value ()

default: None

mode_decompositions

The Mode Decomposition datatypes. This brings together the scientific and framework methods that are associated with the Mode Decomposition datatypes.

tvb.datatypes.mode_decompositions.IndependentComponents[source]

Result of an Independent Component Analysis.

traits on this class:

component_time_series (Component time series. Unmixed sources.)

default: None
mixing_matrix (Mixing matrix - Spatial Maps)
The linear mixing matrix (Mixing matrix)
default: None
n_components (Number of independent components)
Observed data matrix is considered to be a linear combination of \(n\) non-Gaussian independent components
default: None
norm_source (Normalised source time series. Zero centered and whitened.)

default: None
normalised_component_time_series (Normalised component time series)

default: None
prewhitening_matrix (Pre-whitening matrix)

default: None
source (Source time-series)
Links to the time-series on which the ICA is applied.
default: None
unmixing_matrix (Unmixing matrix - Spatial maps)
The estimated unmixing matrix used to obtain the unmixed sources from the data
default: None
tvb.datatypes.mode_decompositions.PrincipalComponents[source]

Result of a Principal Component Analysis (PCA).

traits on this class:

component_time_series (Component time series)

default: None
fractions (Fraction explained)
A vector or collection of vectors representing the fraction of the variance explained by each principal component.
default: None
norm_source (Normalised source time series)

default: None
normalised_component_time_series (Normalised component time series)

default: None
source (Source time-series)
Links to the time-series on which the PCA is applied.
default: None
weights (Principal vectors)
The vectors of the ‘weights’ with which each time-series is represented in each component.
default: None

noise_framework

Module to handle framework specific methods related to noise sources.

tvb.datatypes.noise_framework.build_noise(parent_parameters)[source]

Build Noise entity from dictionary of parameters. :param parent_parameters: dictionary of parameters for the entity having Noise as attribute. The dictionary is after UI form-submit and framework pre-process. :return: Noise entity.

patterns

The Pattern datatypes. This brings together the scientific and framework methods that are associated with the pattern datatypes.

tvb.datatypes.patterns.SpatialPattern[source]

Equation for space variation.

traits on this class:

spatial (Spatial Equation)

default: None
tvb.datatypes.patterns.SpatialPatternVolume[source]

A spatio-temporal pattern defined in a volume. traits on this class:

focal_points_volume (Focal points)

default: None
spatial (Spatial Equation)

default: None
volume (Volume)

default: None
class tvb.datatypes.patterns.SpatioTemporalCall[source]

Bases: object

A call method to be added to all Spatio- Temporal classes

tvb.datatypes.patterns.SpatioTemporalPattern[source]

Combine space and time equations.

traits on this class:

spatial (Spatial Equation)

default: None
temporal (Temporal Equation)

default: None
tvb.datatypes.patterns.StimuliRegion[source]

A class that bundles the temporal profile of the stimulus, together with the list of scaling weights of the regions where it will applied.

traits on this class:

connectivity (Connectivity)

default: None
spatial (Spatial Equation)

default: <class ‘tvb.datatypes.equations.DiscreteEquation’>
temporal (Temporal Equation)

default: None
weight (scaling)

default: None
tvb.datatypes.patterns.StimuliSurface[source]

A spatio-temporal pattern defined in a Surface DataType. It includes the list of focal points.

traits on this class:

focal_points_surface (Focal points)

default: None
focal_points_triangles (Focal points triangles)

default: None
spatial (Spatial Equation)

default: None
surface (Surface)

default: None
temporal (Temporal Equation)

default: None

projections

The ProjectionMatrices DataTypes. This brings together the scientific and framework methods that are associated with the surfaces data.

tvb.datatypes.projections.ProjectionMatrix[source]

Base DataType for representing a ProjectionMatrix. The projection is between a source of type CorticalSurface and a set of Sensors.

traits on this class:

brain_skull (Brain Skull)
Boundary between skull and cortex domains.
default: None
conductances (Domain conductances)
A dictionary representing the conductances of ...
default: {‘brain’: 1.0, ‘air’: 0.0, ‘skull’: 0.01, ‘skin’: 1.0}
projection_data (Projection Matrix Data)

default: None
projection_type ()

default: None
sensors (Sensors)
A set of sensors to compute projection matrix for them.
default: None
skin_air (Skin Air)
Boundary between skin and air domains.
default: None
skull_skin (Skull Skin)
Boundary between skull and skin domains.
default: None
sources (surface or region)

default: None
tvb.datatypes.projections.ProjectionSurfaceEEG[source]

Specific projection, from a CorticalSurface to EEG sensors.

traits on this class:

brain_skull (Brain Skull)
Boundary between skull and cortex domains.
default: None
conductances (Domain conductances)
A dictionary representing the conductances of ...
default: {‘brain’: 1.0, ‘skin’: 1.0, ‘skull’: 0.01, ‘air’: 0.0}
projection_data (Projection Matrix Data)

default: None
projection_type ()

default: projEEG
sensors ()

default: None
skin_air (Skin Air)
Boundary between skin and air domains.
default: None
skull_skin (Skull Skin)
Boundary between skull and skin domains.
default: None
sources (surface or region)

default: None
tvb.datatypes.projections.ProjectionSurfaceMEG[source]

Specific projection, from a CorticalSurface to MEG sensors.

traits on this class:

brain_skull (Brain Skull)
Boundary between skull and cortex domains.
default: None
conductances (Domain conductances)
A dictionary representing the conductances of ...
default: {‘brain’: 1.0, ‘skin’: 1.0, ‘skull’: 0.01, ‘air’: 0.0}
projection_data (Projection Matrix Data)

default: None
projection_type ()

default: projMEG
sensors ()

default: None
skin_air (Skin Air)
Boundary between skin and air domains.
default: None
skull_skin (Skull Skin)
Boundary between skull and skin domains.
default: None
sources (surface or region)

default: None
tvb.datatypes.projections.ProjectionSurfaceSEEG[source]

Specific projection, from a CorticalSurface to SEEG sensors.

traits on this class:

brain_skull (Brain Skull)
Boundary between skull and cortex domains.
default: None
conductances (Domain conductances)
A dictionary representing the conductances of ...
default: {‘brain’: 1.0, ‘skin’: 1.0, ‘skull’: 0.01, ‘air’: 0.0}
projection_data (Projection Matrix Data)

default: None
projection_type ()

default: projSEEG
sensors ()

default: None
skin_air (Skin Air)
Boundary between skin and air domains.
default: None
skull_skin (Skull Skin)
Boundary between skull and skin domains.
default: None
sources (surface or region)

default: None

region_mapping

DataTypes for mapping some TVB DataTypes to a Connectivity (regions).

In FreeSurfer terms, a RegionMapping is a parcellation and a VolumeMapping is a segmentation.

tvb.datatypes.region_mapping.RegionMapping[source]

An array (of length Surface.vertices). Each value is representing the index in Connectivity regions to which the current vertex is mapped.

traits on this class:

aggregation_functions ()

default: None
array_data ()

default: None
connectivity ()

default: None
dimensions_labels ()

default: None
label_x ()

default: None
label_y ()

default: None
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
nr_dimensions ()

default: None
surface ()

default: None
title ()

default: None
tvb.datatypes.region_mapping.RegionVolumeMapping[source]

Each value is representing the index in Connectivity regions to which the current voxel is mapped.

traits on this class:

aggregation_functions ()

default: None
array_data ()

default: None
connectivity ()

default: None
dimensions_labels ()

default: None
label_x ()

default: None
label_y ()

default: None
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
nr_dimensions ()

default: None
title ()

default: None
volume ()

default: None

sensors

The Sensors dataType. This brings together the scientific and framework methods that are associated with the sensor dataTypes.

tvb.datatypes.sensors.Sensors[source]

Base Sensors class. All sensors have locations. Some will have orientations, e.g. MEG.

traits on this class:

has_orientation ()

default: False
labels (Sensor labels)

default: None
locations (Sensor locations)

default: None
number_of_sensors (Number of sensors)
The number of sensors described by these Sensors.
default: None
orientations ()

default: None
sensors_type ()

default: None
usable (Usable sensors)
The sensors in set which are used for signal data.
default: None
tvb.datatypes.sensors.SensorsEEG[source]

EEG sensor locations are represented as unit vectors, these need to be combined with a head(outer-skin) surface to obtain actual sensor locations

                      position
                         |
                        / \
                       /   \
file columns: labels, x, y, z

traits on this class:

has_orientation ()

default: False
labels (Sensor labels)

default: None
locations (Sensor locations)

default: None
number_of_sensors (Number of sensors)
The number of sensors described by these Sensors.
default: None
orientations ()

default: None
sensors_type ()

default: EEG
usable (Usable sensors)
The sensors in set which are used for signal data.
default: None
tvb.datatypes.sensors.SensorsInternal[source]

Sensors inside the brain...

traits on this class:

has_orientation ()

default: False
labels (Sensor labels)

default: None
locations (Sensor locations)

default: None
number_of_sensors (Number of sensors)
The number of sensors described by these Sensors.
default: None
orientations ()

default: None
sensors_type ()

default: Internal
usable (Usable sensors)
The sensors in set which are used for signal data.
default: None
tvb.datatypes.sensors.SensorsMEG[source]

These are actually just SQUIDS. Axial or planar gradiometers are achieved by calculating lead fields for two sets of sensors and then subtracting...

                      position  orientation
                         |           |
                        / \         / \
                       /   \       /   \
file columns: labels, x, y, z,   dx, dy, dz

traits on this class:

has_orientation ()

default: True
labels (Sensor labels)

default: None
locations (Sensor locations)

default: None
number_of_sensors (Number of sensors)
The number of sensors described by these Sensors.
default: None
orientations (Sensor orientations)
An array representing the orientation of the MEG SQUIDs
default: None
sensors_type ()

default: MEG
usable (Usable sensors)
The sensors in set which are used for signal data.
default: None

sensors_bst_to_tvb

Small script for converting Brainstorm sensor files for our default dataset to the simple ASCII format used by TVB (and other software).

NB: Brainstorm uses meters, TVB uses millimeters.

tvb.datatypes.sensors_bst_to_tvb.convert_brainstorm_to_tvb(tvb_data_path, chan_paths)[source]

Convert given set of channels from Brainstorm to TVB formats.

tvb.datatypes.sensors_bst_to_tvb.get_field_array(mat_group, n=3, dtype=<type 'numpy.float64'>)[source]

simulation_state

DataType for storing a simulator’s state in files and as DB reference.

tvb.datatypes.simulation_state.SimulationState[source]

Simulation State, prepared for H5 file storage.

traits on this class:

current_state ()

default: None
current_step ()

default: None
history ()

default: None
monitor_stock_1 ()

default: None
monitor_stock_10 ()

default: None
monitor_stock_11 ()

default: None
monitor_stock_12 ()

default: None
monitor_stock_13 ()

default: None
monitor_stock_14 ()

default: None
monitor_stock_15 ()

default: None
monitor_stock_2 ()

default: None
monitor_stock_3 ()

default: None
monitor_stock_4 ()

default: None
monitor_stock_5 ()

default: None
monitor_stock_6 ()

default: None
monitor_stock_7 ()

default: None
monitor_stock_8 ()

default: None
monitor_stock_9 ()

default: None

spectral

The Spectral datatypes. This brings together the scientific and framework methods that are associated with the Spectral datatypes.

tvb.datatypes.spectral.CoherenceSpectrum[source]

Result of a NodeCoherence Analysis.

traits on this class:

aggregation_functions ()

default: None
array_data ()

default: None
dimensions_labels ()

default: None
frequency (Frequency)

default: None
label_x ()

default: None
label_y ()

default: None
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
nfft (Data-points per block)
NOTE: must be a power of 2
default: 256
nr_dimensions ()

default: None
source (Source time-series)
Links to the time-series on which the node_coherence is applied.
default: None
title ()

default: None
tvb.datatypes.spectral.ComplexCoherenceSpectrum[source]

Result of a NodeComplexCoherence Analysis.

traits on this class:

aggregation_functions ()

default: None
array_data (Complex Coherence)
The complex coherence coefficients calculated from the cross spectrum. The imaginary values of this complex ndarray represent the imaginary coherence.
default: None
cross_spectrum (The cross spectrum)
A complex ndarray that contains the nodes x nodes cross spectrum for every frequency frequency and for every segment.
default: None
dimensions_labels ()

default: None
epoch_length (Epoch length)
The timeseries was segmented into equally sized blocks (overlapping if necessary), prior to the application of the FFT. The segement length determines the frequency resolution of the resulting spectra.
default: None
label_x ()

default: None
label_y ()

default: None
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
nr_dimensions ()

default: None
segment_length (Segment length)
The timeseries was segmented into equally sized blocks (overlapping if necessary), prior to the application of the FFT. The segement length determines the frequency resolution of the resulting spectra.
default: None
source (Source time-series)
Links to the time-series on which the node_coherence is applied.
default: None
title ()

default: None
windowing_function (Windowing function)
The windowing function applied to each time segment prior to application of the FFT.
default: None
tvb.datatypes.spectral.FourierSpectrum[source]

Result of a Fourier Analysis.

traits on this class:

aggregation_functions ()

default: None
amplitude (Amplitude)

default: None
array_data ()

default: None
average_power (Average Power)

default: None
dimensions_labels ()

default: None
label_x ()

default: None
label_y ()

default: None
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
normalised_average_power (Normalised Power)

default: None
nr_dimensions ()

default: None
phase (Phase)

default: None
power (Power)

default: None
segment_length (Segment length)
The timeseries was segmented into equally sized blocks (overlapping if necessary), prior to the application of the FFT. The segement length determines the frequency resolution of the resulting spectra.
default: None
source (Source time-series)
Links to the time-series on which the FFT is applied.
default: None
title ()

default: None
windowing_function (Windowing function)
The windowing function applied to each time segment prior to application of the FFT.
default: None
tvb.datatypes.spectral.WaveletCoefficients[source]

This class bundles all the elements of a Wavelet Analysis into a single object, including the input TimeSeries datatype and the output results as arrays (FloatArray)

traits on this class:

aggregation_functions ()

default: None
amplitude (Amplitude)

default: None
array_data ()

default: None
dimensions_labels ()

default: None
frequencies (Frequencies)
A vector that maps scales to frequencies.
default: None
label_x ()

default: None
label_y ()

default: None
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
mother (Mother wavelet)
A string specifying the type of mother wavelet to use, default is ‘morlet’.
default: morlet
normalisation (Normalisation type)

default: None
nr_dimensions ()

default: None
phase (Phase)

default: None
power (Power)

default: None
q_ratio (Q-ratio)

default: 5.0
sample_period (Sample period)

default: None
source (Source time-series)

default: None
title ()

default: None

structural

The Volume datatypes. This brings together the scientific and framework methods that are associated with the volume datatypes.

tvb.datatypes.structural.StructuralMRI[source]

Quantitative volumetric data recorded by means of Magnetic Resonance Imaging.

traits on this class:

aggregation_functions ()

default: None
array_data (contrast)

default: None
dimensions_labels ()

default: None
label_x ()

default: None
label_y ()

default: None
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
nr_dimensions ()

default: None
title ()

default: None
volume ()

default: None
weighting (MRI weighting)

default: None
class tvb.datatypes.structural.VolumetricDataMixin[source]

Bases: object

Provides subclasses with useful methods for volumes.

get_min_max_values()[source]

Retrieve the minimum and maximum values from the metadata. :returns: (minimum_value, maximum_value)

get_volume_slice(x_plane, y_plane, z_plane)[source]
get_volume_view(x_plane, y_plane, z_plane, **kwargs)[source]
write_data_slice(data)[source]

We are using here the same signature as in TS, just to allow easier parsing code. This is not a chunked write.

surfaces

Surface relates DataTypes. This brings together the scientific and framework methods that are associated with the surfaces data.

tvb.datatypes.surfaces.BrainSkull[source]

Brain - inner skull interface surface. traits on this class:

bi_hemispheric ()

default: None
edge_max_length ()

default: None
edge_mean_length ()

default: None
edge_min_length ()

default: None
geodesic_distance_matrix (Geodesic distance matrix)
A sparse matrix of truncated geodesic distances
default: None
hemisphere_mask (An array specifying if a vertex belongs to the right hemisphere)

default: None
number_of_split_slices ()

default: None
number_of_triangles (Number of triangles)
The number of triangles making up this surface.
default: None
number_of_vertices (Number of vertices)
The number of vertices making up this surface.
default: None
split_slices ()

default: None
split_triangles ()

default: None
surface_type ()

default: Brain Skull
triangle_normals (Triangle normal vectors)
An array of unit normal vectors for the surfaces triangles.
default: None
triangles (Triangles)
Array of indices into the vertices, specifying the triangles which define the surface.
default: None
valid_for_simulations ()

default: None
vertex_normals (Vertex normal vectors)
An array of unit normal vectors for the surfaces vertices.
default: None
vertices (Vertex positions)
An array specifying coordinates for the surface vertices.
default: None
zero_based_triangles ()

default: None
tvb.datatypes.surfaces.CorticalSurface[source]

Cortical or pial surface. traits on this class:

bi_hemispheric ()

default: None
edge_max_length ()

default: None
edge_mean_length ()

default: None
edge_min_length ()

default: None
geodesic_distance_matrix (Geodesic distance matrix)
A sparse matrix of truncated geodesic distances
default: None
hemisphere_mask (An array specifying if a vertex belongs to the right hemisphere)

default: None
number_of_split_slices ()

default: None
number_of_triangles (Number of triangles)
The number of triangles making up this surface.
default: None
number_of_vertices (Number of vertices)
The number of vertices making up this surface.
default: None
split_slices ()

default: None
split_triangles ()

default: None
surface_type ()

default: Cortical Surface
triangle_normals (Triangle normal vectors)
An array of unit normal vectors for the surfaces triangles.
default: None
triangles (Triangles)
Array of indices into the vertices, specifying the triangles which define the surface.
default: None
valid_for_simulations ()

default: None
vertex_normals (Vertex normal vectors)
An array of unit normal vectors for the surfaces vertices.
default: None
vertices (Vertex positions)
An array specifying coordinates for the surface vertices.
default: None
zero_based_triangles ()

default: None
tvb.datatypes.surfaces.EEGCap[source]

EEG cap surface. traits on this class:

bi_hemispheric ()

default: None
edge_max_length ()

default: None
edge_mean_length ()

default: None
edge_min_length ()

default: None
geodesic_distance_matrix (Geodesic distance matrix)
A sparse matrix of truncated geodesic distances
default: None
hemisphere_mask (An array specifying if a vertex belongs to the right hemisphere)

default: None
number_of_split_slices ()

default: None
number_of_triangles (Number of triangles)
The number of triangles making up this surface.
default: None
number_of_vertices (Number of vertices)
The number of vertices making up this surface.
default: None
split_slices ()

default: None
split_triangles ()

default: None
surface_type ()

default: EEG Cap
triangle_normals (Triangle normal vectors)
An array of unit normal vectors for the surfaces triangles.
default: None
triangles (Triangles)
Array of indices into the vertices, specifying the triangles which define the surface.
default: None
valid_for_simulations ()

default: None
vertex_normals (Vertex normal vectors)
An array of unit normal vectors for the surfaces vertices.
default: None
vertices (Vertex positions)
An array specifying coordinates for the surface vertices.
default: None
zero_based_triangles ()

default: None
tvb.datatypes.surfaces.FaceSurface[source]

Face surface. traits on this class:

bi_hemispheric ()

default: None
edge_max_length ()

default: None
edge_mean_length ()

default: None
edge_min_length ()

default: None
geodesic_distance_matrix (Geodesic distance matrix)
A sparse matrix of truncated geodesic distances
default: None
hemisphere_mask (An array specifying if a vertex belongs to the right hemisphere)

default: None
number_of_split_slices ()

default: None
number_of_triangles (Number of triangles)
The number of triangles making up this surface.
default: None
number_of_vertices (Number of vertices)
The number of vertices making up this surface.
default: None
split_slices ()

default: None
split_triangles ()

default: None
surface_type ()

default: Face
triangle_normals (Triangle normal vectors)
An array of unit normal vectors for the surfaces triangles.
default: None
triangles (Triangles)
Array of indices into the vertices, specifying the triangles which define the surface.
default: None
valid_for_simulations ()

default: None
vertex_normals (Vertex normal vectors)
An array of unit normal vectors for the surfaces vertices.
default: None
vertices (Vertex positions)
An array specifying coordinates for the surface vertices.
default: None
zero_based_triangles ()

default: None
tvb.datatypes.surfaces.OpenSurface[source]

Base class for open surfaces. traits on this class:

bi_hemispheric ()

default: None
edge_max_length ()

default: None
edge_mean_length ()

default: None
edge_min_length ()

default: None
geodesic_distance_matrix (Geodesic distance matrix)
A sparse matrix of truncated geodesic distances
default: None
hemisphere_mask (An array specifying if a vertex belongs to the right hemisphere)

default: None
number_of_split_slices ()

default: None
number_of_triangles (Number of triangles)
The number of triangles making up this surface.
default: None
number_of_vertices (Number of vertices)
The number of vertices making up this surface.
default: None
split_slices ()

default: None
split_triangles ()

default: None
surface_type ()

default: None
triangle_normals (Triangle normal vectors)
An array of unit normal vectors for the surfaces triangles.
default: None
triangles (Triangles)
Array of indices into the vertices, specifying the triangles which define the surface.
default: None
valid_for_simulations ()

default: None
vertex_normals (Vertex normal vectors)
An array of unit normal vectors for the surfaces vertices.
default: None
vertices (Vertex positions)
An array specifying coordinates for the surface vertices.
default: None
zero_based_triangles ()

default: None
tvb.datatypes.surfaces.SkinAir[source]

Skin - air interface surface. traits on this class:

bi_hemispheric ()

default: None
edge_max_length ()

default: None
edge_mean_length ()

default: None
edge_min_length ()

default: None
geodesic_distance_matrix (Geodesic distance matrix)
A sparse matrix of truncated geodesic distances
default: None
hemisphere_mask (An array specifying if a vertex belongs to the right hemisphere)

default: None
number_of_split_slices ()

default: None
number_of_triangles (Number of triangles)
The number of triangles making up this surface.
default: None
number_of_vertices (Number of vertices)
The number of vertices making up this surface.
default: None
split_slices ()

default: None
split_triangles ()

default: None
surface_type ()

default: Skin Air
triangle_normals (Triangle normal vectors)
An array of unit normal vectors for the surfaces triangles.
default: None
triangles (Triangles)
Array of indices into the vertices, specifying the triangles which define the surface.
default: None
valid_for_simulations ()

default: None
vertex_normals (Vertex normal vectors)
An array of unit normal vectors for the surfaces vertices.
default: None
vertices (Vertex positions)
An array specifying coordinates for the surface vertices.
default: None
zero_based_triangles ()

default: None
tvb.datatypes.surfaces.SkullSkin[source]

Outer-skull - scalp interface surface. traits on this class:

bi_hemispheric ()

default: None
edge_max_length ()

default: None
edge_mean_length ()

default: None
edge_min_length ()

default: None
geodesic_distance_matrix (Geodesic distance matrix)
A sparse matrix of truncated geodesic distances
default: None
hemisphere_mask (An array specifying if a vertex belongs to the right hemisphere)

default: None
number_of_split_slices ()

default: None
number_of_triangles (Number of triangles)
The number of triangles making up this surface.
default: None
number_of_vertices (Number of vertices)
The number of vertices making up this surface.
default: None
split_slices ()

default: None
split_triangles ()

default: None
surface_type ()

default: Skull Skin
triangle_normals (Triangle normal vectors)
An array of unit normal vectors for the surfaces triangles.
default: None
triangles (Triangles)
Array of indices into the vertices, specifying the triangles which define the surface.
default: None
valid_for_simulations ()

default: None
vertex_normals (Vertex normal vectors)
An array of unit normal vectors for the surfaces vertices.
default: None
vertices (Vertex positions)
An array specifying coordinates for the surface vertices.
default: None
zero_based_triangles ()

default: None
tvb.datatypes.surfaces.Surface[source]

A base class for other surfaces. traits on this class:

bi_hemispheric ()

default: None
edge_max_length ()

default: None
edge_mean_length ()

default: None
edge_min_length ()

default: None
geodesic_distance_matrix (Geodesic distance matrix)
A sparse matrix of truncated geodesic distances
default: None
hemisphere_mask (An array specifying if a vertex belongs to the right hemisphere)

default: None
number_of_split_slices ()

default: None
number_of_triangles (Number of triangles)
The number of triangles making up this surface.
default: None
number_of_vertices (Number of vertices)
The number of vertices making up this surface.
default: None
split_slices ()

default: None
split_triangles ()

default: None
surface_type ()

default: None
triangle_normals (Triangle normal vectors)
An array of unit normal vectors for the surfaces triangles.
default: None
triangles (Triangles)
Array of indices into the vertices, specifying the triangles which define the surface.
default: None
valid_for_simulations ()

default: None
vertex_normals (Vertex normal vectors)
An array of unit normal vectors for the surfaces vertices.
default: None
vertices (Vertex positions)
An array specifying coordinates for the surface vertices.
default: None
zero_based_triangles ()

default: None
class tvb.datatypes.surfaces.ValidationResult[source]

Bases: object

Used by surface validate methods to report non-fatal failed validations

add_warning(msg, data)[source]
merge(other)[source]
summary()[source]
tvb.datatypes.surfaces.WhiteMatterSurface[source]

White matter - gray matter interface surface. traits on this class:

bi_hemispheric ()

default: None
edge_max_length ()

default: None
edge_mean_length ()

default: None
edge_min_length ()

default: None
geodesic_distance_matrix (Geodesic distance matrix)
A sparse matrix of truncated geodesic distances
default: None
hemisphere_mask (An array specifying if a vertex belongs to the right hemisphere)

default: None
number_of_split_slices ()

default: None
number_of_triangles (Number of triangles)
The number of triangles making up this surface.
default: None
number_of_vertices (Number of vertices)
The number of vertices making up this surface.
default: None
split_slices ()

default: None
split_triangles ()

default: None
surface_type ()

default: White Matter
triangle_normals (Triangle normal vectors)
An array of unit normal vectors for the surfaces triangles.
default: None
triangles (Triangles)
Array of indices into the vertices, specifying the triangles which define the surface.
default: None
valid_for_simulations ()

default: None
vertex_normals (Vertex normal vectors)
An array of unit normal vectors for the surfaces vertices.
default: None
vertices (Vertex positions)
An array specifying coordinates for the surface vertices.
default: None
zero_based_triangles ()

default: None
tvb.datatypes.surfaces.center_vertices(vertices)[source]

Centres the vertices using means along axes. :param vertices: a numpy array of shape (n, 3) :returns: the centered array

tvb.datatypes.surfaces.make_surface(surface_type)[source]

Build a Surface instance, based on an input type :param surface_type: one of the supported surface types :return: Instance of the corresponding surface lass, or None

tvb.datatypes.surfaces.paths2url(datatype_entity, attribute_name, flatten=False, parameter=None, datatype_kwargs=None)[source]

Prepare a File System Path for passing into an URL.

temporal_correlations

The Temporal Correlation datatypes. This brings together the scientific and framework methods that are associated with the Temporal Correlation datatypes.

tvb.datatypes.temporal_correlations.CrossCorrelation[source]

Result of a CrossCorrelation Analysis.

traits on this class:

array_data ()

default: None
labels_ordering (Dimension Names)
List of strings representing names of each data dimension
default: [‘Offsets’, ‘Node’, ‘Node’, ‘State Variable’, ‘Mode’]
source (Source time-series)
Links to the time-series on which the cross_correlation is applied.
default: None
time (Temporal Offsets)

default: None

time_series

The TimeSeries datatypes. This brings together the scientific and framework methods that are associated with the time-series data.

tvb.datatypes.time_series.SensorsTSBase[source]

Add framework related functionality for TS Sensor classes

traits on this class:

data (Time-series data)
An array of time-series data, with a shape of [tpts, :], where ‘:’ represents 1 or more dimensions
default: None
has_surface_mapping ()

default: True
has_volume_mapping ()

default: False
labels_dimensions (Specific labels for each dimension for the data stored in this timeseries.)
A dictionary containing mappings of the form {‘dimension_name’ : [labels for this dimension] }
default: {}
labels_ordering (Dimension Names)
List of strings representing names of each data dimension
default: [‘Time’, ‘State Variable’, ‘Space’, ‘Mode’]
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
nr_dimensions (Number of dimension in timeseries)

default: 4
sample_period (Sample period)

default: 1.0
sample_period_unit (Sample Period Measure Unit)

default: ms
sample_rate (Sample rate)
The sample rate of the timeseries
default: None
start_time (Start Time:)

default: None
time (Time-series time)
An array of time values for the time-series, with a shape of [tpts,]. This is ‘time’ as returned by the simulator’s monitors.
default: None
title ()

default: None
tvb.datatypes.time_series.TimeSeries[source]

Base time-series dataType.

traits on this class:

data (Time-series data)
An array of time-series data, with a shape of [tpts, :], where ‘:’ represents 1 or more dimensions
default: None
has_surface_mapping ()

default: True
has_volume_mapping ()

default: False
labels_dimensions (Specific labels for each dimension for the data stored in this timeseries.)
A dictionary containing mappings of the form {‘dimension_name’ : [labels for this dimension] }
default: {}
labels_ordering (Dimension Names)
List of strings representing names of each data dimension
default: [‘Time’, ‘State Variable’, ‘Space’, ‘Mode’]
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
nr_dimensions (Number of dimension in timeseries)

default: 4
sample_period (Sample period)

default: 1.0
sample_period_unit (Sample Period Measure Unit)

default: ms
sample_rate (Sample rate)
The sample rate of the timeseries
default: None
start_time (Start Time:)

default: None
time (Time-series time)
An array of time values for the time-series, with a shape of [tpts,]. This is ‘time’ as returned by the simulator’s monitors.
default: None
title ()

default: None
tvb.datatypes.time_series.TimeSeriesEEG[source]

A time series associated with a set of EEG sensors. traits on this class:

data (Time-series data)
An array of time-series data, with a shape of [tpts, :], where ‘:’ represents 1 or more dimensions
default: None
has_surface_mapping ()

default: True
has_volume_mapping ()

default: False
labels_dimensions (Specific labels for each dimension for the data stored in this timeseries.)
A dictionary containing mappings of the form {‘dimension_name’ : [labels for this dimension] }
default: {}
labels_ordering ()

default: [‘Time’, ‘1’, ‘EEG Sensor’, ‘1’]
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
nr_dimensions (Number of dimension in timeseries)

default: 4
sample_period (Sample period)

default: 1.0
sample_period_unit (Sample Period Measure Unit)

default: ms
sample_rate (Sample rate)
The sample rate of the timeseries
default: None
sensors ()

default: None
start_time (Start Time:)

default: None
time (Time-series time)
An array of time values for the time-series, with a shape of [tpts,]. This is ‘time’ as returned by the simulator’s monitors.
default: None
title ()

default: None
tvb.datatypes.time_series.TimeSeriesMEG[source]

A time series associated with a set of MEG sensors. traits on this class:

data (Time-series data)
An array of time-series data, with a shape of [tpts, :], where ‘:’ represents 1 or more dimensions
default: None
has_surface_mapping ()

default: True
has_volume_mapping ()

default: False
labels_dimensions (Specific labels for each dimension for the data stored in this timeseries.)
A dictionary containing mappings of the form {‘dimension_name’ : [labels for this dimension] }
default: {}
labels_ordering ()

default: [‘Time’, ‘1’, ‘MEG Sensor’, ‘1’]
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
nr_dimensions (Number of dimension in timeseries)

default: 4
sample_period (Sample period)

default: 1.0
sample_period_unit (Sample Period Measure Unit)

default: ms
sample_rate (Sample rate)
The sample rate of the timeseries
default: None
sensors ()

default: None
start_time (Start Time:)

default: None
time (Time-series time)
An array of time values for the time-series, with a shape of [tpts,]. This is ‘time’ as returned by the simulator’s monitors.
default: None
title ()

default: None
tvb.datatypes.time_series.TimeSeriesRegion[source]

A time-series associated with the regions of a connectivity. traits on this class:

connectivity ()

default: None
data (Time-series data)
An array of time-series data, with a shape of [tpts, :], where ‘:’ represents 1 or more dimensions
default: None
has_surface_mapping ()

default: True
has_volume_mapping ()

default: False
labels_dimensions (Specific labels for each dimension for the data stored in this timeseries.)
A dictionary containing mappings of the form {‘dimension_name’ : [labels for this dimension] }
default: {}
labels_ordering ()

default: [‘Time’, ‘State Variable’, ‘Region’, ‘Mode’]
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
nr_dimensions (Number of dimension in timeseries)

default: 4
region_mapping ()

default: None
region_mapping_volume ()

default: None
sample_period (Sample period)

default: 1.0
sample_period_unit (Sample Period Measure Unit)

default: ms
sample_rate (Sample rate)
The sample rate of the timeseries
default: None
start_time (Start Time:)

default: None
time (Time-series time)
An array of time values for the time-series, with a shape of [tpts,]. This is ‘time’ as returned by the simulator’s monitors.
default: None
title ()

default: None
tvb.datatypes.time_series.TimeSeriesSEEG[source]

A time series associated with a set of Internal sensors. traits on this class:

data (Time-series data)
An array of time-series data, with a shape of [tpts, :], where ‘:’ represents 1 or more dimensions
default: None
has_surface_mapping ()

default: True
has_volume_mapping ()

default: False
labels_dimensions (Specific labels for each dimension for the data stored in this timeseries.)
A dictionary containing mappings of the form {‘dimension_name’ : [labels for this dimension] }
default: {}
labels_ordering ()

default: [‘Time’, ‘1’, ‘sEEG Sensor’, ‘1’]
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
nr_dimensions (Number of dimension in timeseries)

default: 4
sample_period (Sample period)

default: 1.0
sample_period_unit (Sample Period Measure Unit)

default: ms
sample_rate (Sample rate)
The sample rate of the timeseries
default: None
sensors ()

default: None
start_time (Start Time:)

default: None
time (Time-series time)
An array of time values for the time-series, with a shape of [tpts,]. This is ‘time’ as returned by the simulator’s monitors.
default: None
title ()

default: None
tvb.datatypes.time_series.TimeSeriesSurface[source]

A time-series associated with a Surface. traits on this class:

data (Time-series data)
An array of time-series data, with a shape of [tpts, :], where ‘:’ represents 1 or more dimensions
default: None
has_surface_mapping ()

default: True
has_volume_mapping ()

default: False
labels_dimensions (Specific labels for each dimension for the data stored in this timeseries.)
A dictionary containing mappings of the form {‘dimension_name’ : [labels for this dimension] }
default: {}
labels_ordering ()

default: [‘Time’, ‘State Variable’, ‘Vertex’, ‘Mode’]
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
nr_dimensions (Number of dimension in timeseries)

default: 4
sample_period (Sample period)

default: 1.0
sample_period_unit (Sample Period Measure Unit)

default: ms
sample_rate (Sample rate)
The sample rate of the timeseries
default: None
start_time (Start Time:)

default: None
surface ()

default: None
time (Time-series time)
An array of time values for the time-series, with a shape of [tpts,]. This is ‘time’ as returned by the simulator’s monitors.
default: None
title ()

default: None
tvb.datatypes.time_series.TimeSeriesVolume[source]

A time-series associated with a Volume. traits on this class:

data (Time-series data)
An array of time-series data, with a shape of [tpts, :], where ‘:’ represents 1 or more dimensions
default: None
has_surface_mapping ()

default: True
has_volume_mapping ()

default: False
labels_dimensions (Specific labels for each dimension for the data stored in this timeseries.)
A dictionary containing mappings of the form {‘dimension_name’ : [labels for this dimension] }
default: {}
labels_ordering ()

default: [‘Time’, ‘X’, ‘Y’, ‘Z’]
length_1d ()

default: None
length_2d ()

default: None
length_3d ()

default: None
length_4d ()

default: None
nr_dimensions (Number of dimension in timeseries)

default: 4
sample_period (Sample period)

default: 1.0
sample_period_unit (Sample Period Measure Unit)

default: ms
sample_rate (Sample rate)
The sample rate of the timeseries
default: None
start_time (Start Time:)

default: None
time (Time-series time)
An array of time values for the time-series, with a shape of [tpts,]. This is ‘time’ as returned by the simulator’s monitors.
default: None
title ()

default: None
volume ()

default: None
tvb.datatypes.time_series.prepare_time_slice(total_time_length, max_length=10000)[source]

Limit the time dimension when retrieving from TS. If total time length is greater than MAX, then retrieve only the last part of the TS

Parameters:
  • total_time_length – TS time dimension
  • max_length – limiting number of TS steps
Returns:

python slice

tracts

module docstring .. moduleauthor:: Mihai Andrei <mihai.andrei@codemart.ro>

tvb.datatypes.tracts.Tracts[source]

Datatype for results of diffusion imaging tractography. traits on this class:

region_volume_map (Region volume Mapping used to create the tract_region index)

default: None
tract_region (Tract region index)
An index used to find quickly all tract emerging from a region tract_region[i] is the region of the i’th tract. -1 represents the background
default: None
tract_start_idx (Tract starting indices)
Where is the first vertex of a tract in the vertex array
default: None
vertices (Vertex positions)
An array specifying coordinates for the tracts vertices.
default: None

volumes

The Volume datatypes. This brings together the scientific and framework methods that are associated with the volume datatypes.

tvb.datatypes.volumes.Volume[source]

Data defined on a regular grid in three dimensions.

traits on this class:

origin (Volume origin coordinates)

default: None
voxel_size (Voxel size)

default: None
voxel_unit (Voxel Measure Unit)

default: mm