labscript-suite-oldfinal1 / runmanager

runmanager is a graphical user interface (GUI) used to aid the compilation of labscript experiment scripts into hardware instructions to be executed on the hardware. Experiment parameters can be adjusted in the GUI, and lists of parameters can be used to create sequences of experiments, and scan over complex parameter spaces.
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Axes tab - control over loop order of parameter space and shuffling of individual axes #31

Closed philipstarkey closed 6 years ago

philipstarkey commented 9 years ago

Original report (archived issue) by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


There is a half-written tab in runmanager labelled 'Axes', with a big blue Kronecker product icon on it.

This is a tab supposed to provide an overview of the currently described parameter space. It will have a nested treeview, with one entry for each axis being outer-producted, each as a child row of the one above it. This nesting, which will give each row indentation compared to the row above it, will reflect and dictate the order in which the axes are to be looped over while producing shots out of the parameter space. The order will be like that of a nested 'for' loop in code — the top level with the least indentation will be the one iterated over most slowly, and the bottom level iterated fastest.

Each axis will have a 'shuffle' checkbox for whether that axis is to have its order randomised. This makes the global shuffle button a little redundant, but I think we should leave it in as a global switch to flick all the checkbuttons on and off, and visually show it as ambiguous (in whatever the most standard way to do that on a pushbutton is, I'll have to look up - otherwise maybe stick an icon of a checkbox on it showing the ambiguous state) if there is a mix of shuffle states on the axes.

An axis might be an outer-producted global, or a zip group. In the latter case the name of the zip group will be shown instead of the name of the globals therein, though perhaps we could show the globals too at an equal level of the heirarchy. But if that's hard, I'll put it in a tooltip instead.

The loop order will be reorderable via buttons on the side that move an item up or down, or possibly by drag and drop if it's easy enough to do.

philipstarkey commented 9 years ago

Original comment by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey).


I would suggest that rather than displaying the hierarchy as a True tree, you "fake" the same format of tree by adding white-space indentation to the first column.

This has the following benefits:

This has the following downsides:

I think that the first upside and downside probably cancel each other out in terms of coding complexity. So the net benefit is probably only a nicer way of displaying the names of globals in zip groups!

philipstarkey commented 7 years ago

Original comment by Jan Werkmann (Bitbucket: PhyNerd, GitHub: PhyNerd).


Having these controls would be really nice!

What is the order in which expansions get applied currently? Is there any way of influencing it?

philipstarkey commented 7 years ago

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


Presently I can see that the axes of expansion go through a dictionary at one point, keyed by name, and then the order of the outer product is the order that they come out of the dictionary when iterated over, which is arbitrary. In Python 3.6 (I tihnk?) the dict implementation changed such that insertion order is preserved (though it's an implementation detail not guaranteed by the spec of the language itself), but in python 2, it's going to be something like how the strings for the names of the globals hash. Only way to influence them without changing runmanager code would be to append random gibberish to the globals until you got the order you wanted :p.

Better way of doing it is to finish this feature - which I haven't forgotten about even though it's been years! I agree with phil's comments, and this is one of the things on my list - it won't be super hard once I get to it.

philipstarkey commented 6 years ago

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


Implemented the axes tab. Fixes issue #31

→ \<\<cset c05efe636ec9f8a075a1b239f9bf8d0e6f9f3dcb>>

philipstarkey commented 6 years ago

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


Close issue31-axes-tab branch

→ \<\<cset ffd554eeca8f45bf65593df98549361123126838>>