TheVirtualBrain:

TheDocumentationwebsite.

Table Of Contents

Previous topic

exporters Package

Next topic

uploaders Package

This Page

simulator Package

coupling_forms

class tvb.adapters.simulator.coupling_forms.DifferenceCouplingForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

class tvb.adapters.simulator.coupling_forms.HyperbolicTangentCouplingForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

class tvb.adapters.simulator.coupling_forms.KuramotoCouplingForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

class tvb.adapters.simulator.coupling_forms.LinearCouplingForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

class tvb.adapters.simulator.coupling_forms.PreSigmoidalCouplingForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

class tvb.adapters.simulator.coupling_forms.ScalingCouplingForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

class tvb.adapters.simulator.coupling_forms.SigmoidalCouplingForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

class tvb.adapters.simulator.coupling_forms.SigmoidalJansenRitForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

tvb.adapters.simulator.coupling_forms.get_coupling_to_form_dict()[source]
tvb.adapters.simulator.coupling_forms.get_form_for_coupling(coupling_class)[source]
tvb.adapters.simulator.coupling_forms.get_ui_name_to_coupling_dict()[source]

equation_forms

class tvb.adapters.simulator.equation_forms.AlphaEquationForm[source]

Bases: tvb.adapters.simulator.equation_forms.EquationForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
get_traited_equation()[source]
class tvb.adapters.simulator.equation_forms.CosineEquationForm[source]

Bases: tvb.adapters.simulator.equation_forms.EquationForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
get_traited_equation()[source]
class tvb.adapters.simulator.equation_forms.DoubleExponentialEquationForm[source]

Bases: tvb.adapters.simulator.equation_forms.EquationForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
get_traited_equation()[source]
class tvb.adapters.simulator.equation_forms.DoubleGaussianEquationForm[source]

Bases: tvb.adapters.simulator.equation_forms.EquationForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
get_traited_equation()[source]
class tvb.adapters.simulator.equation_forms.EquationForm[source]

Bases: tvb.core.neotraits.forms.Form

fill_from_post(form_data)[source]
fill_trait_partially(datatype, fields=None)[source]
get_subform_key()[source]
get_traited_equation()[source]
class tvb.adapters.simulator.equation_forms.FirstOrderVolterraEquationForm[source]

Bases: tvb.adapters.simulator.equation_forms.EquationForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
get_traited_equation()[source]
class tvb.adapters.simulator.equation_forms.GammaEquationForm[source]

Bases: tvb.adapters.simulator.equation_forms.EquationForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
get_traited_equation()[source]
class tvb.adapters.simulator.equation_forms.GaussianEquationForm[source]

Bases: tvb.adapters.simulator.equation_forms.EquationForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
get_traited_equation()[source]
class tvb.adapters.simulator.equation_forms.GeneralizedSigmoidEquationForm[source]

Bases: tvb.adapters.simulator.equation_forms.EquationForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
get_traited_equation()[source]
class tvb.adapters.simulator.equation_forms.LinearEquationForm[source]

Bases: tvb.adapters.simulator.equation_forms.EquationForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
get_traited_equation()[source]
class tvb.adapters.simulator.equation_forms.MixtureOfGammasEquationForm[source]

Bases: tvb.adapters.simulator.equation_forms.EquationForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
get_traited_equation()[source]
class tvb.adapters.simulator.equation_forms.PulseTrainEquationForm[source]

Bases: tvb.adapters.simulator.equation_forms.EquationForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
get_traited_equation()[source]
class tvb.adapters.simulator.equation_forms.SigmoidEquationForm[source]

Bases: tvb.adapters.simulator.equation_forms.EquationForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
get_traited_equation()[source]
class tvb.adapters.simulator.equation_forms.SinusoidEquationForm[source]

Bases: tvb.adapters.simulator.equation_forms.EquationForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
get_traited_equation()[source]
tvb.adapters.simulator.equation_forms.get_equation_to_form_dict()[source]
tvb.adapters.simulator.equation_forms.get_form_for_equation(equation_class)[source]
tvb.adapters.simulator.equation_forms.get_ui_name_for_equation(equation_class)[source]
tvb.adapters.simulator.equation_forms.get_ui_name_to_monitor_equation_dict()[source]

form_with_ranges

class tvb.adapters.simulator.form_with_ranges.FormWithRanges[source]

Bases: tvb.core.neotraits.forms.Form

static get_params_configurable_in_phase_plane()[source]

Return a list with all parameter names that can be configured in Phase Plane viewer for the current model

get_range_parameters()[source]

hpc_simulator_adapter

class tvb.adapters.simulator.hpc_simulator_adapter.HPCSimulatorAdapter(storage_path, is_group_launch)[source]

Bases: tvb.adapters.simulator.simulator_adapter.SimulatorAdapter

OUTPUT_FOLDER = 'output'
extract_operation_data(operation=None)[source]

Do nothing for HPC run. :param operation: None

get_output()[source]
launch(view_model)[source]
load_traited_by_gid(data_gid)[source]

Load a generic HasTraits instance, specified by GID.

load_with_references(dt_gid)[source]
class tvb.adapters.simulator.hpc_simulator_adapter.HPCTimeseriesMetricsAdapter(storage_path, input_time_series_index)[source]

Bases: tvb.adapters.analyzers.metrics_group_timeseries.TimeseriesMetricsAdapter

configure(view_model)[source]

Store the input shape to be later used to estimate memory usage.

extract_operation_data(operation=None)[source]

Do nothing for HPC run. :param operation: None

load_traited_by_gid(data_gid)[source]

Load a generic HasTraits instance, specified by GID.

integrator_forms

class tvb.adapters.simulator.integrator_forms.IntegratorForm[source]

Bases: tvb.core.neotraits.forms.Form

get_subform_key()[source]
class tvb.adapters.simulator.integrator_forms.IntegratorStochasticForm[source]

Bases: tvb.adapters.simulator.integrator_forms.IntegratorForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
template = 'form_fields/select_field.html'
tvb.adapters.simulator.integrator_forms.get_form_for_integrator(integrator_class)[source]
tvb.adapters.simulator.integrator_forms.get_integrator_to_form_dict()[source]

model_forms

class tvb.adapters.simulator.model_forms.CoombesByrne2DModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.CoombesByrneModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.DumontGutkinModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.Epileptor2DModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.EpileptorCodim3ModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.EpileptorCodim3SlowModModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.EpileptorModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.EpileptorRestingStateModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.GastSchmidtKnoscheSDModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.GastSchmidtKnoscheSFModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.Generic2dOscillatorModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.HopfieldModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.JansenRitModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.KuramotoModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.LarterBreakspearModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.LinearModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.MontbrioPazoRoxinModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.ReducedSetFitzHughNagumoModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.ReducedSetHindmarshRoseModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.ReducedWongWangExcInhModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.ReducedWongWangModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.StateVariableRangesForm[source]

Bases: tvb.core.neotraits.forms.Form

class tvb.adapters.simulator.model_forms.SupHopfModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.WilsonCowanModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.ZerlautAdaptationFirstOrderModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
class tvb.adapters.simulator.model_forms.ZerlautAdaptationSecondOrderModelForm[source]

Bases: tvb.adapters.simulator.model_forms.ZerlautAdaptationFirstOrderModelForm

class tvb.adapters.simulator.model_forms.ZetterbergJansenModelForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

static get_params_configurable_in_phase_plane()[source]
tvb.adapters.simulator.model_forms.get_form_for_model(model_class)[source]
tvb.adapters.simulator.model_forms.get_model_to_form_dict()[source]
tvb.adapters.simulator.model_forms.get_ui_name_to_model()[source]

monitor_forms

class tvb.adapters.simulator.monitor_forms.BoldMonitorForm(session_stored_simulator=None)[source]

Bases: tvb.adapters.simulator.monitor_forms.MonitorForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
class tvb.adapters.simulator.monitor_forms.EEGMonitorForm(session_stored_simulator=None)[source]

Bases: tvb.adapters.simulator.monitor_forms.ProjectionMonitorForm

class tvb.adapters.simulator.monitor_forms.MEGMonitorForm(session_stored_simulator=None)[source]

Bases: tvb.adapters.simulator.monitor_forms.ProjectionMonitorForm

class tvb.adapters.simulator.monitor_forms.MonitorForm(session_stored_simulator=None)[source]

Bases: tvb.core.neotraits.forms.Form

static determine_indexes_for_chosen_vars_of_interest(session_stored_simulator)[source]
fill_from_post(form_data)[source]
fill_from_trait(trait)[source]
fill_trait(datatype)[source]
class tvb.adapters.simulator.monitor_forms.ProjectionMonitorForm(session_stored_simulator=None)[source]

Bases: tvb.adapters.simulator.monitor_forms.MonitorForm

class tvb.adapters.simulator.monitor_forms.SpatialAverageMonitorForm(session_stored_simulator=None)[source]

Bases: tvb.adapters.simulator.monitor_forms.MonitorForm

fill_from_trait(trait)[source]
tvb.adapters.simulator.monitor_forms.get_form_for_monitor(monitor_class)[source]
tvb.adapters.simulator.monitor_forms.get_monitor_to_form_dict()[source]
tvb.adapters.simulator.monitor_forms.get_monitor_to_ui_name_dict(surface)[source]
tvb.adapters.simulator.monitor_forms.get_ui_name_to_monitor_dict(surface)[source]
class tvb.adapters.simulator.monitor_forms.iEEGMonitorForm(session_stored_simulator=None)[source]

Bases: tvb.adapters.simulator.monitor_forms.ProjectionMonitorForm

noise_forms

class tvb.adapters.simulator.noise_forms.AdditiveNoiseForm[source]

Bases: tvb.adapters.simulator.noise_forms.NoiseForm

get_range_parameters()[source]
class tvb.adapters.simulator.noise_forms.MultiplicativeNoiseForm[source]

Bases: tvb.adapters.simulator.noise_forms.NoiseForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
class tvb.adapters.simulator.noise_forms.NoiseForm[source]

Bases: tvb.adapters.simulator.form_with_ranges.FormWithRanges

get_subform_key()[source]
tvb.adapters.simulator.noise_forms.get_form_for_noise(noise_class)[source]

range_parameters

class tvb.adapters.simulator.range_parameters.SimulatorRangeParameters(connectivity_filters=None, surface_filters=None, coupling=None, model=None, integrator_noise=None)[source]

Bases: builtins.object

add_connectivity_filter(filter)[source]
add_surface_filter(filter)[source]
get_all_range_parameters()[source]

simulate_algorithm_category_config

simulator_adapter

Adapter that uses the traits module to generate interfaces to the Simulator. Few supplementary steps are done here:

  • from submitted Monitor/Model... names, build transient entities
  • after UI parameters submit, compose transient Cortex entity to be passed to the Simulator.
class tvb.adapters.simulator.simulator_adapter.SimulatorAdapter[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapter

Interface between the Simulator and the Framework.

HAVE_STATE_VARIABLES = ['GlobalAverage', 'SpatialAverage', 'Raw', 'SubSample', 'TemporalAverage']
algorithm = None
branch_simulation_state_gid = None
configure(view_model)[source]

Make preparations for the adapter launch.

get_adapter_fragments(view_model)[source]
get_execution_time_approximation(view_model)[source]

Method should approximate based on input arguments, the time it will take for the operation to finish (in seconds).

get_form_class()[source]
get_output()[source]
Returns:list of classes for possible results of the Simulator.
get_required_disk_size(view_model)[source]

Return the required disk size this algorithm estimates it will take. (in kB)

get_required_memory_size(view_model)[source]

Return the required memory to run this algorithm.

launch(view_model)[source]
Called from the GUI to launch a simulation.
: string class name of chosen model, etc... *_parameters: dictionary of parameters for chosen model, etc... connectivity: tvb.datatypes.connectivity.Connectivity object. surface: tvb.datatypes.surfaces.CorticalSurface: or None. stimulus: tvb.datatypes.patters. object
class tvb.adapters.simulator.simulator_adapter.SimulatorAdapterForm[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
static get_filters()[source]
static get_input_name()[source]
static get_required_datatype()[source]
static get_view_model()[source]

simulator_fragments

class tvb.adapters.simulator.simulator_fragments.SimulatorFinalFragment(default_simulation_name='simulation_1')[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

fill_from_post(form_data)[source]
static is_burst_name_ok(burst_name)[source]
class tvb.adapters.simulator.simulator_fragments.SimulatorIntegratorFragment[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
class tvb.adapters.simulator.simulator_fragments.SimulatorModelFragment[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
class tvb.adapters.simulator.simulator_fragments.SimulatorMonitorFragment(is_surface_simulation=False)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

fill_from_trait(trait)[source]
class tvb.adapters.simulator.simulator_fragments.SimulatorPSEConfigurationFragment(choices)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

class tvb.adapters.simulator.simulator_fragments.SimulatorPSERangeFragment(pse_param1, pse_param2)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

GID_FIELD = 'pse_{}_guid'
HI_FIELD = 'pse_{}_hi'
KEY_PARAM1 = 'param1'
KEY_PARAM2 = 'param2'
LO_FIELD = 'pse_{}_lo'
NAME_FIELD = 'pse_{}_name'
STEP_FIELD = 'pse_{}_step'
static fill_from_post(all_range_parameters, **data)[source]
class tvb.adapters.simulator.simulator_fragments.SimulatorRMFragment(surface_index=None, connectivity_gid=None)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

class tvb.adapters.simulator.simulator_fragments.SimulatorStimulusFragment(is_surface_simulation=False)[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

fill_from_trait(trait)[source]
fill_trait(datatype)[source]
class tvb.adapters.simulator.simulator_fragments.SimulatorSurfaceFragment[source]

Bases: tvb.core.adapters.abcadapter.ABCAdapterForm

fill_trait(datatype)[source]

subform_helper

class tvb.adapters.simulator.subform_helper.SubformHelper[source]

Bases: builtins.object

class FormToConfigEnum[source]

Bases: enum.Enum

An enumeration.

EQUATION = <FormToConfigEnum.EQUATION: functools.partial(<function get_form_for_equation at 0x7f78e1295f80>)>
INTEGRATOR = <FormToConfigEnum.INTEGRATOR: functools.partial(<function get_form_for_integrator at 0x7f78da387cb0>)>
NOISE = <FormToConfigEnum.NOISE: functools.partial(<function get_form_for_noise at 0x7f78da360290>)>
static SubformHelper.get_class_for_field_value(ui_name, subform_key)[source]
static SubformHelper.get_subform_for_field_value(ui_name, subform_key)[source]

subforms_mapping

class tvb.adapters.simulator.subforms_mapping.SubformsEnum[source]

Bases: enum.Enum

Mapping between the type of subform and the method that should be called in order to get the corresponding object by its UI name. A Form that can be used as subform (eg: after a select field), should override get_subform_key() to return the proper key from this enum.

EQUATION = <SubformsEnum.EQUATION: functools.partial(<function get_ui_name_to_equation_dict at 0x7f78e1295b00>)>
INTEGRATOR = <SubformsEnum.INTEGRATOR: functools.partial(<function get_ui_name_to_integrator_dict at 0x7f78e1295dd0>)>
NOISE = <SubformsEnum.NOISE: functools.partial(<function get_ui_name_to_noise_dict at 0x7f78e1295c20>)>
tvb.adapters.simulator.subforms_mapping.get_ui_name_to_equation_dict()[source]
tvb.adapters.simulator.subforms_mapping.get_ui_name_to_integrator_dict()[source]
tvb.adapters.simulator.subforms_mapping.get_ui_name_to_noise_dict()[source]