visualizers Package

List here all Python modules where Visualization adapters are described. Listed modules will be introspected and DB filled.

annotations_viewer

class tvb.adapters.visualizers.annotations_viewer.ConnectivityAnnotationsView[source]

Bases: ABCSurfaceDisplayer

Given a Connectivity Matrix and a Surface data the viewer will display the matrix ‘inside’ the surface data. The surface is only displayed as a shadow.

get_form_class()[source]
get_required_memory_size(view_model: ConnectivityAnnotationsViewModel) int[source]

Abstract method to be implemented in each adapter. Should return the required memory for launching the adapter.

get_triangles_mapping(region_mapping_gid)[source]

:return Numpy array of length triangles and for each the region corresponding to one of its vertices.

launch(view_model: ConnectivityAnnotationsViewModel) dict[source]

To be implemented in each Adapter. Will contain the logic of the Adapter. Takes a ViewModel with data, dependency direction is: Adapter -> Form -> ViewModel Any returned DataType will be stored in DB, by the Framework.

Parameters:

view_model – the data model corresponding to the current adapter

tree_json(annotations_gid)[source]
Returns:

JSON to be rendered in a Tree of entities

class tvb.adapters.visualizers.annotations_viewer.ConnectivityAnnotationsViewForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.annotations_viewer.ConnectivityAnnotationsViewModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.annotations_viewer.ConnectivityAnnotationsViewModel]

Attributes declared

connectivity_index : tvb.adapters.visualizers.annotations_viewer.ConnectivityAnnotationsViewModel.connectivity_index = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

annotations_index : tvb.adapters.visualizers.annotations_viewer.ConnectivityAnnotationsViewModel.annotations_index = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

region_mapping_indextvb.adapters.visualizers.annotations_viewer.ConnectivityAnnotationsViewModel.region_mapping_index = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

A region map to identify us the Cortical Surface to display, as well as how the mapping from Connectivity to Cortex is done

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

annotations_index

Keep a GID but also link the type of DataType it should point to

connectivity_index

Keep a GID but also link the type of DataType it should point to

region_mapping_index

Keep a GID but also link the type of DataType it should point to

brain

class tvb.adapters.visualizers.brain.BrainViewer[source]

Bases: ABCSurfaceDisplayer

Interface between the 3D view of the Brain Cortical Surface and TVB framework. This viewer will build the required parameter dictionary that will be sent to the HTML / JS for further processing, having as end result a brain surface plus activity that will be displayed in 3D.

PAGE_SIZE = 500
compute_parameters(time_series, shell_surface=None)[source]

Create the required parameter dictionary for the HTML/JS viewer.

Return type:

dict

Raises:

Exception – when * number of measure points exceeds the maximum allowed * a Face object cannot be found in database

get_form_class()[source]
get_required_memory_size(view_model: BrainViewerModel) ndarray[source]

Assume one page doesn’t get ‘dumped’ in time and it is highly probably that two consecutive pages will be in the same time in memory.

launch(view_model: BrainViewerModel) dict[source]

Build visualizer’s page.

populate_surface_fields(time_series_index)[source]

To be overwritten for populating fields: one_to_one_map/connectivity/region_map/surface fields

read_data_page_split(time_series_gid, from_idx, to_idx, step=None, specific_slices=None)[source]
retrieve_measure_points_params(time_series)[source]

To be overwritten method, for retrieving the measurement points (region centers, EEG sensors).

class tvb.adapters.visualizers.brain.BrainViewerForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.brain.BrainViewerModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.brain.BrainViewerModel]

Attributes declared

time_series : tvb.adapters.visualizers.brain.BrainViewerModel.time_series = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

shell_surfacetvb.adapters.visualizers.brain.BrainViewerModel.shell_surface = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

Surface to be displayed semi-transparently as overlay, for visual navigation purposes only.

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

shell_surface

Keep a GID but also link the type of DataType it should point to

time_series

Keep a GID but also link the type of DataType it should point to

class tvb.adapters.visualizers.brain.DualBrainViewer[source]

Bases: BrainViewer

Visualizer merging Brain 3D display and EEG lines display.

get_form_class()[source]
launch(view_model: DualBrainViewerModel) dict[source]

Build visualizer’s page.

populate_surface_fields(time_series_index)[source]

Prepares the urls from which the client may read the data needed for drawing the surface.

retrieve_measure_points_params(time_series)[source]

To be overwritten method, for retrieving the measurement points (region centers, EEG sensors).

sensors_to_surface(sensors_gid, surface_to_map_gid)[source]
class tvb.adapters.visualizers.brain.DualBrainViewerForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.brain.DualBrainViewerModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.brain.DualBrainViewerModel]

Attributes declared

time_series : tvb.adapters.visualizers.brain.DualBrainViewerModel.time_series = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

projection_surfacetvb.adapters.visualizers.brain.DualBrainViewerModel.projection_surface = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

A surface on which to project the results. When missing, the first EEGCap is taken. This parameter is ignored when InternalSensors measures.

shell_surfacetvb.adapters.visualizers.brain.DualBrainViewerModel.shell_surface = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

Wrapping surface over the internal sensors, to be displayed semi-transparently, for visual purposes only.

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

projection_surface

Keep a GID but also link the type of DataType it should point to

shell_surface

Keep a GID but also link the type of DataType it should point to

time_series

Keep a GID but also link the type of DataType it should point to

complex_imaginary_coherence

class tvb.adapters.visualizers.complex_imaginary_coherence.ImaginaryCoherenceDisplay[source]

Bases: ABCDisplayer

This viewer takes as inputs a result from complex coherence analysis, and returns required parameters for a MatplotLib representation.

get_form_class()[source]
get_required_memory_size(view_model: ImaginaryCoherenceDisplayModel) ndarray[source]

Return the required memory to run this algorithm.

launch(view_model: ImaginaryCoherenceDisplayModel) dict[source]

Draw interactive display.

class tvb.adapters.visualizers.complex_imaginary_coherence.ImaginaryCoherenceDisplayForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.complex_imaginary_coherence.ImaginaryCoherenceDisplayModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.complex_imaginary_coherence.ImaginaryCoherenceDisplayModel]

Attributes declared

input_datatvb.adapters.visualizers.complex_imaginary_coherence.ImaginaryCoherenceDisplayModel.input_data = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

Imaginary Coherence Analysis to display

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

input_data

Keep a GID but also link the type of DataType it should point to

connectivity

class tvb.adapters.visualizers.connectivity.Connectivity2DViewer[source]

Bases: object

Having as inputs a Connectivity matrix(required) and two arrays that represent the colors and shapes of the nodes from the matrix(optional) the viewer will build the required parameter dictionary that will be sent to the HTML/JS 2D representation of the connectivity matrix.

DEFAULT_COLOR = '#d73027'
MAX_RAY = 40
MAX_WEIGHT_VALUE = 0.6
MIN_RAY = 4
MIN_WEIGHT_VALUE = 0.0
OTHER_COLOR = '#1a9850'
compute_parameters(input_data, colors=None, rays=None, step=None)[source]

Build the required HTML response to be displayed.

Raises:

LaunchException – when number of regions in input_data is less than 3

compute_preview_parameters(input_data, width, height, colors=None, rays=None, step=None)[source]

Build the required HTML response to be displayed in the BURST preview iFrame.

point2json(node_lbl, x_coord, y_coord, adjacencies, angle, shape_dimension, shape_color)[source]

Method used for creating a valid JSON for a certain point.

class tvb.adapters.visualizers.connectivity.Connectivity3DViewer[source]

Bases: object

Behavior for the HTML/JS 3D representation of the connectivity matrix.

static compute_parameters(input_data, colors=None, rays=None)[source]

Having as inputs a Connectivity matrix(required) and two arrays that represent the rays and colors of the nodes from the matrix(optional) this method will build the required parameter dictionary that will be sent to the HTML/JS 3D representation of the connectivity matrix.

class tvb.adapters.visualizers.connectivity.ConnectivityViewer[source]

Bases: ABCSpaceDisplayer

Given a Connectivity Matrix and a Surface data the viewer will display the matrix ‘inside’ the surface data. The surface is only displayed as a shadow.

static get_connectivity_parameters(input_connectivity, project_name, op_id)[source]

Returns a dictionary which contains all the needed data for drawing a connectivity.

get_form_class()[source]
get_required_memory_size(view_model: ConnectivityViewerModel) int[source]

Return the required memory to run this algorithm.

launch(view_model: ConnectivityViewerModel) dict[source]

Given the input connectivity data and the surface data, build the HTML response to be displayed.

class tvb.adapters.visualizers.connectivity.ConnectivityViewerForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.connectivity.ConnectivityViewerModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.connectivity.ConnectivityViewerModel]

Attributes meaning:

connectivity: GID towards the Connectivity object which will be displayed surface_data: if provided, it is displayed as a shadow to give an idea of the connectivity position

relative to the full brain cortical surface

colors: used to establish a colormap for the nodes displayed in 2D Connectivity viewers rays: used to establish the size of the spheres representing each node in 3D Nodes viewer step: a threshold applied to the 2D Connectivity Viewers to differentiate 2 types of nodes the ones

with a value greater that this will be displayed as red discs, instead of yellow

Attributes declared

connectivity : tvb.adapters.visualizers.connectivity.ConnectivityViewerModel.connectivity = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

surface_datatvb.adapters.visualizers.connectivity.ConnectivityViewerModel.surface_data = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

The Brain Surface is used to give you an idea of the connectivity position relative to the full brain cortical surface. This surface will be displayed as a shadow (only used in 3D Edges tab).

steptvb.adapters.visualizers.connectivity.ConnectivityViewerModel.step = Attr(field_type=<class ‘float’>, default=None, required=False)

All nodes with a value greater or equal (>=) than this threshold will be displayed as red discs, otherwise (<) they will be yellow. (This applies to 2D Connectivity tabs and the threshold will depend on the metric used to set the Node Color)

colorstvb.adapters.visualizers.connectivity.ConnectivityViewerModel.colors = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

A ConnectivityMeasure DataType that establishes a colormap for the nodes displayed in the 2D Connectivity tabs.

raystvb.adapters.visualizers.connectivity.ConnectivityViewerModel.rays = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

A ConnectivityMeasure datatype used to establish the size of the spheres representing each node. (It only applies to 3D Nodes tab).

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

colors

Keep a GID but also link the type of DataType it should point to

connectivity

Keep a GID but also link the type of DataType it should point to

rays

Keep a GID but also link the type of DataType it should point to

step

An Attr declares the following about the attribute it describes: * the type * a default value shared by all instances * if the value might be missing * documentation It will resolve to attributes on the instance.

surface_data

Keep a GID but also link the type of DataType it should point to

connectivity_edge_bundle

A Javascript displayer for connectivity, using hierarchical edge bundle diagrams from d3.js.

class tvb.adapters.visualizers.connectivity_edge_bundle.ConnectivityEdgeBundle[source]

Bases: ABCDisplayer

get_form_class()[source]
get_required_memory_size(**kwargs)[source]

Return required memory.

launch(view_model)[source]

Construct data for visualization and launch it.

class tvb.adapters.visualizers.connectivity_edge_bundle.ConnectivityEdgeBundleForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.connectivity_edge_bundle.ConnectivityEdgeBundleModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.connectivity_edge_bundle.ConnectivityEdgeBundleModel]

Attributes declared

connectivity : tvb.adapters.visualizers.connectivity_edge_bundle.ConnectivityEdgeBundleModel.connectivity = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

connectivity

Keep a GID but also link the type of DataType it should point to

cross_coherence

A displayer for the cross coherence of a time series.

class tvb.adapters.visualizers.cross_coherence.CrossCoherenceVisualizer[source]

Bases: ABCMappedArraySVGVisualizer

get_form_class()[source]
launch(view_model: CrossCoherenceVisualizerModel) dict[source]

Construct data for visualization and launch it.

class tvb.adapters.visualizers.cross_coherence.CrossCoherenceVisualizerForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.cross_coherence.CrossCoherenceVisualizerModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.cross_coherence.CrossCoherenceVisualizerModel]

Attributes declared

datatype : tvb.adapters.visualizers.cross_coherence.CrossCoherenceVisualizerModel.datatype = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

datatype

Keep a GID but also link the type of DataType it should point to

cross_correlation

A visualizer for cross correlation.

class tvb.adapters.visualizers.cross_correlation.CrossCorrelationVisualizer[source]

Bases: ABCMappedArraySVGVisualizer

get_form_class()[source]
launch(view_model: CrossCorrelationVisualizerModel) dict[source]

Construct data for visualization and launch it.

class tvb.adapters.visualizers.cross_correlation.CrossCorrelationVisualizerForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.cross_correlation.CrossCorrelationVisualizerModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.cross_correlation.CrossCorrelationVisualizerModel]

Attributes declared

datatype : tvb.adapters.visualizers.cross_correlation.CrossCorrelationVisualizerModel.datatype = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

datatype

Keep a GID but also link the type of DataType it should point to

eeg_monitor

class tvb.adapters.visualizers.eeg_monitor.EegMonitor[source]

Bases: ABCSpaceDisplayer

This viewer takes as inputs at least one ArrayWrapper and at most 3 ArrayWrappers, and returns the needed parameters for a 2D representation of the values from these arrays, in EEG form. So far arrays of at most 3 dimensions are supported.

compute_parameters(input_data, data_2=None, data_3=None, is_preview=False, is_extended_view=False, selected_dimensions=None)[source]

Start the JS visualizer, similar to EEG-lab

Parameters:
  • is_preview – Boolean True wne shown on Burst page

  • selected_dimensions – from GUI int

  • is_extended_view – Boolean when to display as dual-viewer

  • input_data (TimeSeriesEEG) – Time series to display

  • data_2 – additional input data

  • data_3 – additional input data

Returns:

the needed parameters for a 2D representation

Return type:

dict

Raises:

LaunchException – when at least two input data parameters are provided and they sample periods differ

compute_required_info(list_of_timeseries)[source]

Compute average difference between Max and Min.

current_page = 0
get_form_class()[source]
get_required_memory_size(view_model: EegMonitorModel) int[source]

Return the required memory to run this algorithm.

has_nan = False
launch(view_model: EegMonitorModel) dict[source]

Compute visualizer’s page

page_size = 4000
preview_page_size = 250
class tvb.adapters.visualizers.eeg_monitor.EegMonitorForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.eeg_monitor.EegMonitorModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.eeg_monitor.EegMonitorModel]

Attributes declared

input_datatvb.adapters.visualizers.eeg_monitor.EegMonitorModel.input_data = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

Time series to display.

data_2tvb.adapters.visualizers.eeg_monitor.EegMonitorModel.data_2 = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

Time series to display.

data_3tvb.adapters.visualizers.eeg_monitor.EegMonitorModel.data_3 = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

Time series to display.

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

data_2

Keep a GID but also link the type of DataType it should point to

data_3

Keep a GID but also link the type of DataType it should point to

input_data

Keep a GID but also link the type of DataType it should point to

fourier_spectrum

class tvb.adapters.visualizers.fourier_spectrum.FourierSpectrumDisplay[source]

Bases: ABCDisplayer

This viewer takes as inputs a result form FFT analysis, and returns required parameters for a MatplotLib representation.

get_form_class()[source]
get_required_memory_size(view_model: FourierSpectrumModel) dict[source]

Return the required memory to run this algorithm.

launch(view_model: FourierSpectrumModel) dict[source]

To be implemented in each Adapter. Will contain the logic of the Adapter. Takes a ViewModel with data, dependency direction is: Adapter -> Form -> ViewModel Any returned DataType will be stored in DB, by the Framework.

Parameters:

view_model – the data model corresponding to the current adapter

class tvb.adapters.visualizers.fourier_spectrum.FourierSpectrumForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.fourier_spectrum.FourierSpectrumModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.fourier_spectrum.FourierSpectrumModel]

Attributes declared

input_datatvb.adapters.visualizers.fourier_spectrum.FourierSpectrumModel.input_data = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

Fourier Analysis to display

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

input_data

Keep a GID but also link the type of DataType it should point to

histogram

class tvb.adapters.visualizers.histogram.HistogramViewer[source]

Bases: ABCDisplayer

The viewer takes as input a result DataType as computed by BCT analyzers.

static gather_params_dict(labels_list, values_list, title)[source]
get_form_class()[source]
get_required_memory_size(view_model: HistogramViewerModel) ndarray[source]

Return the required memory to run this algorithm.

launch(view_model: HistogramViewerModel) dict[source]

Prepare input data for display.

Parameters:

input_data (ConnectivityMeasureIndex) – A BCT computed measure for a Connectivity

prepare_parameters(connectivity_measure_gid)[source]

Prepare all required parameters for a launch.

class tvb.adapters.visualizers.histogram.HistogramViewerForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.histogram.HistogramViewerModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.histogram.HistogramViewerModel]

Attributes declared

input_datatvb.adapters.visualizers.histogram.HistogramViewerModel.input_data = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

A BCT computed measure for a Connectivity

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

input_data

Keep a GID but also link the type of DataType it should point to

ica

A matrix visualizer for the Independent Component Analysis. It displays the mixing matrix of size n_features x n_components

class tvb.adapters.visualizers.ica.ICA[source]

Bases: ABCMappedArraySVGVisualizer

get_form_class()[source]
launch(view_model: ICAModel) dict[source]

Construct data for visualization and launch it.

class tvb.adapters.visualizers.ica.ICAForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.ica.ICAModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.ica.ICAModel]

Attributes declared

datatype : tvb.adapters.visualizers.ica.ICAModel.datatype = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

i_svar : tvb.adapters.visualizers.ica.ICAModel.i_svar = Attr(field_type=<class ‘int’>, default=0, required=True)

i_mode : tvb.adapters.visualizers.ica.ICAModel.i_mode = Attr(field_type=<class ‘int’>, default=0, required=True)

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

datatype

Keep a GID but also link the type of DataType it should point to

i_mode

An Attr declares the following about the attribute it describes: * the type * a default value shared by all instances * if the value might be missing * documentation It will resolve to attributes on the instance.

i_svar

An Attr declares the following about the attribute it describes: * the type * a default value shared by all instances * if the value might be missing * documentation It will resolve to attributes on the instance.

local_connectivity_view

class tvb.adapters.visualizers.local_connectivity_view.LocalConnectivityViewer[source]

Bases: ABCDisplayer

Local connectivity visualizer

get_form_class()[source]
get_required_memory_size()[source]

Abstract method to be implemented in each adapter. Should return the required memory for launching the adapter.

launch(view_model)[source]

To be implemented in each Adapter. Will contain the logic of the Adapter. Takes a ViewModel with data, dependency direction is: Adapter -> Form -> ViewModel Any returned DataType will be stored in DB, by the Framework.

Parameters:

view_model – the data model corresponding to the current adapter

class tvb.adapters.visualizers.local_connectivity_view.LocalConnectivityViewerForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.local_connectivity_view.LocalConnectivityViewerModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.local_connectivity_view.LocalConnectivityViewerModel]

Attributes declared

local_conn : tvb.adapters.visualizers.local_connectivity_view.LocalConnectivityViewerModel.local_conn = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

local_conn

Keep a GID but also link the type of DataType it should point to

matrix_viewer

class tvb.adapters.visualizers.matrix_viewer.ABCMappedArraySVGVisualizer[source]

Bases: ABCSpaceDisplayer

To be inherited by visualizers for DataTypeMatrix subclasses

compute_2d_view(dtm_index: DataTypeMatrix, slice_s: str)[source]

Create a 2d view of the matrix using the suggested slice If the given slice is invalid or fails to produce a 2d array the default is used which selects the first 2 dimensions. If the matrix is complex the real part is shown :param dtm_index: main input. It can have more then 2D :param slice_s: a string representation of a slice :return: (a 2d array, the slice used to make it, is_default_returned)

compute_params()[source]
static compute_raw_matrix_params(matrix)[source]

Serializes matrix data, shape and stride metadata to json

extract_source_labels(datatype_matrix: DataTypeMatrix) list[source]
get_required_memory_size(view_model: MatrixVisualizerModel) float[source]

Return required memory.

class tvb.adapters.visualizers.matrix_viewer.MappedArrayVisualizer[source]

Bases: ABCMappedArraySVGVisualizer

get_form_class()[source]
launch(view_model: MatrixVisualizerModel) dict[source]

To be implemented in each Adapter. Will contain the logic of the Adapter. Takes a ViewModel with data, dependency direction is: Adapter -> Form -> ViewModel Any returned DataType will be stored in DB, by the Framework.

Parameters:

view_model – the data model corresponding to the current adapter

class tvb.adapters.visualizers.matrix_viewer.MatrixVisualizerForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.matrix_viewer.MatrixVisualizerModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.matrix_viewer.MatrixVisualizerModel]

Attributes declared

datatype : tvb.adapters.visualizers.matrix_viewer.MatrixVisualizerModel.datatype = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

slice : tvb.adapters.visualizers.matrix_viewer.MatrixVisualizerModel.slice = Attr(field_type=<class ‘str’>, default=None, required=False)

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

datatype

Keep a GID but also link the type of DataType it should point to

slice

An Attr declares the following about the attribute it describes: * the type * a default value shared by all instances * if the value might be missing * documentation It will resolve to attributes on the instance.

pca

A displayer for the principal component analysis.

class tvb.adapters.visualizers.pca.PCA[source]

Bases: ABCSpaceDisplayer

get_form_class()[source]
get_required_memory_size(view_model: PCAModel) int[source]

Return required memory. Here, it’s unknown/insignificant.

launch(view_model: PCAModel) dict[source]

Construct data for visualization and launch it.

class tvb.adapters.visualizers.pca.PCAForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.pca.PCAModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.pca.PCAModel]

Attributes declared

pca : tvb.adapters.visualizers.pca.PCAModel.pca = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

pca

Keep a GID but also link the type of DataType it should point to

pearson_cross_correlation

class tvb.adapters.visualizers.pearson_cross_correlation.PearsonCorrelationCoefficientVisualizer[source]

Bases: ABCMappedArraySVGVisualizer

Viewer for Pearson CorrelationCoefficients. Very similar to the CrossCorrelationVisualizer - this one done with Matplotlib

get_form_class()[source]
launch(view_model)[source]

Construct data for visualization and launch it.

class tvb.adapters.visualizers.pearson_cross_correlation.PearsonCorrelationCoefficientVisualizerForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.pearson_cross_correlation.PearsonCorrelationCoefficientVisualizerModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.pearson_cross_correlation.PearsonCorrelationCoefficientVisualizerModel]

Attributes declared

datatype : tvb.adapters.visualizers.pearson_cross_correlation.PearsonCorrelationCoefficientVisualizerModel.datatype = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

datatype

Keep a GID but also link the type of DataType it should point to

pearson_edge_bundle

class tvb.adapters.visualizers.pearson_edge_bundle.PearsonEdgeBundle[source]

Bases: ABCSpaceDisplayer

Viewer for Pearson CorrelationCoefficients. Very similar to the CrossCorrelationVisualizer - this one done with Matplotlib

get_form_class()[source]
get_required_memory_size(view_model: PearsonCorrelationCoefficientVisualizerModel) ndarray[source]

Return required memory.

launch(view_model: PearsonCorrelationCoefficientVisualizerModel) dict[source]

Construct data for visualization and launch it.

phase_plane_interactive

class tvb.adapters.visualizers.phase_plane_interactive.PhaseLineD3(model, integrator)[source]

Bases: _PhaseSpace

compute_phase_plane()[source]
update_axis(mode, svx, x_range)[source]
class tvb.adapters.visualizers.phase_plane_interactive.PhasePlane(model, integrator)[source]

Bases: _PhaseSpace

Responsible with computing phase space slices and trajectories. A collection of math-y utilities it is view independent (holds no state related to views).

class tvb.adapters.visualizers.phase_plane_interactive.PhasePlaneD3(model, integrator)[source]

Bases: PhasePlane

Provides data for a d3 client

compute_phase_plane()[source]
Returns:

A json representation of the phase plane.

trajectories(starting_points, n_steps=512)[source]
Parameters:

starting_points – A list of starting points represented as dicts of state_var_name to value

Returns:

a tuple of trajectories and signals

update_axis(mode, svx, svy, x_range, y_range, state_vars)[source]
update_integrator_clamping()[source]
tvb.adapters.visualizers.phase_plane_interactive.nullcline(x, y, z)[source]
tvb.adapters.visualizers.phase_plane_interactive.phase_space_d3(model, integrator)[source]
Returns:

A phase plane or a phase line depending on the dimensionality of the model

pse

Data for Parameter Space Exploration view will be defined here. The purpose of this entities is to be used in Jinja2 UI, or for populating visualizer.

class tvb.adapters.visualizers.pse.DiscretePSE(datatype_group_gid, color_metric, size_metric, back_page)[source]

Bases: EnhancedDictionary

prepare_individual_jsons()[source]

Apply JSON.dumps on all attributes which can not be passes as they are towards UI.

class tvb.adapters.visualizers.pse.PSEDiscreteGroupModel(datatype_group_gid, color_metric, size_metric, back_page)[source]

Bases: PSEGroupModel

determine_default_metrics()[source]
fill_pse_context()[source]
prepare_display_data()[source]
class tvb.adapters.visualizers.pse.PSEGroupModel(datatype_group_gid)[source]

Bases: object

get_all_metrics()[source]
get_all_node_info()[source]
get_available_metric_keys()[source]
get_range1_key()[source]
get_range2_key()[source]
parse_pse_data_for_display()[source]
property range1_values
property range2_values
class tvb.adapters.visualizers.pse.PSEModel(operation)[source]

Bases: object

determine_operation_result()[source]
get_range1_label()[source]
get_range2_label()[source]
is_range1_float()[source]
is_range2_float()[source]
prepare_node_info()[source]

Build a dictionary with all the required information to be displayed for a given node.

pse_discrete

class tvb.adapters.visualizers.pse_discrete.DiscretePSEAdapter[source]

Bases: ABCDisplayer

Visualization adapter for Parameter Space Exploration. Will be used as a generic visualizer, accessible when input entity is DataTypeGroup. Will also be used in Burst as a supplementary navigation layer.

get_form_class()[source]
get_required_memory_size(view_model: DiscretePSEAdapterModel) int[source]

Return the required memory to run this algorithm.

launch(view_model: DiscretePSEAdapterModel) dict[source]

Launch the visualizer.

static prepare_parameters(datatype_group_gid, back_page, color_metric=None, size_metric=None)[source]
class tvb.adapters.visualizers.pse_discrete.DiscretePSEAdapterForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.pse_discrete.DiscretePSEAdapterModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.pse_discrete.DiscretePSEAdapterModel]

Attributes declared

datatype_group : tvb.adapters.visualizers.pse_discrete.DiscretePSEAdapterModel.datatype_group = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

datatype_group

Keep a GID but also link the type of DataType it should point to

pse_isocline

class tvb.adapters.visualizers.pse_isocline.IsoclinePSEAdapter[source]

Bases: ABCDisplayer

Visualization adapter for Parameter Space Exploration. Will be used as a generic visualizer, accessible when input entity is DataTypeGroup. Will also be used in Burst as a supplementary navigation layer.

burst_preview(view_model: IsoclinePSEAdapterModel) dict[source]

Generate the preview for the burst page.

get_form_class()[source]
get_metric_matrix(datatype_group_gid, selected_metric=None)[source]
get_required_memory_size(view_model: IsoclinePSEAdapterModel) int[source]

Return the required memory to run this algorithm.

launch(view_model)[source]

To be implemented in each Adapter. Will contain the logic of the Adapter. Takes a ViewModel with data, dependency direction is: Adapter -> Form -> ViewModel Any returned DataType will be stored in DB, by the Framework.

Parameters:

view_model – the data model corresponding to the current adapter

static prepare_node_data(datatype_group_gid)[source]
class tvb.adapters.visualizers.pse_isocline.IsoclinePSEAdapterForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.pse_isocline.IsoclinePSEAdapterModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.pse_isocline.IsoclinePSEAdapterModel]

Attributes declared

datatype_group : tvb.adapters.visualizers.pse_isocline.IsoclinePSEAdapterModel.datatype_group = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

datatype_group

Keep a GID but also link the type of DataType it should point to

class tvb.adapters.visualizers.pse_isocline.PSEIsoGroupModel(datatype_group_gid)[source]

Bases: PSEGroupModel

get_all_node_info()[source]
parse_pse_data_for_display()[source]

region_volume_mapping

Backend-side for Visualizers that display measures on regions in the brain volume.

class tvb.adapters.visualizers.region_volume_mapping.BaseVolumeVisualizerForm[source]

Bases: ABCAdapterForm

class tvb.adapters.visualizers.region_volume_mapping.BaseVolumeVisualizerModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.region_volume_mapping.BaseVolumeVisualizerModel]

Attributes declared

background : tvb.adapters.visualizers.region_volume_mapping.BaseVolumeVisualizerModel.background = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

background

Keep a GID but also link the type of DataType it should point to

class tvb.adapters.visualizers.region_volume_mapping.ConnectivityMeasureVolumeVisualizer[source]

Bases: _MappedArrayVolumeBase

get_form_class()[source]
launch(view_model: ConnectivityMeasureVolumeVisualizerModel) dict[source]

To be implemented in each Adapter. Will contain the logic of the Adapter. Takes a ViewModel with data, dependency direction is: Adapter -> Form -> ViewModel Any returned DataType will be stored in DB, by the Framework.

Parameters:

view_model – the data model corresponding to the current adapter

class tvb.adapters.visualizers.region_volume_mapping.ConnectivityMeasureVolumeVisualizerForm[source]

Bases: BaseVolumeVisualizerForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.region_volume_mapping.ConnectivityMeasureVolumeVisualizerModel(**kwargs)[source]

Bases: BaseVolumeVisualizerModel

Traited class [tvb.adapters.visualizers.region_volume_mapping.ConnectivityMeasureVolumeVisualizerModel]

Attributes declared

connectivity_measuretvb.adapters.visualizers.region_volume_mapping.ConnectivityMeasureVolumeVisualizerModel.connectivity_measure = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

A connectivity measure

region_mapping_volume : tvb.adapters.visualizers.region_volume_mapping.ConnectivityMeasureVolumeVisualizerModel.region_mapping_volume = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

background : tvb.adapters.visualizers.region_volume_mapping.BaseVolumeVisualizerModel.background = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

connectivity_measure

Keep a GID but also link the type of DataType it should point to

region_mapping_volume

Keep a GID but also link the type of DataType it should point to

class tvb.adapters.visualizers.region_volume_mapping.MappedArrayVolumeVisualizer[source]

Bases: _MappedArrayVolumeBase

This is a generic mapped array visualizer on a region volume. To view a multidimensional array one has to give this viewer a slice.

get_form_class()[source]
launch(view_model: VolumeVisualizerModel) dict[source]

To be implemented in each Adapter. Will contain the logic of the Adapter. Takes a ViewModel with data, dependency direction is: Adapter -> Form -> ViewModel Any returned DataType will be stored in DB, by the Framework.

Parameters:

view_model – the data model corresponding to the current adapter

class tvb.adapters.visualizers.region_volume_mapping.MriVolumeVisualizer[source]

Bases: _MappedArrayVolumeBase

get_form_class()[source]
get_required_memory_size(view_model: BaseVolumeVisualizerModel) int[source]

Abstract method to be implemented in each adapter. Should return the required memory for launching the adapter.

launch(view_model: BaseVolumeVisualizerModel) dict[source]

To be implemented in each Adapter. Will contain the logic of the Adapter. Takes a ViewModel with data, dependency direction is: Adapter -> Form -> ViewModel Any returned DataType will be stored in DB, by the Framework.

Parameters:

view_model – the data model corresponding to the current adapter

class tvb.adapters.visualizers.region_volume_mapping.MriVolumeVisualizerForm[source]

Bases: BaseVolumeVisualizerForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.region_volume_mapping.RegionVolumeMappingVisualiser[source]

Bases: _MappedArrayVolumeBase

get_form_class()[source]
launch(view_model: RegionVolumeMappingVisualiserModel) dict[source]

To be implemented in each Adapter. Will contain the logic of the Adapter. Takes a ViewModel with data, dependency direction is: Adapter -> Form -> ViewModel Any returned DataType will be stored in DB, by the Framework.

Parameters:

view_model – the data model corresponding to the current adapter

class tvb.adapters.visualizers.region_volume_mapping.RegionVolumeMappingVisualiserForm[source]

Bases: BaseVolumeVisualizerForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.region_volume_mapping.RegionVolumeMappingVisualiserModel(**kwargs)[source]

Bases: BaseVolumeVisualizerModel

Traited class [tvb.adapters.visualizers.region_volume_mapping.RegionVolumeMappingVisualiserModel]

Attributes declared

region_mapping_volume : tvb.adapters.visualizers.region_volume_mapping.RegionVolumeMappingVisualiserModel.region_mapping_volume = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

connectivity_measuretvb.adapters.visualizers.region_volume_mapping.RegionVolumeMappingVisualiserModel.connectivity_measure = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

A connectivity measure

background : tvb.adapters.visualizers.region_volume_mapping.BaseVolumeVisualizerModel.background = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

connectivity_measure

Keep a GID but also link the type of DataType it should point to

region_mapping_volume

Keep a GID but also link the type of DataType it should point to

class tvb.adapters.visualizers.region_volume_mapping.VolumeVisualizerForm[source]

Bases: BaseVolumeVisualizerForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.region_volume_mapping.VolumeVisualizerModel(**kwargs)[source]

Bases: BaseVolumeVisualizerModel

Traited class [tvb.adapters.visualizers.region_volume_mapping.VolumeVisualizerModel]

Attributes declared

measuretvb.adapters.visualizers.region_volume_mapping.VolumeVisualizerModel.measure = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

A measure to view on anatomy

region_mapping_volume : tvb.adapters.visualizers.region_volume_mapping.VolumeVisualizerModel.region_mapping_volume = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

data_slice : tvb.adapters.visualizers.region_volume_mapping.VolumeVisualizerModel.data_slice = Attr(field_type=<class ‘str’>, default=None, required=False)

background : tvb.adapters.visualizers.region_volume_mapping.BaseVolumeVisualizerModel.background = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

data_slice

An Attr declares the following about the attribute it describes: * the type * a default value shared by all instances * if the value might be missing * documentation It will resolve to attributes on the instance.

measure

Keep a GID but also link the type of DataType it should point to

region_mapping_volume

Keep a GID but also link the type of DataType it should point to

sensors

class tvb.adapters.visualizers.sensors.SensorsViewer[source]

Bases: ABCDisplayer

Sensor visualizer - for visual inspecting of TVB Sensors DataTypes.

get_form_class()[source]
get_required_memory_size()[source]

Abstract method to be implemented in each adapter. Should return the required memory for launching the adapter.

launch(view_model: SensorsViewerModel) dict[source]

Prepare visualizer parameters.

We support viewing all sensor types through a single viewer, so that a user doesn’t need to go back to the data-page, for loading a different type of sensor.

sensors_to_surface(sensors_gid, surface_to_map_gid)[source]
class tvb.adapters.visualizers.sensors.SensorsViewerForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.sensors.SensorsViewerModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.sensors.SensorsViewerModel]

Attributes declared

sensorstvb.adapters.visualizers.sensors.SensorsViewerModel.sensors = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

Internals sensors to view

projection_surfacetvb.adapters.visualizers.sensors.SensorsViewerModel.projection_surface = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

A surface on which to project the results. When missing, the first EEGCap is taken. This parameter is ignored when InternalSensors are inspected

shell_surfacetvb.adapters.visualizers.sensors.SensorsViewerModel.shell_surface = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

Wrapping surface over the internal sensors, to be displayed semi-transparently, for visual purposes only.

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

projection_surface

Keep a GID but also link the type of DataType it should point to

sensors

Keep a GID but also link the type of DataType it should point to

shell_surface

Keep a GID but also link the type of DataType it should point to

tvb.adapters.visualizers.sensors.function_sensors_to_surface(sensors_gid, surface_to_map_gid)[source]

Map EEG sensors onto the head surface (skin-air).

EEG sensor locations are typically only given on a unit sphere, that is, they are effectively only identified by their orientation with respect to a coordinate system. This method is used to map these unit vector sensor “locations” to a specific location on the surface of the skin.

Assumes coordinate systems are aligned, i.e. common x,y,z and origin.

tvb.adapters.visualizers.sensors.prepare_mapped_sensors_as_measure_points_params(sensors, eeg_cap=None, adapter_id=None)[source]

Compute sensors positions by mapping them to the eeg_cap surface If eeg_cap is not specified the mapping will use a default EEGCal DataType in current project. If no default EEGCap is found, return sensors as they are (not projected)

Returns:

dictionary to be used in Viewers for rendering measure_points

Return type:

dict

tvb.adapters.visualizers.sensors.prepare_sensors_as_measure_points_params(sensors)[source]

Returns urls from where to fetch the measure points and their labels

surface_view

class tvb.adapters.visualizers.surface_view.ABCSurfaceDisplayer[source]

Bases: ABCSpaceDisplayer

generate_region_boundaries(surface_gid, region_mapping_gid)[source]

Return the full region boundaries, including: vertices, normals and lines indices.

class tvb.adapters.visualizers.surface_view.BaseSurfaceViewerForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

class tvb.adapters.visualizers.surface_view.BaseSurfaceViewerModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.surface_view.BaseSurfaceViewerModel]

Attributes declared

region_maptvb.adapters.visualizers.surface_view.BaseSurfaceViewerModel.region_map = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

A region map

connectivity_measuretvb.adapters.visualizers.surface_view.BaseSurfaceViewerModel.connectivity_measure = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

A connectivity measure

shell_surfacetvb.adapters.visualizers.surface_view.BaseSurfaceViewerModel.shell_surface = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

Face surface to be displayed semi-transparently, for orientation only.

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

connectivity_measure

Keep a GID but also link the type of DataType it should point to

region_map

Keep a GID but also link the type of DataType it should point to

shell_surface

Keep a GID but also link the type of DataType it should point to

class tvb.adapters.visualizers.surface_view.ConnectivityMeasureOnSurfaceViewer[source]

Bases: SurfaceViewer

This displays a connectivity measure on a surface via a RegionMapping It reuses almost everything from SurfaceViewer, but it make required another input param.

get_form_class()[source]
launch(view_model: BaseSurfaceViewerModel) dict[source]

To be implemented in each Adapter. Will contain the logic of the Adapter. Takes a ViewModel with data, dependency direction is: Adapter -> Form -> ViewModel Any returned DataType will be stored in DB, by the Framework.

Parameters:

view_model – the data model corresponding to the current adapter

class tvb.adapters.visualizers.surface_view.ConnectivityMeasureOnSurfaceViewerForm[source]

Bases: BaseSurfaceViewerForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.surface_view.RegionMappingViewer[source]

Bases: SurfaceViewer

This is a viewer for RegionMapping DataTypes. It reuses almost everything from SurfaceViewer, but it make required another input param.

get_form_class()[source]
launch(view_model: BaseSurfaceViewerModel) dict[source]

To be implemented in each Adapter. Will contain the logic of the Adapter. Takes a ViewModel with data, dependency direction is: Adapter -> Form -> ViewModel Any returned DataType will be stored in DB, by the Framework.

Parameters:

view_model – the data model corresponding to the current adapter

class tvb.adapters.visualizers.surface_view.RegionMappingViewerForm[source]

Bases: BaseSurfaceViewerForm

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.surface_view.SurfaceURLGenerator[source]

Bases: URLGenerator

static get_url_for_region_boundaries(surface_gid, region_mapping_gid, adapter_id)[source]
static get_urls_for_pick_rendering(surface_h5)[source]

Compose URLS for the JS code to retrieve a surface for picking.

static get_urls_for_rendering(surface_h5, region_mapping_gid=None)[source]

Compose URLs for the JS code to retrieve a surface from the UI for rendering.

class tvb.adapters.visualizers.surface_view.SurfaceViewer[source]

Bases: ABCSurfaceDisplayer

Static SurfaceData visualizer - for visual inspecting imported surfaces in TVB. Optionally it can display associated RegionMapping entities.

get_form_class()[source]
get_required_memory_size(view_model)[source]

Abstract method to be implemented in each adapter. Should return the required memory for launching the adapter.

launch(view_model: SurfaceViewerModel) dict[source]

To be implemented in each Adapter. Will contain the logic of the Adapter. Takes a ViewModel with data, dependency direction is: Adapter -> Form -> ViewModel Any returned DataType will be stored in DB, by the Framework.

Parameters:

view_model – the data model corresponding to the current adapter

class tvb.adapters.visualizers.surface_view.SurfaceViewerForm[source]

Bases: BaseSurfaceViewerForm

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.surface_view.SurfaceViewerModel(**kwargs)[source]

Bases: BaseSurfaceViewerModel

Traited class [tvb.adapters.visualizers.surface_view.SurfaceViewerModel]

Attributes declared

surface : tvb.adapters.visualizers.surface_view.SurfaceViewerModel.surface = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

region_maptvb.adapters.visualizers.surface_view.BaseSurfaceViewerModel.region_map = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

A region map

connectivity_measuretvb.adapters.visualizers.surface_view.BaseSurfaceViewerModel.connectivity_measure = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

A connectivity measure

shell_surfacetvb.adapters.visualizers.surface_view.BaseSurfaceViewerModel.shell_surface = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

Face surface to be displayed semi-transparently, for orientation only.

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

surface

Keep a GID but also link the type of DataType it should point to

title = 'Surface Visualizer'
tvb.adapters.visualizers.surface_view.ensure_shell_surface(project_id, shell_surface=None, preferred_type='Face')[source]

time_series

A Javascript displayer for time series, using SVG.

class tvb.adapters.visualizers.time_series.ABCSpaceDisplayer[source]

Bases: ABCDisplayer

static build_params_for_selectable_connectivity(connectivity: Connectivity) dict[source]
build_params_for_subselectable_ts(ts_h5)[source]

creates a template dict with the initial selection to be displayed in a time series viewer

get_grouped_space_labels(ts_h5)[source]
Returns:

A structure of this form [(‘left’, [(idx, lh_label)…]), (‘right’: [(idx, rh_label) …])]

get_space_labels(ts_h5)[source]
Returns:

An array of strings with the connectivity node labels.

class tvb.adapters.visualizers.time_series.TimeSeriesDisplay[source]

Bases: ABCSpaceDisplayer

MAX_PREVIEW_DATA_LENGTH = 200
get_form_class()[source]
get_required_memory_size(view_model: TimeSeriesModel) int[source]

Return required memory.

launch(view_model: TimeSeriesModel) dict[source]

Construct data for visualization and launch it.

class tvb.adapters.visualizers.time_series.TimeSeriesForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.time_series.TimeSeriesModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.time_series.TimeSeriesModel]

Attributes declared

time_series : tvb.adapters.visualizers.time_series.TimeSeriesModel.time_series = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

time_series

Keep a GID but also link the type of DataType it should point to

time_series_volume

Backend-side for TS Visualizer of TS Volume DataTypes.

class tvb.adapters.visualizers.time_series_volume.TimeSeriesVolumeVisualiser[source]

Bases: _MappedArrayVolumeBase

ensure_background(background_index)[source]
get_form_class()[source]
get_required_memory_size(view_model: TimeSeriesVolumeVisualiserModel) int[source]

Return required memory.

get_view_region(ts_h5, volume_rm_h5, from_idx, to_idx, x, y, z, var=0, mode=0)[source]

Retrieve 3 slices through the Volume TS, at the given X, y and Z coordinates, and in time [from_idx .. to_idx].

Parameters:
  • ts_h5 – input TimeSeriesH5

  • volume_rm_h5 – input RegionVolumeMappingH5

  • from_idx – int This will be the limit on the first dimension (time)

  • to_idx – int Also limit on the first Dimension (time)

  • x_plane – int coordinate

  • y_plane – int coordinate

  • z_plane – int coordinate

Returns:

An array of 3 Matrices 2D, each containing the values to display in planes xy, yz and xy.

get_voxel_time_series(entity_gid, **kwargs)[source]

Retrieve for a given voxel (x,y,z) the entire timeline.

Parameters:
  • x – int coordinate

  • y – int coordinate

  • z – int coordinate

Returns:

A complex dictionary with information about current voxel. The main part will be a vector with all the values over time from the x,y,z coordinates.

launch(view_model: TimeSeriesVolumeVisualiserModel) dict[source]

To be implemented in each Adapter. Will contain the logic of the Adapter. Takes a ViewModel with data, dependency direction is: Adapter -> Form -> ViewModel Any returned DataType will be stored in DB, by the Framework.

Parameters:

view_model – the data model corresponding to the current adapter

class tvb.adapters.visualizers.time_series_volume.TimeSeriesVolumeVisualiserForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.time_series_volume.TimeSeriesVolumeVisualiserModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.time_series_volume.TimeSeriesVolumeVisualiserModel]

Attributes declared

time_series : tvb.adapters.visualizers.time_series_volume.TimeSeriesVolumeVisualiserModel.time_series = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

background : tvb.adapters.visualizers.time_series_volume.TimeSeriesVolumeVisualiserModel.background = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

background

Keep a GID but also link the type of DataType it should point to

time_series

Keep a GID but also link the type of DataType it should point to

topographic

class tvb.adapters.visualizers.topographic.TopographicViewer[source]

Bases: ABCDisplayer

Interface between TVB Framework and web display of a topography viewer.

get_form_class()[source]
get_required_memory_size(view_model: TopographicViewerModel) int[source]

Return the required memory to run this algorithm.

launch(view_model: TopographicViewerModel) dict[source]

To be implemented in each Adapter. Will contain the logic of the Adapter. Takes a ViewModel with data, dependency direction is: Adapter -> Form -> ViewModel Any returned DataType will be stored in DB, by the Framework.

Parameters:

view_model – the data model corresponding to the current adapter

class tvb.adapters.visualizers.topographic.TopographicViewerForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.topographic.TopographicViewerModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.topographic.TopographicViewerModel]

Attributes declared

data_0tvb.adapters.visualizers.topographic.TopographicViewerModel.data_0 = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

Punctual values for each node in the connectivity matrix. This will give the colors of the resulting topographic image.

data_1tvb.adapters.visualizers.topographic.TopographicViewerModel.data_1 = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

Comparative values

data_2tvb.adapters.visualizers.topographic.TopographicViewerModel.data_2 = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

Comparative values

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

data_0

Keep a GID but also link the type of DataType it should point to

data_1

Keep a GID but also link the type of DataType it should point to

data_2

Keep a GID but also link the type of DataType it should point to

class tvb.adapters.visualizers.topographic.TopographyCalculations[source]

Bases: object

static compute_topography_data(topography, sensor_locations)[source]

Trim data, to make sure everything is inside the head contour.

static normalize_sensors(points_positions)[source]

Centers the brain.

tract

A tracts visualizer .. moduleauthor:: Mihai Andrei <mihai.andrei@codemart.ro>

class tvb.adapters.visualizers.tract.TractViewer[source]

Bases: ABCSpaceDisplayer

Tract visualizer

get_form_class()[source]
get_required_memory_size(view_model: TractViewerModel) int[source]

Abstract method to be implemented in each adapter. Should return the required memory for launching the adapter.

launch(view_model: TractViewerModel) dict[source]

To be implemented in each Adapter. Will contain the logic of the Adapter. Takes a ViewModel with data, dependency direction is: Adapter -> Form -> ViewModel Any returned DataType will be stored in DB, by the Framework.

Parameters:

view_model – the data model corresponding to the current adapter

class tvb.adapters.visualizers.tract.TractViewerForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.tract.TractViewerModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.tract.TractViewerModel]

Attributes declared

tracts : tvb.adapters.visualizers.tract.TractViewerModel.tracts = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

shell_surfacetvb.adapters.visualizers.tract.TractViewerModel.shell_surface = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

Surface to be displayed semi-transparently, for visual purposes only.

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

shell_surface

Keep a GID but also link the type of DataType it should point to

tracts

Keep a GID but also link the type of DataType it should point to

wavelet_spectrogram

Plot the power of a WaveletCoefficients object

class tvb.adapters.visualizers.wavelet_spectrogram.WaveletSpectrogramVisualizer[source]

Bases: ABCDisplayer

Plot the power of a WaveletCoefficients object using SVG an D3.

get_form_class()[source]
get_required_memory_size(view_model: WaveletSpectrogramVisualizerModel) int[source]

Return the required memory to run this algorithm.

launch(view_model: WaveletSpectrogramVisualizerModel) dict[source]

To be implemented in each Adapter. Will contain the logic of the Adapter. Takes a ViewModel with data, dependency direction is: Adapter -> Form -> ViewModel Any returned DataType will be stored in DB, by the Framework.

Parameters:

view_model – the data model corresponding to the current adapter

class tvb.adapters.visualizers.wavelet_spectrogram.WaveletSpectrogramVisualizerForm[source]

Bases: ABCAdapterForm

static get_filters()[source]

Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain

static get_input_name()[source]

The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str

static get_required_datatype()[source]

Each Adapter’s computation is based on a main Datatype. This method should keep the class of it. This Datatype will be stored to DB at introspection time. :return: DataType class

static get_view_model()[source]

Should keep the ViewModel class that corresponds to the current Adapter. :return: ViewModel class

class tvb.adapters.visualizers.wavelet_spectrogram.WaveletSpectrogramVisualizerModel(**kwargs)[source]

Bases: ViewModel

Traited class [tvb.adapters.visualizers.wavelet_spectrogram.WaveletSpectrogramVisualizerModel]

Attributes declared

input_datatvb.adapters.visualizers.wavelet_spectrogram.WaveletSpectrogramVisualizerModel.input_data = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

Wavelet spectrogram to display

operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)

range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)

is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)

gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

input_data

Keep a GID but also link the type of DataType it should point to