simulator
Package¶
monitors_wizard_handler
¶
- class tvb.interfaces.web.controllers.simulator.monitors_wizard_handler.MonitorsWizardHandler[source]¶
Bases:
object
- static get_fragment_after_monitors(simulator, burst_config, project_id, is_branch, rendering_rules, setup_pse_url)[source]¶
- handle_next_fragment_for_monitors(context, rendering_rules, current_monitor, next_monitor, is_noise_form, form_action_url, if_bold_url)[source]¶
simulator_controller
¶
- class tvb.interfaces.web.controllers.simulator.simulator_controller.SimulatorController[source]¶
Bases:
BurstBaseController
- BRANCH_NAME_FORMAT = '{}_branch{}'¶
- COPY_NAME_FORMAT = 'copy_of_{}'¶
- KEY_IS_LOAD_AFTER_REDIRECT = 'is_load_after_redirect'¶
- KEY_KEEP_SAME_SIM_WIZARD = 'keep_same_wizard'¶
- cancel_or_remove_burst(burst_id)[source]¶
Cancel or Remove the burst entity given by burst_id (and all linked entities: op, DTs) :returns True: if the op was successfully.
- cancel_or_remove_operation(operation_id, is_group, remove_after_stop=False)[source]¶
Stop the operation given by operation_id. If is_group is true stop all the operations from that group.
- load_burst_history(initBurst=None)[source]¶
Load the available burst that are stored in the database at this time. This is one alternative to ‘chrome-back problem’.
- load_simulator_configuration_from_zip(**data)[source]¶
Upload Simulator from previously exported ZIP file
simulator_fragment_rendering_rules
¶
- class tvb.interfaces.web.controllers.simulator.simulator_fragment_rendering_rules.SimulatorFragmentRenderingRules(form=None, form_action_url=None, previous_form_action_url=None, is_simulation_copy=False, is_simulation_readonly_load=False, last_form_url='/burst/set_connectivity', last_request_type='GET', is_first_fragment=False, is_launch_fragment=False, is_model_fragment=False, is_surface_simulation=False, is_noise_fragment=False, is_launch_pse_fragment=False, is_pse_launch=False, monitor_name=None, is_branch=False)[source]¶
Bases:
object
This class gathers the rendering rules for simulator_fragment template. TVB > 2.0 brings a change of UI inside the simulator configuration page. Instead of a pre-loaded huge form with all the configurations, we want to have a wizzard-like page. Thus, the configurations are grouped into fragments and each fragment is rendered as a separate form. Each form provides the user with Next/Previous buttons, and some of them bring some extras:
model form provides the buttons: setup region model parameters/setup surface model parameters;
last fragment provides extra Launch/Setup PSE buttons, and a Branch button when it’s the case.
- There are several cases that should be taken into consideration for the UX:
for a normal configuration, the user would just select the proper configurations and click Next to go to the
next form. When the Next button is clicked, the current form is made read-only. If the user need to make changes to a previous form that is already read-only, he might use the Previous buttons to get there, make the change, and come back clicking Next again. - from the history list, the user could choose to inspect an existing simulator configuration, by clicking on it. This will load the full configuration as read-only forms, without any buttons. - from the history list, the user also has the option to copy an existing simulator configuration A and edit it, or start a new simulation B using the results from A as initial conditions. This results, in a semi-read-only load of simulator configuration A, because the user will have the options:
to use the Previous buttons in order to edit configuration A and the Launch/Setup PSE buttons to start a
new simulation. - to use the Branch button in order to start a new simulation B that will use results from A as initial conditions.
So, we need a series of rendering rules, to know when to display/hide each button, and also make fields read-only.
- FIRST_FORM_URL = '/burst/set_connectivity'¶
- property disable_fields¶
- property hide_launch_and_setup_pse_button¶
- property hide_previous_button¶
- property include_branch_button¶
- property include_launch_button¶
- property include_launch_pse_button¶
- property include_next_button¶
- property include_previous_button¶
- property include_setup_noise¶
- property include_setup_pse¶
- property include_setup_region_model¶
- property include_setup_surface_model¶
- property load_readonly¶
simulator_wizzard_urls
¶
- class tvb.interfaces.web.controllers.simulator.simulator_wizzard_urls.SimulatorWizzardURLs[source]¶
Bases:
object
- LAUNCH_PSE_URL = '/burst/launch_pse'¶
- SETUP_PSE_URL = '/burst/setup_pse'¶
- SET_CONNECTIVITY_URL = '/burst/set_connectivity'¶
- SET_CORTEX_URL = '/burst/set_cortex'¶
- SET_COUPLING_PARAMS_URL = '/burst/set_coupling_params'¶
- SET_INTEGRATOR_PARAMS_URL = '/burst/set_integrator_params'¶
- SET_INTEGRATOR_URL = '/burst/set_integrator'¶
- SET_MODEL_PARAMS_URL = '/burst/set_model_params'¶
- SET_MODEL_URL = '/burst/set_model'¶
- SET_MONITORS_URL = '/burst/set_monitors'¶
- SET_MONITOR_EQUATION_URL = '/burst/set_monitor_equation'¶
- SET_MONITOR_PARAMS_URL = '/burst/set_monitor_params'¶
- SET_NOISE_EQUATION_PARAMS_URL = '/burst/set_noise_equation_params'¶
- SET_NOISE_PARAMS_URL = '/burst/set_noise_params'¶
- SET_PSE_PARAMS_URL = '/burst/set_pse_params'¶
- SET_STIMULUS_URL = '/burst/set_stimulus'¶
- SET_SURFACE_URL = '/burst/set_surface'¶