ISISComputingGroup / ISISComputingGroup/IBEX

genie_python: Simulation Mode for Checking Scripts

Open
#5,083 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
6
Forks
2
Avg merge
16h 40m
Merged PRs (30d)
2

Description

As a scientist, I would like IBEX to support a simulation mode, so that I can perform "dry-runs" of my experiments to check the behaviour of my scripts, catch errors and estimate execution times.

#### Acceptance Criteria
1. I can activate a simulation mode (#5480) or specify that a script be executed in simulation mode.
1. In simulation mode, I get feedback on the performance of my script:
1. Any errors or warnings in my script are reported back to me.
1. IBEX reports the time taken to execute the script in simulation mode
1. IBEX reports an estimated time required to execute the script for real

#### Notes
1. This issue arises from a discussion at the [6th SAG Meeting,13th Jan 2020](https://stfc365.sharepoint.com/sites/IBEXSAG/Shared%20Documents/Forms/AllItems.aspx)
1. It could be that the simulation is performed by the Script Generator.
1. Some scientists have written their own "simulation" scripts:
1. MARI: [simscript.py](http://www.facilities.rl.ac.uk/isis/computing/ICPdiscussions/MARI/simscript.py)
1. SANDALS: [to-be-provided]
1. Notes about [simscript.py](http://www.facilities.rl.ac.uk/isis/computing/ICPdiscussions/MARI/simscript.py)

> From Duc Le:
> So my quick hack is in the attached file (`symscript.py`). It's just put in the `inst` folder in the user settings on the NDX machine so that it's automatically loaded when IBEX starts and is accessible using the `inst.` notation.
> There are two main user accessible functions:
> `inst.simulate(state)`
> `inst.load_script(file)`
> `inst.simulate` toggles simulation mode on or off if you don't specify
> "state" (e.g. `inst.simulate()`).
> `inst.load_script` switches simulate mode on, loads the script, runs it
> and if there are no errors keeps the script in memory and switches
> simulate mode off. If there are errors it *does not* load the script
> into memory (e.g. the old script stays in memory).
> Hope this helps,
> Duc.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.