Simulation GUI

class pymoskito.simulation_gui.SimulationGui[source]

class for the graphical user interface

apply_regime_by_name(regime_name)[source]

Apply the regime given by regime_name und update the regime index.

Returns:True if successful, False if errors occurred.
Return type:bool
closeEvent(self, QCloseEvent)[source]
export_simulation_data(ok)[source]

Query the user for a custom name and export the current simulation results.

Parameters:ok – unused parameter from QAction.triggered() Signal
increment_playback_time()[source]

go one time step forward in playback

load_regimes_from_file(file_name)[source]

load simulation regime from file :param file_name:

new_simulation_data(status, data)[source]

Slot to be called when the simulation interface has completed the current job and new data is available.

Parameters:
  • status (str) – Status of the simulation, either - finished : Simulation has been finished successfully or - failed : Simulation has failed.
  • data (dict) – Dictionary, holding the simulation data.
pause_animation()[source]

pause the animation

play_animation()[source]

play the animation

plot_data_vector(item)[source]

Creates a plot widget based on the given item.

If a plot for this item is already open no new plot is created but the existing one is raised up again.

Parameters:item (Qt.ListItem) – Item to plot.
postprocessing_clicked()[source]

starts the post- and metaprocessing application

regime_dclicked(item)[source]

Apply the selected regime to the current target.

reset_camera_clicked()[source]

reset camera in vtk window

run_next_regime()[source]

Execute the next regime in the regime batch.

start_regime_execution()[source]

Simulate all regimes in the regime list.

start_simulation()[source]

start the simulation and disable start button

stop_animation()[source]

Stop the animation if it is running and reset the playback time.

stop_regime_execution()[source]

Stop the batch process.

update_gui()[source]

Updates the graphical user interface to reflect changes of the current display time.

This includes:
  • timestamp
  • visualisation window
  • time cursors in diagrams
update_playback_speed(val)[source]

adjust playback time to slider value

Parameters:val
update_playback_time()[source]

adjust playback time to slider value

pymoskito.simulation_gui.run(regimes=None)[source]

Helper function to launch the PyMoskito GUI