Open carterbox opened 1 year ago
This addresses second and third.
For the first point, I need to come up with a set of keywords/parameters that are intuitive for both configuration (mono/pink) and both BM and ID line (in BM I have mono and pink for ID I have only mono and single line undulator beam).
Currently at 2-BM I can set the beamline in mono beam with energy values in a range 10-30 so a command like:
energy set --energy 20
is very intuitive. For pink beam at 2-BM I have only one cut off energy available (at 30keV) so I thought:
energy pink
to be more intuitive. But I agree it breaks the logic with the mono beam change and is also not valid at other BM where for example they can change the pink beam cut off.
A more standard solution could be:
energy mono --energy 20
or energy set --mode mono --energy 20
energy pink --energy 30
or energy set --mode pink --energy 30
there is then the issue of the ID where we have mono and there is no pink mode but a single line or harmonic. I added a new parameter (--beamline) this way I can add a new mode
energy line --energy 20
or energy set --mode line --energy 20
and make sure that the above are valid only when --beamline contains 'id' and do the same for the BM pink mode
This commit implements:
energy set --mode Mono --energy 20
energy set --mode Pink --energy 30
and address the first point.
Default option for --mode is Mono so previous command in use at the beamline: energy set --energy 20
is identical to energy set --mode Mono --energy 20
and works as before.
Are the energy ranges for mono and pink overlapping? i.e. Can you set the energy to 10keV for both mono and pink modes? If not, then mono and pink are redundant modifiers because the energy alone describes the desired state.
Regardless, I think that --mode
is something that you do want. Because I can imagine that you could use --mode
for differentiating different experimental setups. i.e. You could have --mode tomography
--mode ptychography
?
yes they are overlapping, and yes mode can be extended to define configuration related to techniques
First, the
pink
subcommand should not exist. Instead ofenergy pink
, user's should be typingenergy set pink
becausepink
is just a label for a stage setting, so it should be treated like every other stage setting.Second, the
mono
subcommand is mentioned in the README, but I think it has been replaced withset
.Third, the
add
andsave
commands are both mentioned in the README, but I think onlyadd
is a valid command now.