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

Discussion: should do_nexafs and do_rsoxs respect existing values, or reset defaults for consistency? #32

Open
pbeaucage opened this issue Mar 27, 2023 · 3 comments

Comments

@pbeaucage
Copy link
Collaborator

Currently, arguments to do_nexafs and do_rsoxs that aren't present (such as polarizations) are set to their defaults (0). This could be desirable for user consistency, but I would argue that more user flexibility is provided by respecting the existing value and not moving it.

Would be interested in hearing thoughts on this.

@EliotGann
Copy link
Member

Strong disagreement on this. this is from experience a terrible way to run data commands. All commands should have a set of standard default reasonable values that should only ever change if the user knows they don't want them. there should ALWAYS be an assumption that the user does not actually know the state of the beamline, and running the exact command twice should produce the same results

@EliotGann
Copy link
Member

My philosophy on this is that each genra of function should have total state control over its set domain. loading configuration is just moving a bunch of motors, but the important thing is that NO other command should be overriding this, so loading a configuration means that you should stay in that configuration until another is loaded. When loading a sample, it's moving that set of motors, and nothing else should change that. maybe we can rotate around that sample etc, but X-rays should only be hitting that sample once it is loaded. when scanning, it's the same thing. the state of the energy, undulator, shutter etc should be completely determined by the scan command. when you start changing configurations with a scan command, or changing samples etc, things get very difficult to be deterministic.

@EliotGann
Copy link
Member

@pbeaucage do_rsoxs and do_nexafs are not part of this code base, but part of rsoxs the discussion is ok here I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants