Users limits are not necesserly low/hi
If the axis.sign = -1
, the user limits[0]
is bigger than limits[1]
That's not a fatality.
The user space is an abstraction on top of the dial. You should not have to know the sign
of the axis to deal with the user limits.
It would be better to normalize that for the level of abstraction you use -> limits[0] <= position <= limits[1]
.
The exact same way you have dial_limits[0] <= dial <= dial_limits[1]
.
The Axis
API could provide consistent limits by default, by specification.
There is many place in place in BLISS where there the code swap the result of limits. This would not be needed anymore.
Here is for example a code from HKL, where the code is actually probably wrong.
axis_lim = axis.limits
...
for lm in traj_lim:
if not axis_lim[0] <= lm <= axis_lim[1]: