Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shuffle is deselected when no globals are being scanned #61

Closed
philipstarkey opened this issue Aug 9, 2018 · 6 comments
Closed

Shuffle is deselected when no globals are being scanned #61

philipstarkey opened this issue Aug 9, 2018 · 6 comments
Labels
bug Something isn't working major

Comments

@philipstarkey
Copy link
Member

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
Copy link
Member Author

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
Copy link
Member Author

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


bump! @chrisjbillington thoughts?

@philipstarkey
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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


  • changed state from "new" to "resolved"

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

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

→ <<cset 5c2f4a6>>

@philipstarkey philipstarkey added major bug Something isn't working labels Apr 5, 2020
philipstarkey pushed a commit to philipstarkey/runmanager that referenced this issue Jun 25, 2020
…d upon removing and adding 'outer' globals.

Also fix that the checkox is initially set to be a tristate one. It should not
be settable to a partially checked state by the user.
philipstarkey pushed a commit to philipstarkey/runmanager that referenced this issue Jun 25, 2020
)

Fix issue labscript-suite#61, shuffle checkstate not preserved upon removing and adding 'outer' globals.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

1 participant