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: 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
property is_finished
is_group = False
is_pse_burst()[source]
metric_operation_group
name
operation_group
property operation_info_for_burst_removal

Return operation id for whole burst removal and a flag specifying whether the current burst is a group.

parent_burst_object = None
property process_time
project
range1
range2
property ranges
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: 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: HasTraitsIndex

Base class for DB storage of Types. DataTypes, are the common language between Visualizers, Simulator and Analyzers.

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
property display_name

To be implemented in each sub-class which is about to be displayed in UI, and return the text to appear.

property display_type
fill_from_generic_attributes(attrs: GenericAttributes) None[source]
fill_from_h5(h5_file)[source]
fill_from_has_traits(has_traits: HasTraits) None[source]
fixed_generic_attributes = False
fk_datatype_group
fk_from_operation
fk_parent_burst
get_extra_info()[source]
gid
id
invalid
is_nan
property is_ts
module
parent_operation
state
subject
property summary_info: Dict[str, str]
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: DataType

All the DataTypes resulted from an operation group will be part from a DataType group.

count_results
create_date
disk_size
fk_datatype_group
fk_from_operation
fk_operation_group
fk_parent_burst
gid
id
invalid
static is_data_a_group(data)[source]

Checks if the provided data, ready for export is a DataTypeGroup or not

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: DataType

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
property parsed_shape
shape
state
subject
subtype
title
type
type_
user_tag_1
user_tag_2
user_tag_3
user_tag_4
user_tag_5
visible

Bases: 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: 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: 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: 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: DeclarativeBase

A category that will have different boolean attributes e.g.: launchable|rawinput| display, a displayName and a default state for data.

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: 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: DeclarativeBase, Exportable

The class used to log any action executed in Projects.

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
property has_finished
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: DeclarativeBase, Exportable

We use this group entity, to map in DB a group of operations started in the same time by the user

fill_operationgroup_name(entities_in_group)[source]

Display name for UI.

fk_launched_in
gid
id
name
project
range1
range2
range3
property range_references

Memorized range starter

class tvb.core.entities.model.model_operation.OperationProcessIdentifier(operation_id, pid=None, job_id=None)[source]

Bases: 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: DeclarativeBase, 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, max_operation_size, description='', disable_imports=False)[source]

Bases: DeclarativeBase, Exportable

Contains the Projects informations and who is the administrator.

administrator
description
disable_imports
fk_admin
from_dict(dictionary, user_id)[source]

Add specific attributes from a input dictionary.

gid
id
last_updated
max_operation_size
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: DeclarativeBase

Contains the users information.

display_name
email
get_preference(key)[source]
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_preference(key, token)[source]
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.

username
validated
class tvb.core.entities.model.model_project.UserPreferences(**kwargs)[source]

Bases: 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: DeclarativeBase

Multiple Users can be members of a given Project.

fk_project
fk_user
id