h5
Package¶
annotation_h5
¶
- class tvb.adapters.datatypes.h5.annotation_h5.ConnectivityAnnotations(**kwargs)[source]¶
Bases:
HasTraits
Traited class [tvb.adapters.datatypes.h5.annotation_h5.ConnectivityAnnotations]¶
Ontology annotations for a Connectivity.
Attributes declared¶
connectivity : tvb.adapters.datatypes.h5.annotation_h5.ConnectivityAnnotations.connectivity = Attr(field_type=<class ‘tvb.datatypes.connectivity.Connectivity’>, default=None, required=True)
- region_annotationstvb.adapters.datatypes.h5.annotation_h5.ConnectivityAnnotations.region_annotations = NArray(label=’Region Annotations’, dtype=[(‘id’, ‘<i4’), (‘parent_id’, ‘<i4’), (‘parent_left’, ‘<i4’), (‘parent_right’, ‘<i4’), (‘relation’, ‘O’), (‘label’, ‘O’), (‘definition’, ‘O’), (‘synonym’, ‘O’), (‘uri’, ‘O’), (‘synonym_tvb_left’, ‘<i4’), (‘synonym_tvb_right’, ‘<i4’)], default=array([],
dtype=[(‘id’, ‘<i4’), (‘parent_id’, ‘<i4’), (‘parent_left’, ‘<i4’), (‘parent_right’, ‘<i4’), (‘relation’, ‘O’), (‘label’, ‘O’), (‘definition’, ‘O’), (‘synonym’, ‘O’), (‘uri’, ‘O’), (‘synonym_tvb_left’, ‘<i4’), (‘synonym_tvb_right’, ‘<i4’)]), dim_names=(), ndim=None, required=True)
Flat tree of annotations for every connectivity region.
gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)
- connectivity¶
Holds a flatten form for the annotations for a full connectivity. Each region in the connectivity can have None, or a tree of AnnotationTerms To be stored in a compound DS in H5.
- get_activation_patterns()[source]¶
Group Annotation terms by URI. :return: map {brco_id: list of TVB regions IDs in which the same term is being subclass}
- region_annotations¶
Declares a numpy array. dtype enforces the dtype. The default dtype is float64. An optional symbolic shape can be given, as a tuple of Dim attributes from the owning class. The shape will be enforced, but no broadcasting will be done. domain declares what values are allowed in this array. It can be any object that can be checked for membership Defaults are checked if they are in the declared domain. For performance reasons this does not happen on every attribute set.
connectivity_h5
¶
fcd_h5
¶
- class tvb.adapters.datatypes.h5.fcd_h5.FcdH5(path)[source]¶
Bases:
DataTypeMatrixH5
graph_h5
¶
- class tvb.adapters.datatypes.h5.graph_h5.ConnectivityMeasureH5(path)[source]¶
Bases:
DataTypeMatrixH5
- load_into(datatype: ConnectivityMeasure) None [source]¶
- store(datatype: ConnectivityMeasure, scalars_only: bool = False, store_references: bool = True) None [source]¶
- class tvb.adapters.datatypes.h5.graph_h5.CorrelationCoefficientsH5(path)[source]¶
Bases:
DataTypeMatrixH5
- class tvb.adapters.datatypes.h5.graph_h5.CovarianceH5(path)[source]¶
Bases:
DataTypeMatrixH5
local_connectivity_h5
¶
mapped_value_h5
¶
- class tvb.adapters.datatypes.h5.mapped_value_h5.ValueWrapper(**kwargs)[source]¶
Bases:
HasTraits
Traited class [tvb.adapters.datatypes.h5.mapped_value_h5.ValueWrapper]¶
Attributes declared¶
data_value : tvb.adapters.datatypes.h5.mapped_value_h5.ValueWrapper.data_value = Attr(field_type=<class ‘str’>, default=None, required=True)
data_type : tvb.adapters.datatypes.h5.mapped_value_h5.ValueWrapper.data_type = Attr(field_type=<class ‘str’>, default=None, required=True)
data_name : tvb.adapters.datatypes.h5.mapped_value_h5.ValueWrapper.data_name = Attr(field_type=<class ‘str’>, default=None, required=True)
gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)
- data_name¶
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.
- data_type¶
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.
- data_value¶
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.
- property value¶
mode_decompositions_h5
¶
- class tvb.adapters.datatypes.h5.mode_decompositions_h5.IndependentComponentsH5(path)[source]¶
Bases:
H5File
- class tvb.adapters.datatypes.h5.mode_decompositions_h5.PrincipalComponentsH5(path)[source]¶
Bases:
H5File
- read_fractions_data(from_comp, to_comp)[source]¶
Return a list with fractions for components in interval from_comp, to_comp and in addition have in position n the sum of the fractions for the rest of the components.
patterns_h5
¶
projections_h5
¶
region_mapping_h5
¶
- class tvb.adapters.datatypes.h5.region_mapping_h5.RegionMappingH5(path)[source]¶
Bases:
H5File
- get_region_mapping_slice(start_idx, end_idx)[source]¶
Get a slice of the region mapping as used by the region viewers. For each vertex on the surface, alpha-indices will be the closest region-index :param start_idx: vertex index on the surface :param end_idx: vertex index on the surface :return: NumPy array with [closest_reg_idx …]
- class tvb.adapters.datatypes.h5.region_mapping_h5.RegionVolumeMappingH5(path)[source]¶
Bases:
VolumetricDataMixin
,DataTypeMatrixH5
sensors_h5
¶
spectral_h5
¶
- class tvb.adapters.datatypes.h5.spectral_h5.CoherenceSpectrumH5(path)[source]¶
Bases:
DataTypeMatrixH5
- class tvb.adapters.datatypes.h5.spectral_h5.ComplexCoherenceSpectrumH5(path)[source]¶
Bases:
DataTypeMatrixH5
- spectrum_types = ['Imaginary', 'Real', 'Absolute']¶
- class tvb.adapters.datatypes.h5.spectral_h5.FourierSpectrumH5(path)[source]¶
Bases:
DataTypeMatrixH5
- class tvb.adapters.datatypes.h5.spectral_h5.WaveletCoefficientsH5(path)[source]¶
Bases:
DataTypeMatrixH5
structural_h5
¶
- class tvb.adapters.datatypes.h5.structural_h5.StructuralMRIH5(path)[source]¶
Bases:
VolumetricDataMixin
,DataTypeMatrixH5
surface_h5
¶
- class tvb.adapters.datatypes.h5.surface_h5.SurfaceH5(path)[source]¶
Bases:
H5File
- get_pick_triangles_slice(slice_number=0)[source]¶
Read triangles slice, to be used by WebGL visualizer with pick.
- get_pick_vertex_normals_slice(slice_number=0)[source]¶
Read vertex-normals slice, to be used by WebGL visualizer with pick.
- get_pick_vertices_slice(slice_number=0)[source]¶
Read vertices slice, to be used by WebGL visualizer with pick.
- get_slices_to_hemisphere_mask()[source]¶
- Returns:
a vector af length number_of_slices, with 1 when current chunk belongs to the Right hemisphere
- get_triangles_slice(slice_number=0)[source]¶
Read split-triangles slice, to be used by WebGL visualizer.
- get_vertex_normals_slice(slice_number=0)[source]¶
Read vertex-normal slice, to be used by WebGL visualizer.
temporal_correlations_h5
¶
time_series_h5
¶
- class tvb.adapters.datatypes.h5.time_series_h5.TimeSeriesEEGH5(path)[source]¶
Bases:
TimeSeriesSensorsH5
- class tvb.adapters.datatypes.h5.time_series_h5.TimeSeriesH5(path)[source]¶
Bases:
H5File
- get_default_selection()[source]¶
- Returns:
The measure point indices that have to be shown by default. By default show all.
- get_grouped_space_labels()[source]¶
- Returns:
A list of label groups. A label group is a tuple (name, [(label_idx, label)…]). Default all labels in a group named ‘’
- get_measure_points_selection_gid()[source]¶
- Returns:
a datatype gid with which to obtain al valid measure point selection for this time series We have to decide if the default should be all selections or none
- get_min_max_values()[source]¶
Retrieve the minimum and maximum values from the metadata. :returns: (minimum_value, maximum_value)
- get_space_labels()[source]¶
It assumes that we want to select in the 3’rd dimension, and generates labels for each point in that dimension. Subclasses are more specific. :return: An array of strings.
- read_channels_page(from_idx, to_idx, step=None, specific_slices=None, channels_list=None)[source]¶
Read and return only the data page for the specified channels list.
- Parameters:
from_idx – the starting time idx from which to read data
to_idx – the end time idx up until to which you read data
step – increments in which to read the data. Optional, default to 1.
specific_slices – optional parameter. If speficied slices the data accordingly.
channels_list – the list of channels for which we want data
- read_data_page(from_idx, to_idx, step=None, specific_slices=None)[source]¶
Retrieve one page of data (paging done based on time).
- class tvb.adapters.datatypes.h5.time_series_h5.TimeSeriesMEGH5(path)[source]¶
Bases:
TimeSeriesSensorsH5
- class tvb.adapters.datatypes.h5.time_series_h5.TimeSeriesRegionH5(path)[source]¶
Bases:
TimeSeriesH5
- class tvb.adapters.datatypes.h5.time_series_h5.TimeSeriesSEEGH5(path)[source]¶
Bases:
TimeSeriesSensorsH5
- class tvb.adapters.datatypes.h5.time_series_h5.TimeSeriesSensorsH5(path)[source]¶
Bases:
TimeSeriesH5
- class tvb.adapters.datatypes.h5.time_series_h5.TimeSeriesSurfaceH5(path)[source]¶
Bases:
TimeSeriesH5
- SELECTION_LIMIT = 100¶
- class tvb.adapters.datatypes.h5.time_series_h5.TimeSeriesVolumeH5(path)[source]¶
Bases:
TimeSeriesH5
- get_volume_view(from_idx, to_idx, x_plane, y_plane, z_plane, **kwargs)[source]¶
Retrieve 3 slices through the Volume TS, at the given X, y and Z coordinates, and in time [from_idx .. to_idx].
- Parameters:
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(x_plane, y_plane, z_plane, **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.
tracts_h5
¶
- class tvb.adapters.datatypes.h5.tracts_h5.TractsH5(path)[source]¶
Bases:
H5File
- MAX_N_VERTICES = 65536¶
- get_line_starts(region_id)[source]¶
Returns a compact representation of the element buffers required to draw the streams via gl.drawElements A list of indices that describe where the first vertex for a tract is in the vertex array returned by get_tract_vertices_starting_in_region