Skip to content

Why jet an other python wrapper?

tincotema edited this page Dec 6, 2023 · 1 revision

The Philosophy of McStas Python Wrapper

You may ask your self, hey isn't there already McStasScript? Yes there is. I began writing this before i knew that McStasScript exists and now this package contains features McStasScript dose not have. My task was to create a McStas instrument capable of running as an virtual instrument behind our control software Nicos. So the McStas instrument has to be controlled by (mostly) similar variables as the components at the real experiment, including per-calculated values. Also, the post processing needed several variables of the simulation to work properly. With a single framework providing the variables to both the simulation and the post processing, user errors can be eliminated and automation made easier. Furthermore our custom monitor needs extensive post processing to retrieve our actual signal, for witch we already had working scripts. So the necessity for the pre_simulation and post_simulation as well as analyses functions, variable lists, etc lead to this project.

With this project, you are able to compile your instrument, pre calculate your variables or read them from a csv file, run your simulation(s), maybe post process the output to save space and analyse your results directly or at a later date with one command.

If you have more ideas for useful features, feel free to make a feature-issue on github or a merge request of your own feature.

Clone this wiki locally