Hi, Could you explain how to run the example files for the GUI? I'm using the virtual machine from Joe Britton made on 1/20/2015 and I am able to run the flopping_f_simulation.py and flopping_f_siumulation.gui.py files. How do I create/run an instance of the experiment or the GUI? Thanks, John
Message: 3 Date: Fri, 30 Jan 2015 15:27:21 +0800 From: S?bastien Bourdeauducq <s...@m-labs.hk> To: "artiq@lists.m-labs.hk" <artiq@lists.m-labs.hk> Subject: [ARTIQ] GUI: controls Message-ID: <54cb3259.4000...@m-labs.hk> Content-Type: text/plain; charset=utf-8 Hi, I'd like to start more discussions about the GUI before coming. I've been prototyping some of those ideas (the Glade controls loading and argument passing should work already), and I invite you to have a look at the code and try it out so that we have a solid base of discussion. Please let me know your thoughts and questions. S?bastien Experiment registry =================== The experiment registry is a small database hosted by the master that contains the list of the experiments to show in the GUI. Each entry contains essentially its name, the top-level experiment file, and the optional GUI file. The master does not use the registry in any way other than providing access to the GUI clients. GUI controls ============ The "explorer" window in the GUI has a two-column layout. The left column shows the list of the experiments from the registry and the right column shows the controls associated with the selected experiment in the list. Most options (scan parameters, fit selection, etc.) are part of those controls. All the values of those options are passed as Arguments (http://m-labs.hk/artiq/manual/core_language_reference.html#artiq.language.db.Argument) to the experiment. This means that the data analysis is part of each experiment, though some generic library code can be provided for the experiments to use. When the user selects an experiment in the explorer, the client retrieves the "GUI file" from the master and executes it to define the controls by creating the appropriate widgets. When the experiment is scheduled, the client executes another part of the GUI file code to retrieve the information from the widgets and turn it into a set of Arguments. The Arguments are then sent to the scheduler along with the rest of the information about the run (filename, timeout, etc.). Glade ===== Glade (https://glade.gnome.org/) may be used to build the layout of the controls. Glade saves the GUI description as a separate XML file, and since the ARTIQ GUI file is running on the client, it needs to contact the master (where the experiment code is stored) to retrieve that XML file. This is done by using the get_data coroutine that is passed to the code in the GUI file. The following example shows the use of Glade: https://github.com/m-labs/artiq/blob/master/examples/flopping_f_simulation_gui.py (we can probably factor the build and get_top_widget methods into a GladeControls abstract class and make it part of the ARTIQ APIs) _______________________________________________ ARTIQ mailing list https://ssl.serverraum.org/lists/listinfo/artiq