creators
Package¶
allen_creator
¶
The adapters in this module create new connectivities from the Allen Institute data using their SDK.
- class tvb.adapters.creators.allen_creator.AllenConnectModel(**kwargs)[source]¶
Bases:
ViewModel
Traited class [tvb.adapters.creators.allen_creator.AllenConnectModel]¶
Attributes declared¶
- resolutiontvb.adapters.creators.allen_creator.AllenConnectModel.resolution = EnumAttr(field_type=<enum ‘ResolutionOptionsEnum’>, default=<ResolutionOptionsEnum.ONE_HUNDRED: 100>, required=True)
resolution
weighting : tvb.adapters.creators.allen_creator.AllenConnectModel.weighting = EnumAttr(field_type=<enum ‘WeightsOptionsEnum’>, default=<WeightsOptionsEnum.PROJECTION_DENSITY_INJECTION_DENSITY: 1>, required=True)
1: download injection density <br/> 2: download projection density <br/> 3: download projection energy <br/>
- inj_f_threshtvb.adapters.creators.allen_creator.AllenConnectModel.inj_f_thresh = Float(field_type=<class ‘float’>, default=80, required=True)
To build the volume and the connectivity select only the areas that have a volume greater than (micron^3):
- vol_threshtvb.adapters.creators.allen_creator.AllenConnectModel.vol_thresh = Float(field_type=<class ‘float’>, default=1000000000, required=True)
To build the connectivity select only the experiment where the percentage of infected voxels in the injection structure is greater than:
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)
- inj_f_thresh¶
Declares a float. This is different from Attr(field_type=float). The former enforces float subtypes. This allows any type that can be safely cast to the declared float type according to numpy rules.
Reading and writing this attribute is slower than a plain python attribute. In performance sensitive code you might want to use plain python attributes or even better local variables.
- resolution¶
- vol_thresh¶
Declares a float. This is different from Attr(field_type=float). The former enforces float subtypes. This allows any type that can be safely cast to the declared float type according to numpy rules.
Reading and writing this attribute is slower than a plain python attribute. In performance sensitive code you might want to use plain python attributes or even better local variables.
- weighting¶
- class tvb.adapters.creators.allen_creator.AllenConnectomeBuilder[source]¶
Bases:
ABCAdapter
Handler for uploading a mouse connectivity from Allen dataset using AllenSDK.
- 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)[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.creators.allen_creator.AllenConnectomeBuilderForm[source]¶
Bases:
ABCAdapterForm
- static get_filters()[source]¶
Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain
- static get_input_name()[source]¶
The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str
- class tvb.adapters.creators.allen_creator.ResolutionOptionsEnum(value)[source]¶
Bases:
TVBEnum
An enumeration.
- FIFTY = 50¶
- ONE_HUNDRED = 100¶
- TWENTY_FIVE = 25¶
- class tvb.adapters.creators.allen_creator.WeightsOptionsEnum(value)[source]¶
Bases:
TVBEnum
An enumeration.
- PROJECTION_DENSITY = 2¶
- PROJECTION_DENSITY_INJECTION_DENSITY = 1¶
- PROJECTION_ENERGY = 3¶
- tvb.adapters.creators.allen_creator.areas_volume_threshold(tvb_mcc, projmaps, vol_thresh, resolution)[source]¶
the method includes in the parcellation only brain regions whose volume is greater than vol_thresh
- tvb.adapters.creators.allen_creator.create_file_order(projmaps, structure_tree)[source]¶
the method creates file order and keyord that will be the link between the structural conn order and the id key in the Allen database
- tvb.adapters.creators.allen_creator.download_an_construct_matrix(tvb_mcc, weighting, ist2e, transgenic_line)[source]¶
- tvb.adapters.creators.allen_creator.mouse_brain_visualizer(vol, order, key_ord, unique_parents, unique_grandparents, structure_tree, projmaps)[source]¶
the method returns a volume indexed between 0 and N-1, with N=tot brain areas in the parcellation. -1=background and areas that are not in the parcellation
connectivity_creator
¶
- class tvb.adapters.creators.connectivity_creator.ConnectivityCreator[source]¶
Bases:
ABCAdapter
This adapter creates a Connectivity.
- 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.
- class tvb.adapters.creators.connectivity_creator.ConnectivityCreatorForm[source]¶
Bases:
ABCAdapterForm
- static get_filters()[source]¶
Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain
- static get_input_name()[source]¶
The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str
- class tvb.adapters.creators.connectivity_creator.ConnectivityCreatorModel(**kwargs)[source]¶
Bases:
ViewModel
Traited class [tvb.adapters.creators.connectivity_creator.ConnectivityCreatorModel]¶
Attributes declared¶
original_connectivity : tvb.adapters.creators.connectivity_creator.ConnectivityCreatorModel.original_connectivity = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)
new_weights : tvb.adapters.creators.connectivity_creator.ConnectivityCreatorModel.new_weights = NArray(label=’Weights json array’, dtype=float64, default=None, dim_names=(), ndim=None, required=True)
new_tracts : tvb.adapters.creators.connectivity_creator.ConnectivityCreatorModel.new_tracts = NArray(label=’Tracts json array’, dtype=float64, default=None, dim_names=(), ndim=None, required=True)
interest_area_indexes : tvb.adapters.creators.connectivity_creator.ConnectivityCreatorModel.interest_area_indexes = NArray(label=’Indices of selected nodes as json array’, dtype=int64, default=None, dim_names=(), ndim=None, required=True)
is_branch : tvb.adapters.creators.connectivity_creator.ConnectivityCreatorModel.is_branch = Attr(field_type=<class ‘bool’>, default=None, required=False)
operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)
ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)
range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)
is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)
gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)
- interest_area_indexes¶
Declares a numpy array. dtype enforces the dtype. The default dtype is float64. An optional symbolic shape can be given, as a tuple of Dim attributes from the owning class. The shape will be enforced, but no broadcasting will be done. domain declares what values are allowed in this array. It can be any object that can be checked for membership Defaults are checked if they are in the declared domain. For performance reasons this does not happen on every attribute set.
- is_branch¶
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.
- new_tracts¶
Declares a numpy array. dtype enforces the dtype. The default dtype is float64. An optional symbolic shape can be given, as a tuple of Dim attributes from the owning class. The shape will be enforced, but no broadcasting will be done. domain declares what values are allowed in this array. It can be any object that can be checked for membership Defaults are checked if they are in the declared domain. For performance reasons this does not happen on every attribute set.
- new_weights¶
Declares a numpy array. dtype enforces the dtype. The default dtype is float64. An optional symbolic shape can be given, as a tuple of Dim attributes from the owning class. The shape will be enforced, but no broadcasting will be done. domain declares what values are allowed in this array. It can be any object that can be checked for membership Defaults are checked if they are in the declared domain. For performance reasons this does not happen on every attribute set.
- original_connectivity¶
Keep a GID but also link the type of DataType it should point to
local_connectivity_creator
¶
- class tvb.adapters.creators.local_connectivity_creator.LocalConnectivityCreator[source]¶
Bases:
ABCAdapter
The purpose of this adapter is create a LocalConnectivity.
- KEY_CUTOFF = 'cutoff'¶
- KEY_DISPLAY_NAME = 'display_name'¶
- KEY_EQUATION = 'equation'¶
- KEY_SURFACE = 'surface'¶
- get_required_disk_size(view_model: LocalConnectivityCreatorModel) int [source]¶
Returns the required disk size to be able to run the adapter. (in kB)
- get_required_memory_size(view_model: LocalConnectivityCreatorModel) int [source]¶
Return the required memory to run this algorithm.
- launch(view_model: LocalConnectivityCreatorModel) [LocalConnectivityIndex] [source]¶
Used for creating a LocalConnectivity
- class tvb.adapters.creators.local_connectivity_creator.LocalConnectivityCreatorForm[source]¶
Bases:
ABCAdapterForm
- NAME_EQUATION_PARAMS_DIV = 'spatial_params'¶
- fill_from_trait(trait: LocalConnectivityCreatorModel) None [source]¶
Sets data for all traited fields from a trait instance. Note that FormFields are not TraitFields, so this does not work recursively Override to fill in sub-forms
- static get_filters()[source]¶
Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain
- static get_input_name()[source]¶
The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str
- class tvb.adapters.creators.local_connectivity_creator.LocalConnectivityCreatorModel(**kwargs)[source]¶
Bases:
ViewModel
,LocalConnectivity
,SpatialModel
Traited class [tvb.adapters.creators.local_connectivity_creator.LocalConnectivityCreatorModel]¶
Attributes declared¶
surface : tvb.adapters.creators.local_connectivity_creator.LocalConnectivityCreatorModel.surface = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)
display_name : tvb.adapters.creators.local_connectivity_creator.LocalConnectivityCreatorModel.display_name = Str(field_type=<class ‘str’>, default=None, required=False)
operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)
ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)
range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)
is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)
matrix : tvb.datatypes.local_connectivity.LocalConnectivity.matrix = Attr(field_type=<class ‘scipy.sparse._base.spmatrix’>, default=None, required=False)
equation : tvb.datatypes.local_connectivity.LocalConnectivity.equation = Attr(field_type=<class ‘tvb.datatypes.equations.FiniteSupportEquation’>, default=<tvb.datatypes.equations.Gaussian object at 0x7f5d8c930070>, required=False)
- cutofftvb.datatypes.local_connectivity.LocalConnectivity.cutoff = Float(field_type=<class ‘float’>, default=40.0, required=True)
Distance at which to truncate the evaluation in mm.
gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)
- display_name¶
- surface¶
Keep a GID but also link the type of DataType it should point to
- class tvb.adapters.creators.local_connectivity_creator.LocalConnectivitySelectorForm[source]¶
Bases:
ABCAdapterForm
- static get_filters()[source]¶
Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain
siibra_base
¶
Utility functions for using siibra to extract Structural and Functional connectivities
- class tvb.adapters.creators.siibra_base.Component2Modality(value)[source]¶
Bases:
Enum
An enumeration.
- FUNCTIONAL_CONNECTIVITY = <class 'siibra.features.connectivity.functional_connectivity.FunctionalConnectivity'>¶
- TRACTS = <class 'siibra.features.connectivity.streamline_lengths.StreamlineLengths'>¶
- WEIGHTS = <class 'siibra.features.connectivity.streamline_counts.StreamlineCounts'>¶
- tvb.adapters.creators.siibra_base.check_atlas_parcellation_compatible(atlas, parcellation)[source]¶
Given an atlas and a parcellation, verify that the atlas contains the parcellation, i.e. they are compatible
- tvb.adapters.creators.siibra_base.create_tvb_connectivity_measure(siibra_fc, structural_connectivity, siibra_fc_name)[source]¶
Given a FunctionalConnectivity from siibra TVB Structural Connectivity (both for the same subject), return a TVB ConnectivityMeasure containing those 2 connectivities :param: siibra_fc - pandas.Dataframe matrix from siibra containing a functional connectivity :param: structural_connectivity - a TVB structural connectivity :param: siibra_fc_name - the name of the siibra functional connectivity object :return: conn_measure - tvb.datatypes.graph.ConnectivityMeasure representing a functional connectivity
- tvb.adapters.creators.siibra_base.create_tvb_structural_connectivity(weights_matrix: pandas.DataFrame, tracts_matrix: pandas.DataFrame, region_names: list, hemispheres: list, positions: list) tvb.datatypes.connectivity.Connectivity [source]¶
Create and configure a TVB Connectivity, based on its components obtained from siibra. :param: weights_matrix - pandas.DataFrame matrix for weights; obtained from siibra :param: tracts_matrix - pandas.DataFrame matrix for tracts; obtained from siibra :param: region_names - list of str containing the names of the regions for which the connectivity is computed :param: hemispheres - list of ints, corresponding to the hemisphere that each region from region_names belongs to :param: positions - list of tuples, corresponding to region coordinates for each region from `region_names :return: conn - a tvb.datatypes.connectivity.Connectivity object
- tvb.adapters.creators.siibra_base.get_atlases_for_parcellation(parcelation)[source]¶
Given a parcelation, return all the atlases that contain it
- tvb.adapters.creators.siibra_base.get_cohorts_for_sc(parcellation_name)[source]¶
Given a parcellation name, return the name of all the cohorts related to it and containing data about Structural Connectivities.
- tvb.adapters.creators.siibra_base.get_connectivities_from_kg(atlas=None, parcellation=None, cohort='HCP', subject_ids=None, compute_fc=False)[source]¶
Compute the TVB Structural Connectivities and optionally Functional Connectivities for the selected subjects :param: atlas - str specifying the atlas name :param: parcellation - str specifying the parcellation name :param: cohort - str specifying the cohort name :param: subject_ids - unparsed str specifying the subject ids for which the connectivities will be retrieved :param: compute_fc - boolean value indicating if for the specified subjects the functional connectivities should also be retrieved :return: (sc_dict, conn_measures_dict) - tuple containing 2 dictionaries: one with structural connectivities and one for functional connectivities; for each dictionary, the keys are the subject ids and the values are the connectivities
- tvb.adapters.creators.siibra_base.get_connectivity_matrix(parcellation: siibra.core.parcellation.Parcellation, cohort: str, subjects: list, component: Component2Modality) {} [source]¶
Retrieve the structural connectivity components (weights/tracts) for all the subjects provided, for the specified parcellation and cohort. The matrices are returned inside a dictionary, where the keys are the subject ids and the values represent the connectivity matrix. :param: parcellation - siibra Parcellation object for which we compute the connectivity matrices :param: cohort - name of cohort for which we compute the connectivity matrices :param: subjects - list containing the subject ids as strings :param: component - enum value specifying the connectivity component we want, weights or tracts return: conn_matrices - dict where key is the subject id and value is the conn. matrix
- tvb.adapters.creators.siibra_base.get_connectivity_measures_from_kg(atlas=None, parcellation=None, cohort=None, subject_ids=None, structural_connectivities=None)[source]¶
Return a dictionary of TVB Connectivity Measures using data from siibra and the KG, based on the specified atlas, parcelation and cohort, and for the specified subjects :param: atlas - str specifying the atlas name :param: parcellation - str specifying the parcellation name :param: cohort - str specifying the cohort name :param: subject_ids - unparsed str specifying the subject ids for which the connectivities will be retrieved :param: structural_connectivities - dict of TVB Structural Connectivities computed for the subjects from subject_ids, where subject ids are keys and the structural connectivities are values :return: conn_measures - dict containing TVB Connectivity Measures as values and the subject ids as keys
- tvb.adapters.creators.siibra_base.get_functional_connectivity_matrix(parcellation, cohort, subject)[source]¶
Get all the functional connectivities for the specified parcellation, cohort and just ONE specific subject; In v1.0a5 of siibra, for HCP cohort there are 5 groups of functional connectivities; each group contains 1 Functional connectivity for each subject addressed in the research :param: parcellation - siibra Parcellation object :param: cohort - str specifying the cohort name :param: subject - str specifying exactly one subject id :return: (fcs_list, fcs_names_list) - tuple containing 2 lists; fcs_list contains pandas.Dataframe matrices and fcs_names_list contains the name for each matrix from the previous list, obtained from the file they are stored in the KG
- tvb.adapters.creators.siibra_base.get_hemispheres_for_regions(region_names)[source]¶
Given a list of region names, compute the hemispheres to which they belon to. 0 means the region belongs to the left hemisphere, 1 means it belongs to the right hemisphere (according to TVB convention). :param: region_names - list of str containing the names of the regions :return: hemi - list of ints indicating the hemisphere for each region in region_names
- tvb.adapters.creators.siibra_base.get_parcellations_for_atlas(atlas)[source]¶
Given an atlas, return a list of all the parcellations inside it, which contain Structural conns.
- tvb.adapters.creators.siibra_base.get_regions_positions(regions)[source]¶
Given a list of siibra regions, compute the positions of their centroids. :param: regions - list of siibra Regions :return: positions - list of tuples; each tuple represents the position of a region and contains 3 floating point coordinates
- tvb.adapters.creators.siibra_base.get_structural_connectivities_from_kg(atlas=None, parcellation=None, cohort=None, subject_ids=None)[source]¶
Return a dictionary of TVB Structural Connectivities using data from siibra and the KG, based on the specified atlas, parcelation and cohort, and for the specified subjects :param: atlas - str specifying the atlas name :param: parcellation - str specifying the parcellation name :param: cohort - str specifying the cohort name :param: subject_ids - unparsed str specifying the subject ids for which the connectivities will be retrived :return: connectivities - dict containing tvb structural Connectivities as values and the subject ids as keys
- tvb.adapters.creators.siibra_base.init_siibra_params(atlas_name, parcellation_name, cohort_name, subject_ids)[source]¶
Initialize siibra parameters (if some were not given) and check the compatibility of the provided parameters. :param: atlas_name - name of atlas as str :param: parcellation_name - name of parcellation as str :param: cohort_name - name of cohort as str :param: subject_ids - list of unparsed subject ids given as str :return: (atlas, parcellation, cohort_name, subject_ids) - tuple containing a siibra atlas object, a siibra parcellation object and a cohort name, all compatible with each other, and a list of parsed ids
siibra_creator
¶
The adapter in this module creates new Structural and Functional Connectivities by extracting data from the EBRAINS Knowledge Graph using siibra
- tvb.adapters.creators.siibra_creator.ATLAS_OPTS¶
alias of
AtlasOptions
- tvb.adapters.creators.siibra_creator.COHORT_OPTS¶
alias of
CohortOptions
- tvb.adapters.creators.siibra_creator.PARCELLATION_OPTS¶
alias of
ParcellationOptions
- class tvb.adapters.creators.siibra_creator.SiibraCreator[source]¶
Bases:
ABCAdapter
The purpose of this creator is to use siibra in order to create Structural and Functional Connectivities
- 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)[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.creators.siibra_creator.SiibraCreatorForm[source]¶
Bases:
ABCAdapterForm
- static get_filters()[source]¶
Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain
- static get_input_name()[source]¶
The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str
- class tvb.adapters.creators.siibra_creator.SiibraModel(**kwargs)[source]¶
Bases:
ViewModel
Traited class [tvb.adapters.creators.siibra_creator.SiibraModel]¶
Attributes declared¶
- atlastvb.adapters.creators.siibra_creator.SiibraModel.atlas = EnumAttr(field_type=<enum ‘AtlasOptions’>, default=<AtlasOptions.Multilevel Human Atlas: ‘Multilevel Human Atlas’>, required=True)
Atlas to be used
- parcellationtvb.adapters.creators.siibra_creator.SiibraModel.parcellation = EnumAttr(field_type=<enum ‘ParcellationOptions’>, default=<ParcellationOptions.Julich-Brain Cytoarchitectonic Atlas (v3.0.3): ‘Julich-Brain Cytoarchitectonic Atlas (v3.0.3)’>, required=True)
Parcellation to be used
- cohorttvb.adapters.creators.siibra_creator.SiibraModel.cohort = EnumAttr(field_type=<enum ‘CohortOptions’>, default=<CohortOptions.HCP: ‘HCP’>, required=True)
Cohort to be used
- subject_idstvb.adapters.creators.siibra_creator.SiibraModel.subject_ids = Str(field_type=<class ‘str’>, default=’000’, required=True)
The list of all subject IDs for which the structural and optionally functional connectivities are computed. Depending on the selected cohort, you can specify the IDs in the following ways: <br/> a) For the “HCP” cohort, the subject IDs are: 000,001,002, etc. Each subject has exactly one subject ID associated to them. Thus, there are 3 ways to specify the IDs:<br/> 1. individually, delimited by a semicolon symbol: 000;001;002. <br/> 2. As a range, specifying the first and last IDs: 000-050 will retrieve all the subjects starting with subject 000 until subject 050 (51 subjects). <br/> A combination of the 2 methods is also supported: 000-005;010 will retrieve all the subjects starting with subject 000 until subject 005 (6 subjects) AND subject 010 (so 7 subjects in total)<br/> <br/> b) For “1000BRAINS” cohort, the subject IDs have to parts: first part is the subject ID, which has the form: 0001, 0002, etc., and the second part is the scanning session index, which has the form _1, _2. All subjects had between 1 and 2 scanning sessions. Thus, the final IDs will look like: 0001_1, 0001_2, 0002_1, etc. and there are 3 ways to specify the IDs: <br/> 1. individually and specifying the exact ID, including the session index “_1” or “_2”. Multiple IDs can be mentioned by using a semicolon symbol to delimit them: 0001_1;0017_1;0017_2. <br/> 2. individually, and without specifying the session index. In this case, all available sessions for that subject will be retrieved. Multiple IDs can be mentioned by using a semicolon symbol to delimit them: 0001;0017 will be converted to 4 IDs: 0001_1, 0001_2, 0017_1, 0017_2. <br/> 3. As a range, specifying only the subject ids and not the session ids: 0001-0003 will retrieve all the available sessions for subjects 1, 2, 3, i.e.: 0001_1, 0001_2, 0002_1, 0002_2, 0003_1 and 0003_2. <br/> A combination of the 3 methods is also supported: 0001-0003;0005_1;0009 will retrieve connectivities for the following IDs: 0001_1, 0001_2, 0002_1, 0002_2, 0003_1, 0003_2, 0005_1, 0009_1, 0009_2.
- fctvb.adapters.creators.siibra_creator.SiibraModel.fc = Attr(field_type=<class ‘bool’>, default=True, required=True)
Flag to specify if the functional connectivities for the selected subjects should also be computed
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)
- atlas¶
- cohort¶
- fc¶
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.
- parcellation¶
- subject_ids¶
stimulus_creator
¶
- class tvb.adapters.creators.stimulus_creator.RegionStimulusCreator[source]¶
Bases:
ABCAdapter
The purpose of this adapter is to create a StimuliRegion.
- get_required_disk_size(view_model: RegionStimulusCreatorModel) int [source]¶
Returns the required disk size to be able to run the adapter. (in kB)
- get_required_memory_size(view_model: RegionStimulusCreatorModel) int [source]¶
Return the required memory to run this algorithm.
- launch(view_model: RegionStimulusCreatorModel) [StimuliRegionIndex] [source]¶
Used for creating a StimuliRegion instance
- launch_mode = 'sync_same_mem'¶
- class tvb.adapters.creators.stimulus_creator.RegionStimulusCreatorForm[source]¶
Bases:
ABCAdapterForm
- NAME_TEMPORAL_PARAMS_DIV = 'temporal_params'¶
- default_temporal = <class 'tvb.datatypes.equations.PulseTrain'>¶
- fill_from_trait(trait: RegionStimulusCreatorModel) None [source]¶
Sets data for all traited fields from a trait instance. Note that FormFields are not TraitFields, so this does not work recursively Override to fill in sub-forms
- static get_filters()[source]¶
Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain
- static get_input_name()[source]¶
The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str
- class tvb.adapters.creators.stimulus_creator.RegionStimulusCreatorModel(**kwargs)[source]¶
Bases:
ViewModel
,StimuliRegion
,SpatialModel
Traited class [tvb.adapters.creators.stimulus_creator.RegionStimulusCreatorModel]¶
Attributes declared¶
temporal : tvb.adapters.creators.stimulus_creator.RegionStimulusCreatorModel.temporal = EnumAttr(field_type=<enum ‘TemporalEquationsEnum’>, default=<tvb.datatypes.equations.PulseTrain object at 0x7f5d6dce7d00>, required=True)
connectivity : tvb.adapters.creators.stimulus_creator.RegionStimulusCreatorModel.connectivity = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)
display_name : tvb.adapters.creators.stimulus_creator.RegionStimulusCreatorModel.display_name = Str(field_type=<class ‘str’>, default=None, required=False)
operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)
ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)
range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)
is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)
spatial : tvb.datatypes.patterns.StimuliRegion.spatial = Attr(field_type=<class ‘tvb.datatypes.equations.DiscreteEquation’>, default=<tvb.datatypes.equations.DiscreteEquation object at 0x7f5d8ea24460>, required=True)
weight : tvb.datatypes.patterns.StimuliRegion.weight = NArray(label=’scaling’, dtype=float64, default=None, dim_names=(), ndim=None, 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
- display_name¶
- temporal¶
- class tvb.adapters.creators.stimulus_creator.StimulusRegionSelectorForm[source]¶
Bases:
ABCAdapterForm
- class tvb.adapters.creators.stimulus_creator.StimulusSurfaceSelectorForm[source]¶
Bases:
ABCAdapterForm
- class tvb.adapters.creators.stimulus_creator.SurfaceStimulusCreator[source]¶
Bases:
ABCAdapter
The purpose of this adapter is to create a StimuliSurface.
- KEY_FOCAL_POINTS_TRIANGLES = 'focal_points_triangles'¶
- KEY_SPATIAL = 'spatial'¶
- KEY_SURFACE = 'surface'¶
- KEY_TEMPORAL = 'temporal'¶
- get_required_disk_size(view_model: SurfaceStimulusCreatorModel) int [source]¶
Returns the required disk size to be able to run the adapter. (in kB)
- get_required_memory_size(view_model: SurfaceStimulusCreatorModel) int [source]¶
Return the required memory to run this algorithm.
- launch(view_model: SurfaceStimulusCreatorModel) [StimuliSurfaceIndex] [source]¶
Used for creating a StimuliSurface instance
- launch_mode = 'sync_same_mem'¶
- prepare_stimuli_surface_from_view_model(view_model: SurfaceStimulusCreatorModel, load_full_surface: bool = False) StimuliSurface [source]¶
- class tvb.adapters.creators.stimulus_creator.SurfaceStimulusCreatorForm[source]¶
Bases:
ABCAdapterForm
- NAME_SPATIAL_PARAMS_DIV = 'spatial_params'¶
- NAME_TEMPORAL_PARAMS_DIV = 'temporal_params'¶
- default_spatial = <class 'tvb.datatypes.equations.Sigmoid'>¶
- default_temporal = <class 'tvb.datatypes.equations.PulseTrain'>¶
- fill_from_trait(trait)[source]¶
Sets data for all traited fields from a trait instance. Note that FormFields are not TraitFields, so this does not work recursively Override to fill in sub-forms
- static get_filters()[source]¶
Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain
- static get_input_name()[source]¶
The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str
- class tvb.adapters.creators.stimulus_creator.SurfaceStimulusCreatorModel(**kwargs)[source]¶
Bases:
ViewModel
,StimuliSurface
,SpatialModel
Traited class [tvb.adapters.creators.stimulus_creator.SurfaceStimulusCreatorModel]¶
Attributes declared¶
spatial : tvb.adapters.creators.stimulus_creator.SurfaceStimulusCreatorModel.spatial = EnumAttr(field_type=<enum ‘SpatialEquationsEnum’>, default=<tvb.datatypes.equations.Sigmoid object at 0x7f5d6dce79d0>, required=True)
temporal : tvb.adapters.creators.stimulus_creator.SurfaceStimulusCreatorModel.temporal = EnumAttr(field_type=<enum ‘TemporalEquationsEnum’>, default=<tvb.datatypes.equations.PulseTrain object at 0x7f5d6dce7a90>, required=True)
surface : tvb.adapters.creators.stimulus_creator.SurfaceStimulusCreatorModel.surface = DataTypeGidAttr(field_type=<class ‘uuid.UUID’>, default=None, required=True)
display_name : tvb.adapters.creators.stimulus_creator.SurfaceStimulusCreatorModel.display_name = Str(field_type=<class ‘str’>, default=None, required=False)
operation_group_gid : tvb.core.neotraits.view_model.ViewModel.operation_group_gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=False)
ranges : tvb.core.neotraits.view_model.ViewModel.ranges = Attr(field_type=<class ‘str’>, default=None, required=False)
range_values : tvb.core.neotraits.view_model.ViewModel.range_values = Attr(field_type=<class ‘str’>, default=None, required=False)
is_metric_operation : tvb.core.neotraits.view_model.ViewModel.is_metric_operation = Attr(field_type=<class ‘bool’>, default=False, required=True)
focal_points_triangles : tvb.datatypes.patterns.StimuliSurface.focal_points_triangles = NArray(label=’Focal points triangles’, dtype=int64, default=None, dim_names=(), ndim=None, required=True)
gid : tvb.basic.neotraits._core.HasTraits.gid = Attr(field_type=<class ‘uuid.UUID’>, default=None, required=True)
- display_name¶
- spatial¶
- surface¶
Keep a GID but also link the type of DataType it should point to
- temporal¶