The Virtual Brain Project

Table Of Contents

Previous topic

simulator Package

Next topic

brco Package

This Page

uploaders Package

Define a list with all Python modules in which the introspect mechanism should search for Import Adapters.

brco_importer

class tvb.adapters.uploaders.brco_importer.BRCOImporter[source]

Bases: tvb.core.adapters.abcuploader.ABCUploader

Import connectivity data stored in the networkx gpickle format

get_form_class()[source]
get_output()[source]
launch(view_model)[source]
class tvb.adapters.uploaders.brco_importer.BRCOImporterForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcuploader.ABCUploaderForm

static get_upload_information()[source]
static get_view_model()[source]
class tvb.adapters.uploaders.brco_importer.BRCOImporterModel(**kwargs)[source]

Bases: tvb.core.neotraits.uploader_view_model.UploaderViewModel

data_file : tvb.adapters.uploaders.brco_importer.BRCOImporterModel.data_file = Str(field_type=<class ‘str’>, default=None, required=True)

connectivity : tvb.adapters.uploaders.brco_importer.BRCOImporterModel.connectivity = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)
The Connectivity for which these annotations were made

data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)

encrypted_aes_key : tvb.core.neotraits.uploader_view_model.UploaderViewModel.encrypted_aes_key = Str(field_type=<class ‘str’>, default=None, required=False)
Check our demo notebook on how to produce this key and how we expect your files to be encrypted

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

data_file

connectivity_measure_importer

class tvb.adapters.uploaders.connectivity_measure_importer.ConnectivityMeasureImporter[source]

Bases: tvb.core.adapters.abcuploader.ABCUploader

This imports a searies of conectivity measures from a .mat file

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

Execute import operations:

class tvb.adapters.uploaders.connectivity_measure_importer.ConnectivityMeasureImporterForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcuploader.ABCUploaderForm

static get_upload_information()[source]
static get_view_model()[source]
class tvb.adapters.uploaders.connectivity_measure_importer.ConnectivityMeasureImporterModel(**kwargs)[source]

Bases: tvb.core.neotraits.uploader_view_model.UploaderViewModel

data_file : tvb.adapters.uploaders.connectivity_measure_importer.ConnectivityMeasureImporterModel.data_file = Str(field_type=<class ‘str’>, default=None, required=True)

dataset_name : tvb.adapters.uploaders.connectivity_measure_importer.ConnectivityMeasureImporterModel.dataset_name = Attr(field_type=<class ‘str’>, default=’M’, required=True)
Name of the MATLAB dataset where data is stored
connectivity : tvb.adapters.uploaders.connectivity_measure_importer.ConnectivityMeasureImporterModel.connectivity = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)
The Connectivity for which these measurements were made

data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)

encrypted_aes_key : tvb.core.neotraits.uploader_view_model.UploaderViewModel.encrypted_aes_key = Str(field_type=<class ‘str’>, default=None, required=False)
Check our demo notebook on how to produce this key and how we expect your files to be encrypted

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

data_file
dataset_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.

csv_connectivity_importer

class tvb.adapters.uploaders.csv_connectivity_importer.CSVConnectivityImporter[source]

Bases: tvb.core.adapters.abcuploader.ABCUploader

Handler for uploading a Connectivity csv from the dti pipeline

TRACT_FILE = 'tract_lengths.txt'
WEIGHTS_FILE = 'weights.txt'
get_form_class()[source]
get_output()[source]
launch(view_model)[source]

Execute import operations: process the weights and tracts csv files, then use the reference connectivity passed as input_data for the rest of the attributes.

Raises LaunchException:
 when the number of nodes in CSV files doesn’t match the one in the connectivity
class tvb.adapters.uploaders.csv_connectivity_importer.CSVConnectivityImporterForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcuploader.ABCUploaderForm

static get_upload_information()[source]
static get_view_model()[source]
class tvb.adapters.uploaders.csv_connectivity_importer.CSVConnectivityImporterModel(**kwargs)[source]

Bases: tvb.core.neotraits.uploader_view_model.UploaderViewModel

weights : tvb.adapters.uploaders.csv_connectivity_importer.CSVConnectivityImporterModel.weights = Str(field_type=<class ‘str’>, default=None, required=True)

weights_delimiter : tvb.adapters.uploaders.csv_connectivity_importer.CSVConnectivityImporterModel.weights_delimiter = Str(field_type=<class ‘str’>, default=’,’, required=True)

tracts : tvb.adapters.uploaders.csv_connectivity_importer.CSVConnectivityImporterModel.tracts = Str(field_type=<class ‘str’>, default=None, required=True)

tracts_delimiter : tvb.adapters.uploaders.csv_connectivity_importer.CSVConnectivityImporterModel.tracts_delimiter = Str(field_type=<class ‘str’>, default=’,’, required=True)

input_data : tvb.adapters.uploaders.csv_connectivity_importer.CSVConnectivityImporterModel.input_data = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)

encrypted_aes_key : tvb.core.neotraits.uploader_view_model.UploaderViewModel.encrypted_aes_key = Str(field_type=<class ‘str’>, default=None, required=False)
Check our demo notebook on how to produce this key and how we expect your files to be encrypted

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

tracts
tracts_delimiter
weights
weights_delimiter
class tvb.adapters.uploaders.csv_connectivity_importer.CSVConnectivityParser(csv_file, delimiter=', ')[source]

Bases: builtins.object

Parser for a connectivity csv file Such a file may begin with a optional header of ordinal integers The body of the file is a square matrix of floats -1 is interpreted as 0 If a header is present the matrices columns and rows are permuted so that the header ordinals would be in ascending order

permutation = None

A permutation represented as a list index -> new_index. Defaults to the identity permutation

gifti_surface_importer

class tvb.adapters.uploaders.gifti_surface_importer.GIFTISurfaceImporter[source]

Bases: tvb.core.adapters.abcuploader.ABCUploader

This importer is responsible for import of surface from GIFTI format (XML file) and store them in TVB as Surface.

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

Execute import operations:

class tvb.adapters.uploaders.gifti_surface_importer.GIFTISurfaceImporterForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcuploader.ABCUploaderForm

static get_upload_information()[source]
static get_view_model()[source]
class tvb.adapters.uploaders.gifti_surface_importer.GIFTISurfaceImporterModel(**kwargs)[source]

Bases: tvb.core.neotraits.uploader_view_model.UploaderViewModel

file_type : tvb.adapters.uploaders.gifti_surface_importer.GIFTISurfaceImporterModel.file_type = Str(field_type=<class ‘str’>, default=’Cortical Surface’, required=True)

data_file : tvb.adapters.uploaders.gifti_surface_importer.GIFTISurfaceImporterModel.data_file = Str(field_type=<class ‘str’>, default=None, required=True)

data_file_part2 : tvb.adapters.uploaders.gifti_surface_importer.GIFTISurfaceImporterModel.data_file_part2 = Str(field_type=<class ‘str’>, default=None, required=False)

should_center : tvb.adapters.uploaders.gifti_surface_importer.GIFTISurfaceImporterModel.should_center = Attr(field_type=<class ‘bool’>, default=False, required=False)

data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)

encrypted_aes_key : tvb.core.neotraits.uploader_view_model.UploaderViewModel.encrypted_aes_key = Str(field_type=<class ‘str’>, default=None, required=False)
Check our demo notebook on how to produce this key and how we expect your files to be encrypted

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

KEY_OPTION_READ_METADATA = 'Specified in the file metadata'
data_file
data_file_part2
file_type
should_center

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_types = OrderedDict([('Cortical Surface', 'Cortical Surface'), ('Brain Skull', 'Brain Skull'), ('Skull Skin', 'Skull Skin'), ('Skin Air', 'Skin Air'), ('EEG Cap', 'EEG Cap'), ('Face Surface', 'Face'), ('White Matter Surface', 'White Matter'), ('Specified in the file metadata', 'ReadFromMetaData')])

gifti_timeseries_importer

class tvb.adapters.uploaders.gifti_timeseries_importer.GIFTITimeSeriesImporter[source]

Bases: tvb.core.adapters.abcuploader.ABCUploader

This importer is responsible for import of a TimeSeries from GIFTI format (XML file) and store them in TVB.

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

Execute import operations:

class tvb.adapters.uploaders.gifti_timeseries_importer.GIFTITimeSeriesImporterForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcuploader.ABCUploaderForm

static get_upload_information()[source]
static get_view_model()[source]
class tvb.adapters.uploaders.gifti_timeseries_importer.GIFTITimeSeriesImporterModel(**kwargs)[source]

Bases: tvb.core.neotraits.uploader_view_model.UploaderViewModel

data_file : tvb.adapters.uploaders.gifti_timeseries_importer.GIFTITimeSeriesImporterModel.data_file = Str(field_type=<class ‘str’>, default=None, required=True)

surface : tvb.adapters.uploaders.gifti_timeseries_importer.GIFTITimeSeriesImporterModel.surface = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)
The Brain Surface used to generate imported TimeSeries.

data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)

encrypted_aes_key : tvb.core.neotraits.uploader_view_model.UploaderViewModel.encrypted_aes_key = Str(field_type=<class ‘str’>, default=None, required=False)
Check our demo notebook on how to produce this key and how we expect your files to be encrypted

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

data_file
surface

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

mat_timeseries_eeg_importer

class tvb.adapters.uploaders.mat_timeseries_eeg_importer.EEGMatTimeSeriesImporterModel(**kwargs)[source]

Bases: tvb.core.neotraits.uploader_view_model.UploaderViewModel

datatype : tvb.adapters.uploaders.mat_timeseries_eeg_importer.EEGMatTimeSeriesImporterModel.datatype = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)

encrypted_aes_key : tvb.core.neotraits.uploader_view_model.UploaderViewModel.encrypted_aes_key = Str(field_type=<class ‘str’>, default=None, required=False)
Check our demo notebook on how to produce this key and how we expect your files to be encrypted

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

class tvb.adapters.uploaders.mat_timeseries_eeg_importer.EEGRegionMatTimeSeriesImporterForm(prefix='', project_id=None)[source]

Bases: tvb.adapters.uploaders.mat_timeseries_importer.RegionMatTimeSeriesImporterForm

static get_view_model()[source]
class tvb.adapters.uploaders.mat_timeseries_eeg_importer.EEGRegionTimeSeriesImporter[source]

Bases: tvb.adapters.uploaders.mat_timeseries_importer.RegionTimeSeriesImporter

get_form_class()[source]
tstype = 'EEG'

mat_timeseries_importer

class tvb.adapters.uploaders.mat_timeseries_importer.RegionMatTimeSeriesImporterForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcuploader.ABCUploaderForm

static get_upload_information()[source]
static get_view_model()[source]
class tvb.adapters.uploaders.mat_timeseries_importer.RegionMatTimeSeriesImporterModel(**kwargs)[source]

Bases: tvb.core.neotraits.uploader_view_model.UploaderViewModel

data_file : tvb.adapters.uploaders.mat_timeseries_importer.RegionMatTimeSeriesImporterModel.data_file = Str(field_type=<class ‘str’>, default=None, required=True)

dataset_name : tvb.adapters.uploaders.mat_timeseries_importer.RegionMatTimeSeriesImporterModel.dataset_name = Str(field_type=<class ‘str’>, default=None, required=True)
Name of the MATLAB dataset where data is stored

structure_path : tvb.adapters.uploaders.mat_timeseries_importer.RegionMatTimeSeriesImporterModel.structure_path = Str(field_type=<class ‘str’>, default=’‘, required=False)

transpose : tvb.adapters.uploaders.mat_timeseries_importer.RegionMatTimeSeriesImporterModel.transpose = Attr(field_type=<class ‘bool’>, default=False, required=False)

slice : tvb.adapters.uploaders.mat_timeseries_importer.RegionMatTimeSeriesImporterModel.slice = Str(field_type=<class ‘str’>, default=’‘, required=False)

sampling_rate : tvb.adapters.uploaders.mat_timeseries_importer.RegionMatTimeSeriesImporterModel.sampling_rate = Int(field_type=<class ‘int’>, default=100, required=False)

start_time : tvb.adapters.uploaders.mat_timeseries_importer.RegionMatTimeSeriesImporterModel.start_time = Int(field_type=<class ‘int’>, default=0, required=True)

datatype : tvb.adapters.uploaders.mat_timeseries_importer.RegionMatTimeSeriesImporterModel.datatype = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)

data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)

encrypted_aes_key : tvb.core.neotraits.uploader_view_model.UploaderViewModel.encrypted_aes_key = Str(field_type=<class ‘str’>, default=None, required=False)
Check our demo notebook on how to produce this key and how we expect your files to be encrypted

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

data_file
dataset_name
datatype

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

sampling_rate

Declares an integer This is different from Attr(field_type=int). The former enforces int subtypes This allows all integer types, including numpy ones that can be safely cast to the declared type according to numpy rules

slice
start_time

Declares an integer This is different from Attr(field_type=int). The former enforces int subtypes This allows all integer types, including numpy ones that can be safely cast to the declared type according to numpy rules

structure_path
transpose

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.

class tvb.adapters.uploaders.mat_timeseries_importer.RegionTimeSeriesImporter[source]

Bases: tvb.core.adapters.abcuploader.ABCUploader

Import time series from a .mat file.

create_eeg_ts(data_shape, sensors)[source]
create_region_ts(data_shape, connectivity)[source]
get_form_class()[source]
get_output()[source]
launch(view_model)[source]
ts_builder = {'Region': <function RegionTimeSeriesImporter.create_region_ts at 0x7fc763c77170>, 'EEG': <function RegionTimeSeriesImporter.create_eeg_ts at 0x7fc763c77200>}
tstype = 'Region'

networkx_importer

class tvb.adapters.uploaders.networkx_importer.NetworkxConnectivityImporter[source]

Bases: tvb.core.adapters.abcuploader.ABCUploader

Import connectivity data stored in the networkx gpickle format

get_form_class()[source]
get_output()[source]
launch(view_model)[source]
class tvb.adapters.uploaders.networkx_importer.NetworkxConnectivityImporterForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcuploader.ABCUploaderForm

static get_upload_information()[source]
static get_view_model()[source]
class tvb.adapters.uploaders.networkx_importer.NetworkxImporterModel(**kwargs)[source]

Bases: tvb.core.neotraits.uploader_view_model.UploaderViewModel

data_file : tvb.adapters.uploaders.networkx_importer.NetworkxImporterModel.data_file = Str(field_type=<class ‘str’>, default=None, required=True)

key_edge_weight : tvb.adapters.uploaders.networkx_importer.NetworkxImporterModel.key_edge_weight = Attr(field_type=<class ‘str’>, default=’adc_mean’, required=False)

key_edge_tract : tvb.adapters.uploaders.networkx_importer.NetworkxImporterModel.key_edge_tract = Attr(field_type=<class ‘str’>, default=’fiber_length_mean’, required=False)

key_node_coordinates : tvb.adapters.uploaders.networkx_importer.NetworkxImporterModel.key_node_coordinates = Attr(field_type=<class ‘str’>, default=’dn_position’, required=False)

key_node_label : tvb.adapters.uploaders.networkx_importer.NetworkxImporterModel.key_node_label = Attr(field_type=<class ‘str’>, default=’dn_name’, required=False)

key_node_region : tvb.adapters.uploaders.networkx_importer.NetworkxImporterModel.key_node_region = Attr(field_type=<class ‘str’>, default=’dn_region’, required=False)

key_node_hemisphere : tvb.adapters.uploaders.networkx_importer.NetworkxImporterModel.key_node_hemisphere = Attr(field_type=<class ‘str’>, default=’dn_hemisphere’, required=False)

data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)

encrypted_aes_key : tvb.core.neotraits.uploader_view_model.UploaderViewModel.encrypted_aes_key = Str(field_type=<class ‘str’>, default=None, required=False)
Check our demo notebook on how to produce this key and how we expect your files to be encrypted

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

data_file
key_edge_tract

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.

key_edge_weight

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.

key_node_coordinates

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.

key_node_hemisphere

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.

key_node_label

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.

key_node_region

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.

nifti_importer

class tvb.adapters.uploaders.nifti_importer.NIFTIImporter[source]

Bases: tvb.core.adapters.abcuploader.ABCUploader

This importer is responsible for loading of data from NIFTI format (nii or nii.gz files) and store them in TVB as TimeSeriesVolume or RegionVolumeMapping.

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

Execute import operations:

class tvb.adapters.uploaders.nifti_importer.NIFTIImporterForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcuploader.ABCUploaderForm

static get_upload_information()[source]
static get_view_model()[source]
class tvb.adapters.uploaders.nifti_importer.NIFTIImporterModel(**kwargs)[source]

Bases: tvb.core.neotraits.uploader_view_model.UploaderViewModel

data_file : tvb.adapters.uploaders.nifti_importer.NIFTIImporterModel.data_file = Str(field_type=<class ‘str’>, default=None, required=True)

apply_corrections : tvb.adapters.uploaders.nifti_importer.NIFTIImporterModel.apply_corrections = Attr(field_type=<class ‘bool’>, default=None, required=False)
Check this when the NII mapping has values outside [-1..N-1]. All outside range will be set -1 (background).
mappings_file : tvb.adapters.uploaders.nifti_importer.NIFTIImporterModel.mappings_file = Str(field_type=<class ‘str’>, default=None, required=False)
Fill this for Region Mappings, when the indices in the NII do not match the Connectivity [0..N-1] indices
connectivity : tvb.adapters.uploaders.nifti_importer.NIFTIImporterModel.connectivity = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)
Optional Connectivity if the NII file is a volume2regions mapping

data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)

encrypted_aes_key : tvb.core.neotraits.uploader_view_model.UploaderViewModel.encrypted_aes_key = Str(field_type=<class ‘str’>, default=None, required=False)
Check our demo notebook on how to produce this key and how we expect your files to be encrypted

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

apply_corrections

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.

connectivity

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

data_file
mappings_file

obj_importer

class tvb.adapters.uploaders.obj_importer.ObjSurfaceImporter[source]

Bases: tvb.core.adapters.abcuploader.ABCUploader

This imports geometry data stored in wavefront obj format

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

Execute import operations:

class tvb.adapters.uploaders.obj_importer.ObjSurfaceImporterForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcuploader.ABCUploaderForm

static get_upload_information()[source]
static get_view_model()[source]
class tvb.adapters.uploaders.obj_importer.ObjSurfaceImporterModel(**kwargs)[source]

Bases: tvb.core.neotraits.uploader_view_model.UploaderViewModel

surface_type : tvb.adapters.uploaders.obj_importer.ObjSurfaceImporterModel.surface_type = Str(field_type=<class ‘str’>, default=’Cortical Surface’, required=True)

data_file : tvb.adapters.uploaders.obj_importer.ObjSurfaceImporterModel.data_file = Str(field_type=<class ‘str’>, default=None, required=True)

should_center : tvb.adapters.uploaders.obj_importer.ObjSurfaceImporterModel.should_center = Attr(field_type=<class ‘bool’>, default=False, required=False)

data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)

encrypted_aes_key : tvb.core.neotraits.uploader_view_model.UploaderViewModel.encrypted_aes_key = Str(field_type=<class ‘str’>, default=None, required=False)
Check our demo notebook on how to produce this key and how we expect your files to be encrypted

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

data_file
should_center

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_type

projection_matrix_importer

class tvb.adapters.uploaders.projection_matrix_importer.ProjectionMatrixImporterForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcuploader.ABCUploaderForm

static get_upload_information()[source]
static get_view_model()[source]
class tvb.adapters.uploaders.projection_matrix_importer.ProjectionMatrixImporterModel(**kwargs)[source]

Bases: tvb.core.neotraits.uploader_view_model.UploaderViewModel

projection_file : tvb.adapters.uploaders.projection_matrix_importer.ProjectionMatrixImporterModel.projection_file = Str(field_type=<class ‘str’>, default=None, required=True)
Expected a file containing projection matrix (one vector of length number of surface vertices nd values in the sensors range).
dataset_name : tvb.adapters.uploaders.projection_matrix_importer.ProjectionMatrixImporterModel.dataset_name = Attr(field_type=<class ‘str’>, default=’ProjectionMatrix’, required=False)
Name of the MATLAB dataset where data is stored. Required only for .mat files
surface : tvb.adapters.uploaders.projection_matrix_importer.ProjectionMatrixImporterModel.surface = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)
The Brain Surface used by the uploaded projection matrix.
sensors : tvb.adapters.uploaders.projection_matrix_importer.ProjectionMatrixImporterModel.sensors = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)
The Sensors used in for current projection.

data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)

encrypted_aes_key : tvb.core.neotraits.uploader_view_model.UploaderViewModel.encrypted_aes_key = Str(field_type=<class ‘str’>, default=None, required=False)
Check our demo notebook on how to produce this key and how we expect your files to be encrypted

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

dataset_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.

projection_file
sensors

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

surface

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

class tvb.adapters.uploaders.projection_matrix_importer.ProjectionMatrixSurfaceEEGImporter[source]

Bases: tvb.core.adapters.abcuploader.ABCUploader

Upload ProjectionMatrix Cortical Surface -> EEG/MEG/SEEG Sensors from a MAT or NPY file.

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

Creates ProjectionMatrix entity from uploaded data.

Raises LaunchException:
 when * no projection_file or sensors are specified * the dataset is invalid * number of sensors is different from the one in dataset
logger = <Logger tvb.adapters.uploaders.projection_matrix_importer (INFO)>
tvb.adapters.uploaders.projection_matrix_importer.determine_projection_type(sensors_idx)[source]

region_mapping_importer

class tvb.adapters.uploaders.region_mapping_importer.RegionMappingImporter[source]

Bases: tvb.core.adapters.abcuploader.ABCUploader

Upload RegionMapping from a TXT, ZIP or BZ2 file.

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

Creates region mapping from uploaded data. :raises LaunchException: when

  • a parameter is None or missing
  • archive has more than one file
  • uploaded files are empty
  • number of vertices in imported file is different to the number of surface vertices
  • imported file has negative values
  • imported file has regions which are not in connectivity
logger = <Logger tvb.adapters.uploaders.region_mapping_importer (INFO)>
class tvb.adapters.uploaders.region_mapping_importer.RegionMappingImporterForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcuploader.ABCUploaderForm

static get_upload_information()[source]
static get_view_model()[source]
class tvb.adapters.uploaders.region_mapping_importer.RegionMappingImporterModel(**kwargs)[source]

Bases: tvb.core.neotraits.uploader_view_model.UploaderViewModel

mapping_file : tvb.adapters.uploaders.region_mapping_importer.RegionMappingImporterModel.mapping_file = Str(field_type=<class ‘str’>, default=None, required=True)
Expected a text/zip/bz2 file containing region mapping values.
surface : tvb.adapters.uploaders.region_mapping_importer.RegionMappingImporterModel.surface = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)
The Brain Surface used by uploaded region mapping.
connectivity : tvb.adapters.uploaders.region_mapping_importer.RegionMappingImporterModel.connectivity = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)
The Connectivity used by uploaded region mapping.

data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)

encrypted_aes_key : tvb.core.neotraits.uploader_view_model.UploaderViewModel.encrypted_aes_key = Str(field_type=<class ‘str’>, default=None, required=False)
Check our demo notebook on how to produce this key and how we expect your files to be encrypted

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

mapping_file
surface

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

sensors_importer

class tvb.adapters.uploaders.sensors_importer.SensorsImporter[source]

Bases: tvb.core.adapters.abcuploader.ABCUploader

Upload Sensors from a TXT file.

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

Creates required sensors from the uploaded file. :returns: a list of sensors instances of the specified type

Raises LaunchException:
 when * no sensors_file specified * sensors_type is invalid (not one of the mentioned options) * sensors_type is “MEG sensors” and no orientation is specified
logger = <Logger tvb.adapters.uploaders.sensors_importer (INFO)>
class tvb.adapters.uploaders.sensors_importer.SensorsImporterForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcuploader.ABCUploaderForm

static get_upload_information()[source]
static get_view_model()[source]
class tvb.adapters.uploaders.sensors_importer.SensorsImporterModel(**kwargs)[source]

Bases: tvb.core.neotraits.uploader_view_model.UploaderViewModel

sensors_file : tvb.adapters.uploaders.sensors_importer.SensorsImporterModel.sensors_file = Str(field_type=<class ‘str’>, default=None, required=True)
Expected a text/bz2 file containing sensor measurements.

sensors_type : tvb.adapters.uploaders.sensors_importer.SensorsImporterModel.sensors_type = Str(field_type=<class ‘str’>, default=’EEG’, required=True)

data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)

encrypted_aes_key : tvb.core.neotraits.uploader_view_model.UploaderViewModel.encrypted_aes_key = Str(field_type=<class ‘str’>, default=None, required=False)
Check our demo notebook on how to produce this key and how we expect your files to be encrypted

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

OPTIONS = {'EEG Sensors': 'EEG', 'MEG Sensors': 'MEG', 'Internal Sensors': 'Internal'}
sensors_file
sensors_type

tract_importer

class tvb.adapters.uploaders.tract_importer.TrackImporterForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcuploader.ABCUploaderForm

static get_upload_information()[source]
static get_view_model()[source]
class tvb.adapters.uploaders.tract_importer.TrackImporterModel(**kwargs)[source]

Bases: tvb.core.neotraits.uploader_view_model.UploaderViewModel

data_file : tvb.adapters.uploaders.tract_importer.TrackImporterModel.data_file = Str(field_type=<class ‘str’>, default=None, required=True)

region_volume : tvb.adapters.uploaders.tract_importer.TrackImporterModel.region_volume = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=False)

data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)

encrypted_aes_key : tvb.core.neotraits.uploader_view_model.UploaderViewModel.encrypted_aes_key = Str(field_type=<class ‘str’>, default=None, required=False)
Check our demo notebook on how to produce this key and how we expect your files to be encrypted

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

data_file
region_volume

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

class tvb.adapters.uploaders.tract_importer.TrackZipImporterForm(prefix='', project_id=None)[source]

Bases: tvb.adapters.uploaders.tract_importer.TrackImporterForm

class tvb.adapters.uploaders.tract_importer.TrackvizTractsImporter[source]

Bases: tvb.adapters.uploaders.tract_importer._TrackImporterBase

This imports tracts from the trackviz format

launch(data_file, region_volume=None)[source]
class tvb.adapters.uploaders.tract_importer.ZipTxtTractsImporter[source]

Bases: tvb.adapters.uploaders.tract_importer._TrackImporterBase

This imports tracts from a zip containing txt files. One txt file for a tract.

get_form_class()[source]
launch(view_model)[source]
tvb.adapters.uploaders.tract_importer.chunk_iter(iterable, n)[source]

Reads a generator in chunks. Yields lists. Last one may be smaller than n.

tvb_importer

class tvb.adapters.uploaders.tvb_importer.TVBImporter[source]

Bases: tvb.core.adapters.abcuploader.ABCUploader

This importer is responsible for loading of data types exported from other systems in TVB format (simple H5 file or ZIP file containing multiple H5 files)

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

Execute import operations: unpack ZIP, build and store generic DataType objects. :raises LaunchException: when data_file is None, nonexistent, or invalid (e.g. incomplete meta-data, not in ZIP / HDF5 format etc. )

class tvb.adapters.uploaders.tvb_importer.TVBImporterForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcuploader.ABCUploaderForm

static get_upload_information()[source]
static get_view_model()[source]
class tvb.adapters.uploaders.tvb_importer.TVBImporterModel(**kwargs)[source]

Bases: tvb.core.neotraits.uploader_view_model.UploaderViewModel

data_file : tvb.adapters.uploaders.tvb_importer.TVBImporterModel.data_file = Str(field_type=<class ‘str’>, default=None, required=True)

data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)

encrypted_aes_key : tvb.core.neotraits.uploader_view_model.UploaderViewModel.encrypted_aes_key = Str(field_type=<class ‘str’>, default=None, required=False)
Check our demo notebook on how to produce this key and how we expect your files to be encrypted

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

data_file

upload_algorithm_category_config

zip_connectivity_importer

class tvb.adapters.uploaders.zip_connectivity_importer.ZIPConnectivityImporter[source]

Bases: tvb.core.adapters.abcuploader.ABCUploader

Handler for uploading a Connectivity archive, with files holding text export of connectivity data from Numpy arrays.

AREA_TOKEN = 'area'
CENTRES_TOKEN = 'centres'
CENTRES_TOKEN2 = 'centers'
CORTICAL_INFO = 'cortical'
HEMISPHERE_INFO = 'hemisphere'
ORIENTATION_TOKEN = 'orientation'
TRACT_TOKEN = 'tract'
WEIGHT_TOKEN = 'weight'
get_form_class()[source]
get_output()[source]
launch(view_model)[source]

Execute import operations: unpack ZIP and build Connectivity object as result. :raises LaunchException: when uploaded is empty or nonexistent :raises Exception: when

  • weights or tracts matrix is invalid (negative values, wrong shape)
  • any of the vector orientation, areas, cortical or hemisphere is different from the expected number of nodes
class tvb.adapters.uploaders.zip_connectivity_importer.ZIPConnectivityImporterForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcuploader.ABCUploaderForm

static get_upload_information()[source]
static get_view_model()[source]
class tvb.adapters.uploaders.zip_connectivity_importer.ZIPConnectivityImporterModel(**kwargs)[source]

Bases: tvb.core.neotraits.uploader_view_model.UploaderViewModel

uploaded : tvb.adapters.uploaders.zip_connectivity_importer.ZIPConnectivityImporterModel.uploaded = Str(field_type=<class ‘str’>, default=None, required=True)

normalization : tvb.adapters.uploaders.zip_connectivity_importer.ZIPConnectivityImporterModel.normalization = Str(field_type=<class ‘str’>, default=None, required=False)
Normalization mode for weights

data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)

encrypted_aes_key : tvb.core.neotraits.uploader_view_model.UploaderViewModel.encrypted_aes_key = Str(field_type=<class ‘str’>, default=None, required=False)
Check our demo notebook on how to produce this key and how we expect your files to be encrypted

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

normalization
uploaded

zip_surface_importer

class tvb.adapters.uploaders.zip_surface_importer.ZIPSurfaceImporter[source]

Bases: tvb.core.adapters.abcuploader.ABCUploader

Handler for uploading a Surface Data archive, with files holding vertices, normals and triangles to represent a surface data.

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

Execute import operations: unpack ZIP and build Surface object as result :raises LaunchException: when

  • uploaded is missing
  • surface_type is invalid
Raises RuntimeError:
 when triangles contain an invalid vertex index
logger = <Logger tvb.adapters.uploaders.zip_surface_importer (INFO)>
class tvb.adapters.uploaders.zip_surface_importer.ZIPSurfaceImporterForm(prefix='', project_id=None)[source]

Bases: tvb.core.adapters.abcuploader.ABCUploaderForm

static get_upload_information()[source]
static get_view_model()[source]
class tvb.adapters.uploaders.zip_surface_importer.ZIPSurfaceImporterModel(**kwargs)[source]

Bases: tvb.core.neotraits.uploader_view_model.UploaderViewModel

uploaded : tvb.adapters.uploaders.zip_surface_importer.ZIPSurfaceImporterModel.uploaded = Str(field_type=<class ‘str’>, default=None, required=True)

surface_type : tvb.adapters.uploaders.zip_surface_importer.ZIPSurfaceImporterModel.surface_type = Str(field_type=<class ‘str’>, default=’Cortical Surface’, required=True)

zero_based_triangles : tvb.adapters.uploaders.zip_surface_importer.ZIPSurfaceImporterModel.zero_based_triangles = Attr(field_type=<class ‘bool’>, default=True, required=False)

should_center : tvb.adapters.uploaders.zip_surface_importer.ZIPSurfaceImporterModel.should_center = Attr(field_type=<class ‘bool’>, default=None, required=False)

data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)

encrypted_aes_key : tvb.core.neotraits.uploader_view_model.UploaderViewModel.encrypted_aes_key = Str(field_type=<class ‘str’>, default=None, required=False)
Check our demo notebook on how to produce this key and how we expect your files to be encrypted

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

should_center

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_type
uploaded
zero_based_triangles

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.