Re: [ARTIQ] GUI: controls
On 02/06/2015 03:36 PM, Robert Jördens wrote: Hmm. I fear that with this design the prevalent use case of a) taking an arbitrary experiment b) choosing an arbitrary parameter from the parameter db c) scanning the experiment over that parameter is more complicated than it should be. AFAICT it is editing the glade xml, editing the gui module, potentially the experiment module as well. Glade is optional, and it enables building interfaces with a nice layout more easily. For quick and dirty user interfaces, it is possible to build a library class that can be inherited from in the GUI files, that takes a list of arguments to scan and packs a series of scan widget into a GtkVBox + GtkScrolledView. ___ ARTIQ mailing list https://ssl.serverraum.org/lists/listinfo/artiq
Re: [ARTIQ] GUI: controls
It might be possible to auto-generate a GUI client for a device with an ARTIQ driver based on the existing command line clients we are writing using argparse. This would entail processing the parser object constructed in a command line client and auto-generating corresponding GUI client interface. This could have a couple benefits. 1. Any device with a useful command line client interface would automatically get an equivalent GUI client interface. 2. This would prevent code duplication. 3. It would ensure that we develop strong support for command line clients. -Joe Joe Britton NIST - Div 688 325 Broadway Boulder, CO 80305 303.497.7295 brit...@nist.gov -Original Message- From: ARTIQ [mailto:artiq-boun...@lists.m-labs.hk] On Behalf Of Sébastien Bourdeauducq Sent: Friday, January 30, 2015 12:27 AM To: artiq@lists.m-labs.hk Subject: [ARTIQ] GUI: controls 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.Arg ument) 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 ___ ARTIQ mailing list https://ssl.serverraum.org/lists/listinfo/artiq
[ARTIQ] GUI: controls
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
Re: [ARTIQ] GUI: controls
Hi, Are you able to run the GUI - do you see the parameters, scheduler and explorer windows? You need to run artiq_master (in the examples directory, so that it finds pdb.pyon, ddb.pyon and explist.pyon) and then artiq_gui. I made several changes since Jan 20, so you may want to upgrade from Git. To add a new experiment to the registry, for now you need to edit explist.pyon before starting the master. Sébastien On 01/31/2015 07:50 AM, Gaebler, John wrote: 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 ___ ARTIQ mailing list https://ssl.serverraum.org/lists/listinfo/artiq