Skip to content
Jakob Garde edited this page Mar 15, 2017 · 6 revisions

The mcgui application is based on PyQt4 with Python3. You can use it to write and run instruments, and it has a lot of shortcuts to run other mccode tools, for example to view simulation data and visualize your instrument in 2d and 3d.

mcgui


Template Instruments: From the file menu, use "New from Template...", select the instrument in the site sub-menus, save a copy of the instrument file locally.

Insert Components from library: Enter the instrument editor by clicking the "Edit" button or using ctr-e.

You can now insert components via the "View" menu. The component insertion tool will guide you through the process.

Use the "Verbose" option to insert all component parameters explicitly.


Configuration: File -> Configuration allows you to adjust which mcrun, mcplot and mcdisplay tools mcgui uses, when running simulations and plotting simulation data. If you press "Ok" rather than "Save", your selections will not become persistent and only affect this session.


Simulations: To run a simulation of the currently open instrument, click the "Run..." button. A dialogue with a few option pops up. Click "Start" to start the simulation via mcgui.

If you accidentally started a long simulation, you can halt it before it finishes, by clicking the "Halt" button that becomes active during simulation runs.


Instrument visualization using mcdisplay: To use mcdisplay in the most basic way, simply select the Display-3D or Display-2D menu options from the "Simulation" menu.

Running mcdisplay with options: Run a simulation trace by selecting the "Trace" option in from Simulation/Trace in the "Run Simulation..." dialogue (or by pressing the "Run..." button). Reduce particle count before starting the trace, to perhaps a couple of hundred trace rays/particles. The maximum allowed by all recent mcdisplay implementations is 1000 rays.

Clone this wiki locally