The Virtual Brain Project

Table Of Contents

Previous topic

exporters Package

Next topic

uploaders Package

This Page

simulator Package

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.ABCAsynchronous

Interface between the Simulator and the Framework.

HAVE_STATE_VARIABLES = ['GlobalAverage', 'SpatialAverage', 'Raw', 'SubSample', 'TemporalAverage']
algorithm = None
available_couplings = {'PreSigmoidal': <class 'tvb.simulator.coupling.PreSigmoidal'>, 'Linear': <class 'tvb.simulator.coupling.Linear'>, 'Sigmoidal': <class 'tvb.simulator.coupling.Sigmoidal'>, 'SigmoidalJansenRit': <class 'tvb.simulator.coupling.SigmoidalJansenRit'>, 'Scaling': <class 'tvb.simulator.coupling.Scaling'>, 'Kuramoto': <class 'tvb.simulator.coupling.Kuramoto'>, 'Difference': <class 'tvb.simulator.coupling.Difference'>, 'HyperbolicTangent': <class 'tvb.simulator.coupling.HyperbolicTangent'>}
available_integrators = {'Dop853Stochastic': <class 'tvb.simulator.integrators.Dop853Stochastic'>, 'HeunStochastic': <class 'tvb.simulator.integrators.HeunStochastic'>, 'Dop853': <class 'tvb.simulator.integrators.Dop853'>, 'VODE': <class 'tvb.simulator.integrators.VODE'>, 'VODEStochastic': <class 'tvb.simulator.integrators.VODEStochastic'>, 'EulerDeterministic': <class 'tvb.simulator.integrators.EulerDeterministic'>, 'EulerStochastic': <class 'tvb.simulator.integrators.EulerStochastic'>, 'Dopri5Stochastic': <class 'tvb.simulator.integrators.Dopri5Stochastic'>, 'Dopri5': <class 'tvb.simulator.integrators.Dopri5'>, 'Identity': <class 'tvb.simulator.integrators.Identity'>, 'HeunDeterministic': <class 'tvb.simulator.integrators.HeunDeterministic'>}
available_models = {'ReducedWongWang': <class 'tvb.simulator.models.wong_wang.ReducedWongWang'>, 'Linear': <class 'tvb.simulator.models.linear.Linear'>, 'ReducedSetHindmarshRose': <class 'tvb.simulator.models.stefanescu_jirsa.ReducedSetHindmarshRose'>, 'Epileptor': <class 'tvb.simulator.models.epileptor.Epileptor'>, 'ReducedSetFitzHughNagumo': <class 'tvb.simulator.models.stefanescu_jirsa.ReducedSetFitzHughNagumo'>, 'Generic2dOscillator': <class 'tvb.simulator.models.oscillator.Generic2dOscillator'>, 'JansenRit': <class 'tvb.simulator.models.jansen_rit.JansenRit'>, 'WilsonCowan': <class 'tvb.simulator.models.wilson_cowan.WilsonCowan'>, 'LarterBreakspear': <class 'tvb.simulator.models.larter_breakspear.LarterBreakspear'>, 'ZetterbergJansen': <class 'tvb.simulator.models.jansen_rit.ZetterbergJansen'>, 'Kuramoto': <class 'tvb.simulator.models.oscillator.Kuramoto'>, 'Hopfield': <class 'tvb.simulator.models.hopfield.Hopfield'>}
available_monitors = {'TemporalAverage': <class 'tvb.simulator.monitors.TemporalAverage'>, 'MEG': <class 'tvb.simulator.monitors.MEG'>, 'Bold': <class 'tvb.simulator.monitors.Bold'>, 'SubSample': <class 'tvb.simulator.monitors.SubSample'>, 'BoldRegionROI': <class 'tvb.simulator.monitors.BoldRegionROI'>, 'GlobalAverage': <class 'tvb.simulator.monitors.GlobalAverage'>, 'Raw': <class 'tvb.simulator.monitors.Raw'>, 'SpatialAverage': <class 'tvb.simulator.monitors.SpatialAverage'>, 'EEG': <class 'tvb.simulator.monitors.EEG'>, 'iEEG': <class 'tvb.simulator.monitors.iEEG'>}
configure(model, model_parameters, integrator, integrator_parameters, connectivity, monitors, monitors_parameters=None, surface=None, surface_parameters=None, stimulus=None, coupling=None, coupling_parameters=None, initial_conditions=None, conduction_speed=None, simulation_length=0, simulation_state=None)[source]

Make preparations for the adapter launch.

get_execution_time_approximation(**kwargs)[source]

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

get_input_tree()[source]

Return a list of lists describing the interface to the simulator. This is used by the GUI to generate the menus and fields necessary for defining a simulation.

get_input_tree2()[source]
get_output()[source]
Returns:list of classes for possible results of the Simulator.
get_required_disk_size(**kwargs)[source]

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

get_required_memory_size(**kwargs)[source]

Return the required memory to run this algorithm.

launch(model, model_parameters, integrator, integrator_parameters, connectivity, monitors, monitors_parameters=None, surface=None, surface_parameters=None, stimulus=None, coupling=None, coupling_parameters=None, initial_conditions=None, conduction_speed=None, simulation_length=0, simulation_state=None)[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