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

Shuffle is deselected when no globals are being scanned #61

Closed philipstarkey closed 5 years ago

philipstarkey commented 6 years ago

Original report (archived issue) by Shaun Johnstone (Bitbucket: shjohnst, GitHub: shjohnst).


If you have been scanning a global with shuffle enabled, when that global is set to a constant, shuffle is turned off. This means that the next scan (e.g. over a different global) will not be shuffled unless it is manually turned back on again.

philipstarkey commented 6 years ago

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


This is probably because the shuffle button is really just an indicator/global toggle of/for the axes tab settings. It's not clear to me what behaviour a fix would have.

I'm wondering if we should store the last shuffle/not shuffle state in the HDF5 globals file (in a similar way to storing the expansion type)? That way the shuffle behaviour of an axis would default back to the last used behaviour, rather than automatically selecting shuffle (or whatever it actually does....probably dependent on what other axes you have and whether they are shuffled). Storing this information might be useful for other scenarios (e.g. using the runmanager API)

Thoughts @chrisjbillington ?

philipstarkey commented 6 years ago

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


bump! @chrisjbillington thoughts?

philipstarkey commented 6 years ago

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


Probably storing in in the globals file alongside the expansion type makes sense.

With that, and the possibility of storing things about whether the user overrode the default expansion type (as talked about in bug #50, though I'd like to think of way to resolve that without storing extra things in the HDF5 file if possible), it might be worth thinking about storing globals a different way. I'm just thinking that the current layout of globals in the HDF5 file isn't optimal for backward compatibility for changes like this.

philipstarkey commented 5 years ago

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


So we've been bumping into this a bit, and I think the solution is pretty simple.

If a new axis is added, it should take its shuffle setting from the global shuffle setting, or (arbitrarily) be set to not shuffle if the global setting is 'inconsistent'. When an axis is removed, the global shuffle state should be updated. When all axes are removed, the global shuffle state should not be updated - it should be whatever it was set to before the final axis was removed, or, (arbitrarily) be set to 'don't shuffle' if it was inconsistent.

This all seems perfectly well defined and unlikely to cause confusion. The problem seems to just be that whatever code updates the global setting should leave it unchanged if there are no axes (unless it's inconsistent).

I'll have a go at fixing this.

Remembering the shuffle state of individual axes I think is overkill for now, but remembering the global state likely worth it.

philipstarkey commented 5 years ago

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


I've had a go at fixing this in PR #41

I changed my mind compared to the above comment though in that, if the checkbox is partially checked and all the axes vanish, it will be set to checked. The existing behaviour when a new axis was added and the box was partially checked was to have the new axis be shuffled, so I'm being consistent with that. Plus, probably it is more likely to be expected that if some things are shuffling, that should be the default for new axes or if axes vanish and reappear.

philipstarkey commented 5 years ago

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


Merged in cbillington/runmanager/bugfix (pull request #41)

Fix issue #61, shuffle checkstate not preserved upon removing and adding 'outer' globals.

→ \<\<cset 5c2f4a6829f33bfd791fe2607b816835f8a3b0a5>>