model Package
Gather together all model classes, for easy import and usage.
model_burst
-
class tvb.core.entities.model.model_burst.BurstConfiguration(project_id, status='running', name=None)[source]
Bases: tvb.core.neotraits.db.HasTraitsIndex
-
BURST_CANCELED = 'canceled'
-
BURST_ERROR = 'error'
-
BURST_FINISHED = 'finished'
-
BURST_RUNNING = 'running'
-
clone()[source]
-
create_date
-
datatypes_number
-
dynamic_ids
-
error_message
-
finish_time
-
fk_metric_operation_group
-
fk_operation_group
-
fk_project
-
fk_simulation
-
gid
-
id
-
is_finished[source]
-
is_group = False
-
is_pse_burst()[source]
-
metric_operation_group
-
name
-
operation_group
-
operation_info_for_burst_removal[source]
Return operation id for whole burst removal and a flag specifying whether the current burst is a group.
-
parent_burst_object = None
-
process_time[source]
-
project
-
range1
-
range2
-
ranges[source]
-
selected_tab = -1
-
simulator_gid
-
start_time
-
status
-
title
-
type_
-
class tvb.core.entities.model.model_burst.Dynamic(name, user_id, model_class, model_parameters, integrator_class, integrator_parameters)[source]
Bases: sqlalchemy.orm.decl_api.DeclarativeBase
-
code_version
-
fk_user
-
id
-
integrator_class
-
integrator_parameters
-
model_class
-
model_parameters
-
name
model_datatype
Entities for Generic DataTypes, Links and Groups of DataTypes are defined here.
-
class tvb.core.entities.model.model_datatype.DataType(gid=None, **kwargs)[source]
Bases: tvb.core.neotraits.db.HasTraitsIndex
Base class for DB storage of Types.
DataTypes, are the common language between Visualizers,
Simulator and Analyzers.
-
LINKS
-
static accepted_filters()[source]
Return accepted UI filters for current DataType.
-
after_store()[source]
Put here code (as a trigger after storage) to be executed by
ABCAdapter after the current DT is stored in DB
-
create_date
-
disk_size
-
display_name[source]
To be implemented in each sub-class which is about to be displayed in UI,
and return the text to appear.
-
display_type[source]
-
fill_from_generic_attributes(attrs)[source]
-
fill_from_h5(h5_file)[source]
-
fill_from_has_traits(has_traits)[source]
-
fixed_generic_attributes = False
-
fk_datatype_group
-
fk_from_operation
-
fk_parent_burst
-
gid
-
id
-
invalid
-
is_nan
-
module
-
parent_operation
-
state
-
subject
-
summary_info[source]
-
title
-
type
-
type_
-
user_tag_1
-
user_tag_2
-
user_tag_3
-
user_tag_4
-
user_tag_5
-
visible
-
class tvb.core.entities.model.model_datatype.DataTypeGroup(operation_group, **kwargs)[source]
Bases: tvb.core.entities.model.model_datatype.DataType
All the DataTypes resulted from an operation group will be part from a DataType group.
-
LINKS
-
count_results
-
create_date
-
disk_size
-
fk_datatype_group
-
fk_from_operation
-
fk_operation_group
-
fk_parent_burst
-
gid
-
id
-
invalid
-
is_nan
-
module
-
no_of_ranges
-
parent_operation
-
parent_operation_group
-
state
-
subject
-
title
-
type
-
type_
-
user_tag_1
-
user_tag_2
-
user_tag_3
-
user_tag_4
-
user_tag_5
-
visible
-
class tvb.core.entities.model.model_datatype.DataTypeMatrix(gid=None, **kwargs)[source]
Bases: tvb.core.entities.model.model_datatype.DataType
-
LINKS
-
array_data_max
-
array_data_mean
-
array_data_min
-
array_has_complex
-
array_is_finite
-
create_date
-
disk_size
-
fill_from_has_traits(datatype)[source]
-
fk_datatype_group
-
fk_from_operation
-
fk_parent_burst
-
gid
-
has_valid_time_series
-
has_volume_mapping
-
id
-
invalid
-
is_nan
-
module
-
ndim
-
parent_operation
-
parsed_shape[source]
-
shape
-
state
-
subject
-
subtype
-
title
-
type
-
type_
-
user_tag_1
-
user_tag_2
-
user_tag_3
-
user_tag_4
-
user_tag_5
-
visible
-
class tvb.core.entities.model.model_datatype.Links(from_datatype, to_project)[source]
Bases: sqlalchemy.orm.decl_api.DeclarativeBase
Class used to handle shortcuts from one DataType to another project.
-
fk_from_datatype
-
fk_to_project
-
id
-
referenced_datatype
-
referenced_project
-
class tvb.core.entities.model.model_datatype.MeasurePointsSelection(ui_name, selected_nodes, datatype_gid, project_id)[source]
Bases: sqlalchemy.orm.decl_api.DeclarativeBase
Interest area.
A subset of nodes from a Connectivity or Sensors.
-
fk_datatype_gid
-
fk_in_project
-
id
-
selected_nodes
-
ui_name
-
class tvb.core.entities.model.model_datatype.StoredPSEFilter(ui_name, datatype_gid, threshold_value, applied_on)[source]
Bases: sqlalchemy.orm.decl_api.DeclarativeBase
Interest Area
PSE Viewer Filter tool, specific filter configuration user inputs to be stored from multiple elements
-
applied_on
-
fk_datatype_gid
-
id
-
threshold_value
-
ui_name
model_operation
Here we define entities for Operations and Algorithms.
-
class tvb.core.entities.model.model_operation.Algorithm(module, classname, category_key, group_name=None, group_description=None, display_name='', description='', subsection_name=None, last_introspection_check=None)[source]
Bases: sqlalchemy.orm.decl_api.DeclarativeBase
-
algorithm_category
-
classname
-
datatype_filter
-
description
-
displayname
-
fk_category
-
group_description
-
group_name
-
id
-
last_introspection_check
-
module
-
outputlist
-
parameter_name
-
removed
-
required_datatype
-
subsection_name
-
class tvb.core.entities.model.model_operation.AlgorithmCategory(displayname, launchable=False, rawinput=False, display=False, defaultdatastate='', order_nr='999', last_introspection_check=None)[source]
Bases: sqlalchemy.orm.decl_api.DeclarativeBase
A category that will have different boolean attributes
e.g.: launchable|rawinput|
display, a displayName and a default state for data.
-
ALGORITHMS
-
defaultdatastate
-
display
-
displayname
-
id
-
last_introspection_check
-
launchable
-
order_nr
-
rawinput
-
removed
-
class tvb.core.entities.model.model_operation.AlgorithmTransientGroup(name, description, subsection=None)[source]
Bases: builtins.object
-
class tvb.core.entities.model.model_operation.Operation(view_model_gid, fk_launched_by, fk_launched_in, fk_from_algo, status='4-PENDING', start_date=None, completion_date=None, op_group_id=None, additional_info='', user_group=None, range_values=None, estimated_disk_size=0)[source]
Bases: sqlalchemy.orm.decl_api.DeclarativeBase, tvb.core.entities.exportable.Exportable
The class used to log any action executed in Projects.
-
DATA_TYPES
-
OPERATION_PROCESS_IDENTIFIERS
-
additional_info
-
algorithm
-
completion_date
-
create_date
-
estimated_disk_size
-
fk_from_algo
-
fk_launched_by
-
fk_launched_in
-
fk_operation_group
-
from_dict(dictionary, dao, user_id=None, project_gid=None)[source]
Add specific attributes from a input dictionary.
-
gid
-
has_finished[source]
-
id
-
mark_complete(status, additional_info=None)[source]
Update Operation fields on completion: Status and Date
-
operation_group
-
project
-
queue_full
-
range_values
-
start_date
-
start_now()[source]
Update Operation fields at startup: Status and Date
-
status
-
to_dict()[source]
Overwrite superclass method to add required changes.
-
user
-
user_group
-
view_model_disk_size
-
view_model_gid
-
visible
-
class tvb.core.entities.model.model_operation.OperationGroup(project_id, name='incomplete', ranges=None, gid=None)[source]
Bases: sqlalchemy.orm.decl_api.DeclarativeBase, tvb.core.entities.exportable.Exportable
We use this group entity, to map in DB a group of operations started
in the same time by the user
-
DATA_TYPES_GROUPS
-
fill_operationgroup_name(entities_in_group)[source]
Display name for UI.
-
fk_launched_in
-
gid
-
id
-
name
-
project
-
range1
-
range2
-
range3
-
range_references[source]
Memorized range starter
-
class tvb.core.entities.model.model_operation.OperationProcessIdentifier(operation_id, pid=None, job_id=None)[source]
Bases: sqlalchemy.orm.decl_api.DeclarativeBase
Class for storing for each operation the process identifier under which
it was launched so any operation can be stopped from tvb.
-
fk_from_operation
-
id
-
job_id
-
operation
-
pid
-
class tvb.core.entities.model.model_operation.ResultFigure(user_id, project_id, session_name, name, path, file_format='PNG')[source]
Bases: sqlalchemy.orm.decl_api.DeclarativeBase, tvb.core.entities.exportable.Exportable
Class for storing figures from results, visualize them eventually next to each other.
A group of results, with the same session_name will be displayed
-
file_format
-
file_path
-
fk_for_user
-
fk_in_project
-
from_dict(dictionary)[source]
Add specific attributes from a input dictionary.
-
id
-
name
-
project
-
session_name
-
to_dict()[source]
Overwrite superclass method with required additional data.
-
tvb.core.entities.model.model_operation.has_finished(status)[source]
Is the given status indicating a finished operation?
model_project
Here we define entities related to user and project.
-
class tvb.core.entities.model.model_project.Project(name, fk_admin, description='')[source]
Bases: sqlalchemy.orm.decl_api.DeclarativeBase, tvb.core.entities.exportable.Exportable
Contains the Projects informations and who is the administrator.
-
BurstConfiguration
-
LINKS
-
OPERATIONS
-
OPERATION_GROUPS
-
RESULT_FIGURES
-
administrator
-
description
-
fk_admin
-
from_dict(dictionary, user_id)[source]
Add specific attributes from a input dictionary.
-
gid
-
id
-
last_updated
-
members = []
-
name
-
operations_canceled = 0
-
operations_error = 0
-
operations_finished = 0
-
operations_pending = 0
-
operations_started = 0
-
refresh_update_date()[source]
Mark entity as being changed NOW. (last_update field)
-
to_dict()[source]
Overwrite superclass method to add required changes.
-
version
-
class tvb.core.entities.model.model_project.User(login, display_name, password, email=None, validated=True, role='RESEARCHER', gid=None)[source]
Bases: sqlalchemy.orm.decl_api.DeclarativeBase
Contains the users informations.
-
display_name
-
email
-
get_project_structure_grouping()[source]
-
get_viewers_color_scheme()[source]
-
gid
-
id
-
is_administrator()[source]
Return a boolean, saying if current user has role Administrator
-
is_online_help_active()[source]
This method returns True if this user should see online help.
-
password
-
preferences = ColumnAssociationProxyInstance(AssociationProxy('user_preferences', 'value'))
-
role
-
selected_project
-
set_project_structure_grouping(first, second)[source]
-
set_viewers_color_scheme(color_scheme)[source]
-
switch_online_help_state()[source]
This method changes the state of the OnlineHelp Active flag.
-
user_preferences
-
username
-
validated
-
class tvb.core.entities.model.model_project.UserPreferences(**kwargs)[source]
Bases: sqlalchemy.orm.decl_api.DeclarativeBase
Contains the user preferences data.
-
ONLINE_HELP_ACTIVE = 'online_help_active'
-
PROJECT_STRUCTURE_GROUPING = 'project_structure_grouping'
-
VIEWERS_COLOR_SCHEME = 'viewers_color_scheme'
-
fk_user
-
key
-
user
-
value
-
class tvb.core.entities.model.model_project.User_to_Project(user, case)[source]
Bases: sqlalchemy.orm.decl_api.DeclarativeBase
Multiple Users can be members of a given Project.
-
fk_project
-
fk_user
-
id