uploaders
Package¶
Define a list with all Python modules in which the introspection mechanism should search for Import Adapters.
bids_importer
¶
- class tvb.adapters.uploaders.bids_importer.BIDSImporter[source]¶
Bases:
ABCUploader
- COORDS_ROWS_KEY = 'CoordsRows'¶
- COORDS_TOKEN = 'coord'¶
- DISTANCES_FILE = 'distances.tsv'¶
- JSON_EXTENSION = '.json'¶
- NET_TOKEN = 'net'¶
- NORMALS_FILE = 'normals.tsv'¶
- SPATIAL_TOKEN = 'spatial'¶
- SUBJECT_PREFIX = 'sub'¶
- TRIANGLES_FILE = 'faces.tsv'¶
- TSV_EXTENSION = '.tsv'¶
- TS_TOKEN = 'ts'¶
- VERTICES_FILE = 'vertices.tsv'¶
- WEIGHTS_FILE = 'weights.tsv'¶
- WEIGHTS_JSON_FILE = 'weights.json'¶
- class tvb.adapters.uploaders.bids_importer.BIDSImporterForm[source]¶
Bases:
ABCUploaderForm
- class tvb.adapters.uploaders.bids_importer.BIDSImporterModel(**kwargs)[source]¶
Bases:
UploaderViewModel
Traited class [tvb.adapters.uploaders.bids_importer.BIDSImporterModel]¶
Attributes declared¶
- uploadedtvb.adapters.uploaders.bids_importer.BIDSImporterModel.uploaded = Str(field_type=<class ‘str’>, default=None, required=True)
data compatible with BIDS Extension Proposal 032 (BEP032): BIDS Computational Model Specification
data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)
- encrypted_aes_keytvb.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
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)
- uploaded¶
brco_importer
¶
- class tvb.adapters.uploaders.brco_importer.BRCOImporter[source]¶
Bases:
ABCUploader
Import connectivity data stored in the networkx gpickle format
- 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.uploaders.brco_importer.BRCOImporterForm[source]¶
Bases:
ABCUploaderForm
- class tvb.adapters.uploaders.brco_importer.BRCOImporterModel(**kwargs)[source]¶
Bases:
UploaderViewModel
Traited class [tvb.adapters.uploaders.brco_importer.BRCOImporterModel]¶
Attributes declared¶
data_file : tvb.adapters.uploaders.brco_importer.BRCOImporterModel.data_file = Str(field_type=<class ‘str’>, default=None, required=True)
- connectivitytvb.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_keytvb.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
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
- data_file¶
connectivity_measure_importer
¶
- class tvb.adapters.uploaders.connectivity_measure_importer.ConnectivityMeasureImporter[source]¶
Bases:
ABCUploader
This imports a searies of conectivity measures from a .mat file
- launch(view_model: ConnectivityMeasureImporterModel) [ConnectivityMeasureIndex] [source]¶
Execute import operations:
- class tvb.adapters.uploaders.connectivity_measure_importer.ConnectivityMeasureImporterForm[source]¶
Bases:
ABCUploaderForm
- class tvb.adapters.uploaders.connectivity_measure_importer.ConnectivityMeasureImporterModel(**kwargs)[source]¶
Bases:
UploaderViewModel
Traited class [tvb.adapters.uploaders.connectivity_measure_importer.ConnectivityMeasureImporterModel]¶
Attributes declared¶
data_file : tvb.adapters.uploaders.connectivity_measure_importer.ConnectivityMeasureImporterModel.data_file = Str(field_type=<class ‘str’>, default=None, required=True)
- dataset_nametvb.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
- connectivitytvb.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_keytvb.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
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
- 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:
ABCUploader
Handler for uploading a Connectivity csv from the dti pipeline
- TRACT_FILE = 'tract_lengths.txt'¶
- WEIGHTS_FILE = 'weights.txt'¶
- launch(view_model: CSVConnectivityImporterModel) ConnectivityIndex [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[source]¶
Bases:
ABCUploaderForm
- class tvb.adapters.uploaders.csv_connectivity_importer.CSVConnectivityImporterModel(**kwargs)[source]¶
Bases:
UploaderViewModel
Traited class [tvb.adapters.uploaders.csv_connectivity_importer.CSVConnectivityImporterModel]¶
Attributes declared¶
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 = EnumAttr(field_type=<enum ‘CSVDelimiterOptionsEnum’>, default=<CSVDelimiterOptionsEnum.COMMA: ‘,’>, 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 = EnumAttr(field_type=<enum ‘CSVDelimiterOptionsEnum’>, default=<CSVDelimiterOptionsEnum.COMMA: ‘,’>, 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_keytvb.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
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
- tracts¶
- tracts_delimiter¶
- weights¶
- weights_delimiter¶
- class tvb.adapters.uploaders.csv_connectivity_importer.CSVConnectivityParser(csv_file, delimiter=',')[source]¶
Bases:
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¶
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:
ABCUploader
This importer is responsible for import of surface from GIFTI format (XML file) and store them in TVB as Surface.
- launch(view_model: GIFTISurfaceImporterModel) [SurfaceIndex] [source]¶
Execute import operations:
- class tvb.adapters.uploaders.gifti_surface_importer.GIFTISurfaceImporterForm[source]¶
Bases:
ABCUploaderForm
- class tvb.adapters.uploaders.gifti_surface_importer.GIFTISurfaceImporterModel(**kwargs)[source]¶
Bases:
UploaderViewModel
Traited class [tvb.adapters.uploaders.gifti_surface_importer.GIFTISurfaceImporterModel]¶
Attributes declared¶
file_type : tvb.adapters.uploaders.gifti_surface_importer.GIFTISurfaceImporterModel.file_type = EnumAttr(field_type=<enum ‘SurfaceTypesEnum’>, default=<SurfaceTypesEnum.CORTICAL_SURFACE: ‘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_keytvb.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
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_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.
gifti_timeseries_importer
¶
- class tvb.adapters.uploaders.gifti_timeseries_importer.GIFTITimeSeriesImporter[source]¶
Bases:
ABCUploader
This importer is responsible for import of a TimeSeries from GIFTI format (XML file) and store them in TVB.
- launch(view_model: GIFTITimeSeriesImporterModel) [TimeSeriesSurfaceIndex] [source]¶
Execute import operations:
- class tvb.adapters.uploaders.gifti_timeseries_importer.GIFTITimeSeriesImporterForm[source]¶
Bases:
ABCUploaderForm
- class tvb.adapters.uploaders.gifti_timeseries_importer.GIFTITimeSeriesImporterModel(**kwargs)[source]¶
Bases:
UploaderViewModel
Traited class [tvb.adapters.uploaders.gifti_timeseries_importer.GIFTITimeSeriesImporterModel]¶
Attributes declared¶
data_file : tvb.adapters.uploaders.gifti_timeseries_importer.GIFTITimeSeriesImporterModel.data_file = Str(field_type=<class ‘str’>, default=None, required=True)
- surfacetvb.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_keytvb.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
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_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:
RegionMatTimeSeriesImporterModel
Traited class [tvb.adapters.uploaders.mat_timeseries_eeg_importer.EEGMatTimeSeriesImporterModel]¶
Attributes declared¶
datatype : tvb.adapters.uploaders.mat_timeseries_eeg_importer.EEGMatTimeSeriesImporterModel.datatype = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)
data_file : tvb.adapters.uploaders.mat_timeseries_importer.RegionMatTimeSeriesImporterModel.data_file = Str(field_type=<class ‘str’>, default=None, required=True)
- dataset_nametvb.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)
data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)
- encrypted_aes_keytvb.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
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
mat_timeseries_importer
¶
- class tvb.adapters.uploaders.mat_timeseries_importer.RegionMatTimeSeriesImporterForm[source]¶
Bases:
ABCUploaderForm
- class tvb.adapters.uploaders.mat_timeseries_importer.RegionMatTimeSeriesImporterModel(**kwargs)[source]¶
Bases:
UploaderViewModel
Traited class [tvb.adapters.uploaders.mat_timeseries_importer.RegionMatTimeSeriesImporterModel]¶
Attributes declared¶
data_file : tvb.adapters.uploaders.mat_timeseries_importer.RegionMatTimeSeriesImporterModel.data_file = Str(field_type=<class ‘str’>, default=None, required=True)
- dataset_nametvb.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_keytvb.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
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_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:
ABCUploader
Import time series from a .mat file.
- launch(view_model: RegionMatTimeSeriesImporterModel) [TimeSeriesRegionIndex, TimeSeriesEEGIndex] [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
- ts_builder = {'EEG': <function RegionTimeSeriesImporter.create_eeg_ts>, 'Region': <function RegionTimeSeriesImporter.create_region_ts>}¶
- tstype = 'Region'¶
networkx_importer
¶
- class tvb.adapters.uploaders.networkx_importer.NetworkxConnectivityImporter[source]¶
Bases:
ABCUploader
Import connectivity data stored in the networkx gpickle format
- launch(view_model: NetworkxImporterModel) [ConnectivityIndex] [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.uploaders.networkx_importer.NetworkxConnectivityImporterForm[source]¶
Bases:
ABCUploaderForm
- class tvb.adapters.uploaders.networkx_importer.NetworkxImporterModel(**kwargs)[source]¶
Bases:
UploaderViewModel
Traited class [tvb.adapters.uploaders.networkx_importer.NetworkxImporterModel]¶
Attributes declared¶
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_keytvb.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
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_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:
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.
- launch(view_model: NIFTIImporterModel) [VolumeIndex, StructuralMRIIndex, TimeSeriesVolumeIndex, RegionVolumeMappingIndex] [source]¶
Execute import operations:
- class tvb.adapters.uploaders.nifti_importer.NIFTIImporterForm[source]¶
Bases:
ABCUploaderForm
- class tvb.adapters.uploaders.nifti_importer.NIFTIImporterModel(**kwargs)[source]¶
Bases:
UploaderViewModel
Traited class [tvb.adapters.uploaders.nifti_importer.NIFTIImporterModel]¶
Attributes declared¶
data_file : tvb.adapters.uploaders.nifti_importer.NIFTIImporterModel.data_file = Str(field_type=<class ‘str’>, default=None, required=True)
- one_basedtvb.adapters.uploaders.nifti_importer.NIFTIImporterModel.one_based = Attr(field_type=<class ‘bool’>, default=None, required=False)
Check this when the NII mapping has values [0..N] with 0 the background, instead of [-1..N-1]
- apply_correctionstvb.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_filetvb.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
- connectivitytvb.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_keytvb.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
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)
- 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¶
- one_based¶
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.
obj_importer
¶
- class tvb.adapters.uploaders.obj_importer.ObjSurfaceImporter[source]¶
Bases:
ABCUploader
This imports geometry data stored in wavefront obj format
- launch(view_model: ObjSurfaceImporterModel) [SurfaceIndex] [source]¶
Execute import operations:
- class tvb.adapters.uploaders.obj_importer.ObjSurfaceImporterForm[source]¶
Bases:
ABCUploaderForm
- class tvb.adapters.uploaders.obj_importer.ObjSurfaceImporterModel(**kwargs)[source]¶
Bases:
UploaderViewModel
Traited class [tvb.adapters.uploaders.obj_importer.ObjSurfaceImporterModel]¶
Attributes declared¶
surface_type : tvb.adapters.uploaders.obj_importer.ObjSurfaceImporterModel.surface_type = EnumAttr(field_type=<enum ‘SurfaceTypesEnum’>, default=<SurfaceTypesEnum.CORTICAL_SURFACE: ‘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_keytvb.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
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_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[source]¶
Bases:
ABCUploaderForm
- class tvb.adapters.uploaders.projection_matrix_importer.ProjectionMatrixImporterModel(**kwargs)[source]¶
Bases:
UploaderViewModel
Traited class [tvb.adapters.uploaders.projection_matrix_importer.ProjectionMatrixImporterModel]¶
Attributes declared¶
- projection_filetvb.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_nametvb.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
- surfacetvb.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.
- sensorstvb.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_keytvb.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
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)
- 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:
ABCUploader
Upload ProjectionMatrix Cortical Surface -> EEG/MEG/SEEG Sensors from a MAT or NPY file.
- launch(view_model: ProjectionMatrixImporterModel) [ProjectionMatrixIndex] [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: SensorsIndex) str [source]¶
region_mapping_importer
¶
- class tvb.adapters.uploaders.region_mapping_importer.RegionMappingImporter[source]¶
Bases:
ABCUploader
Upload RegionMapping from a TXT, ZIP or BZ2 file.
- launch(view_model: RegionMappingImporterModel) [RegionMappingIndex] [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[source]¶
Bases:
ABCUploaderForm
- class tvb.adapters.uploaders.region_mapping_importer.RegionMappingImporterModel(**kwargs)[source]¶
Bases:
UploaderViewModel
Traited class [tvb.adapters.uploaders.region_mapping_importer.RegionMappingImporterModel]¶
Attributes declared¶
- mapping_filetvb.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.
- surfacetvb.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.
- connectivitytvb.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_keytvb.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
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
- 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:
ABCUploader
Upload Sensors from a TXT file.
- launch(view_model: SensorsImporterModel) [SensorsIndex] [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[source]¶
Bases:
ABCUploaderForm
- class tvb.adapters.uploaders.sensors_importer.SensorsImporterModel(**kwargs)[source]¶
Bases:
UploaderViewModel
Traited class [tvb.adapters.uploaders.sensors_importer.SensorsImporterModel]¶
Attributes declared¶
- sensors_filetvb.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 = EnumAttr(field_type=<enum ‘SensorTypesEnum’>, default=<SensorTypesEnum.TYPE_EEG: ‘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_keytvb.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
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)
- OPTIONS = {'EEG Sensors': 'EEG', 'Internal Sensors': 'Internal', 'MEG Sensors': 'MEG'}¶
- sensors_file¶
- sensors_type¶
tract_importer
¶
- class tvb.adapters.uploaders.tract_importer.TrackImporterForm[source]¶
Bases:
ABCUploaderForm
- class tvb.adapters.uploaders.tract_importer.TrackImporterModel(**kwargs)[source]¶
Bases:
UploaderViewModel
Traited class [tvb.adapters.uploaders.tract_importer.TrackImporterModel]¶
Attributes declared¶
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=True)
data_subject : tvb.core.neotraits.uploader_view_model.UploaderViewModel.data_subject = Str(field_type=<class ‘str’>, default=’John Doe’, required=True)
- encrypted_aes_keytvb.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
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_file¶
- region_volume¶
Keep a GID but also link the type of DataType it should point to
- class tvb.adapters.uploaders.tract_importer.TrackZipImporterForm[source]¶
Bases:
TrackImporterForm
- class tvb.adapters.uploaders.tract_importer.TrackvizTractsImporter[source]¶
Bases:
_TrackImporterBase
This imports tracts from the trackviz format
- 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.uploaders.tract_importer.ZipTxtTractsImporter[source]¶
Bases:
_TrackImporterBase
This imports tracts from a zip containing txt files. One txt file for a tract.
- launch(view_model: TrackImporterModel) [TractsIndex] [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
tumor_dataset_importer
¶
Import Brain Tumor dataset
- class tvb.adapters.uploaders.tumor_dataset_importer.TumorDatasetImporter[source]¶
Bases:
ABCAdapter
- CONN_ZIP_FILE = 'SC.zip'¶
- FC_DATASET_NAME = 'FC_cc_DK68'¶
- FC_MAT_FILE = 'FC.mat'¶
- MAXIMUM_DOWNLOAD_RETRIES = 3¶
- SLEEP_TIME = 3¶
- TIME_SERIES_CSV_FILE = 'HRF.csv'¶
- get_required_disk_size(view_model)[source]¶
Abstract method to be implemented in each adapter. Should return the required memory for launching the adapter in kilo-Bytes.
- 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: TumorDatasetImporterModel) [] [source]¶
Download the Tumor Dataset and then import its data (currently only the connectivities and pearson coefficients (FC) are imported).
- class tvb.adapters.uploaders.tumor_dataset_importer.TumorDatasetImporterForm[source]¶
Bases:
ABCUploaderForm
- class tvb.adapters.uploaders.tumor_dataset_importer.TumorDatasetImporterModel(**kwargs)[source]¶
Bases:
ViewModel
Traited class [tvb.adapters.uploaders.tumor_dataset_importer.TumorDatasetImporterModel]¶
Attributes declared¶
data_file : tvb.adapters.uploaders.tumor_dataset_importer.TumorDatasetImporterModel.data_file = Str(field_type=<class ‘str’>, 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)
- data_file¶
tvb_importer
¶
- class tvb.adapters.uploaders.tvb_importer.TVBImporter[source]¶
Bases:
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)
- LINKS = 'Links'¶
- launch(view_model: TVBImporterModel) [] [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[source]¶
Bases:
ABCUploaderForm
- class tvb.adapters.uploaders.tvb_importer.TVBImporterModel(**kwargs)[source]¶
Bases:
UploaderViewModel
Traited class [tvb.adapters.uploaders.tvb_importer.TVBImporterModel]¶
Attributes declared¶
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_keytvb.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
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_file¶
zip_connectivity_importer
¶
- class tvb.adapters.uploaders.zip_connectivity_importer.ZIPConnectivityImporter[source]¶
Bases:
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'¶
- launch(view_model: ZIPConnectivityImporterModel) [ConnectivityIndex] [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[source]¶
Bases:
ABCUploaderForm
- class tvb.adapters.uploaders.zip_connectivity_importer.ZIPConnectivityImporterModel(**kwargs)[source]¶
Bases:
UploaderViewModel
Traited class [tvb.adapters.uploaders.zip_connectivity_importer.ZIPConnectivityImporterModel]¶
Attributes declared¶
uploaded : tvb.adapters.uploaders.zip_connectivity_importer.ZIPConnectivityImporterModel.uploaded = Str(field_type=<class ‘str’>, default=None, required=True)
- normalizationtvb.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_keytvb.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
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)
- normalization¶
- uploaded¶
zip_surface_importer
¶
- class tvb.adapters.uploaders.zip_surface_importer.ZIPSurfaceImporter[source]¶
Bases:
ABCUploader
Handler for uploading a Surface Data archive, with files holding vertices, normals and triangles to represent a surface data.
- launch(view_model: ZIPSurfaceImporterModel) [SurfaceIndex] [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[source]¶
Bases:
ABCUploaderForm
- class tvb.adapters.uploaders.zip_surface_importer.ZIPSurfaceImporterModel(**kwargs)[source]¶
Bases:
UploaderViewModel
Traited class [tvb.adapters.uploaders.zip_surface_importer.ZIPSurfaceImporterModel]¶
Attributes declared¶
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 = EnumAttr(field_type=<enum ‘SurfaceTypesEnum’>, default=<SurfaceTypesEnum.CORTICAL_SURFACE: ‘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_keytvb.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
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)
- 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.
Subpackages¶
brco
Packageparser
XMLParser
XMLParser.ATTR_ONTOLOGY_DEFINITION
XMLParser.ATTR_ONTOLOGY_LABEL
XMLParser.ATTR_ONTOLOGY_RELATION
XMLParser.ATTR_ONTOLOGY_SYN
XMLParser.ATTR_ONTOLOGY_URI
XMLParser.ATTR_TVB_ID
XMLParser.ATTR_TVB_LABEL
XMLParser.LOGGER
XMLParser.PREFIX_LEFT
XMLParser.PREFIX_RIGHT
XMLParser.PREFIX_TVB_ID
XMLParser.read_annotation_terms()
gifti
Packagemat
Packagenetworkx_connectivity
Packageparser
NetworkxParser
NetworkxParser.HEMISPHERE_RIGHT
NetworkxParser.KEY_EDGE_TRACT
NetworkxParser.KEY_EDGE_WEIGHT
NetworkxParser.KEY_NODE_COORDINATES
NetworkxParser.KEY_NODE_HEMISPHERE
NetworkxParser.KEY_NODE_LABEL
NetworkxParser.KEY_NODE_REGION
NetworkxParser.OPERATORS
NetworkxParser.REGION_CORTICAL
NetworkxParser.parse()
nifti
Packageobj
Packagezip_surface
Package