Closed capitanevs closed 4 years ago
Good idea, I was just thinking about this. We should however keep the fields and buttons as universal as possible.
True, you are right. We can insert in the possible "predefined phrases" the "Custom option" open. Depending on the selected "phrase" you have different fields. With "Custom" option you get access to the 3 fields ReferTo, What, Where.
Any better solution is welcome.
Located in widgets/gui/ow_wise_widget.py -> Function build_positioning_directive_box(self, container_box, width, element_type=ElementType.SOURCE)
class PositioningDirectivesPhrases:
class Type:
Autofocus = 'Autofocus'
DistanceFromPrevious = 'Fixed distance from previous OE'
DistanceFromSource = 'Fixed distance from source'
Custom = 'Custom positioning directives'
These will be the elements in the combo box. Any more?
The strings (e.g. 'Fixed distance from previous OE') are they the ones supposed to appear in the ComboBox?
I think 4 cases is all we need for the moment. We will add if need be.
There are four cases:
The one with Autofocus has no distance:
Other ones have distance:
TODO: For "Custom" case show What, Where and ReferTo fields.
Looks great!
Displacement means SmallDisplacements. Please install Oasys and check, all the optical elements have such layout.
Yes, these are the next things to do, thanks for reminding again.
Thanks. Oasys cross checks are planned with the first all-wiser version. Most unfortunately I am out of the time for revising the current version "as is", which is the reason why I rely on you and on your reports.
Looking at the GUI: I would remove all the non-necessary distinctions. For instance, "Position" is clear enough. Now, I would not further add "Positioning directives" (which is code-name slang, but may be not so clear to the user). How about making the current substitutions? Type => Action: "Fixed distance from..." => "Set fixed distance from"
Hey, this is the status and besides previous optical element, it is properly wired.
Default, fixed distance from source:
Autofocus + menu:
Distance from previous OE:
Custom positioning directives:
Thanks for the updates. Minor comments:
-The "custom" options should not have X and Y because they are really unusable :-). I have never used then even for debug purposes. Sorry, I did not tell you about that.
Thanks!
X, Y is for absolute positioning... This is really cosmetics, I can remove it of course...
Of course, making a nice GUI IS cosmetics. Yes, we shall remove them. I have never happened to use them, and I have always locked the source to (0,0).
Still to add:
The present issue is closed. Done define the GENERAL layout of positioning directives, i.e. => OASYS standard w.r.t. WISER standard
Still To do Improve the user experience of "smart focusing". "Smart focusing" behaves differently according to what elements are involved. This can be confusing. Think of it.
Now Positioning directives (PD) in OASYS allow "full control" to parameters
ReferTo
,What
,Where
. I think this is too complicated (not all the combinations are possible for all the optical elements), and it shall be improved.A solution is define the PD we really need and prepare almost-locked combinations.
Some mostly used PD are:
-"Measure distance from Source" / "Set downstream of the source" (ReferTo = Source, What = centre, Where = centre, SameOrientation = Anye?) Label: "Reference Element" ---> Source.Name Fields: "Distance" ---> linked to Distance
-"Measure distance from previous optical element" / "Set downstream"
(ReferTo = upstream, What = centre, Where = centre, SameOrientation = false) Label: "Reference Element" ---> (GetParent(self, SameOrientation=False, OnlyReference=True)).Name Fields: "Distance" ---> linked to Distance
-"Autofocus" /"Set in the focus" (ReferTo = upstream, What = centre, Where = downstream focus, SameOrientation = ?) Label: "Reference Element" ---> print the name of the reference focussing mirror Fields: "Defocus" ----> linked to Distance this is used for instance with detectors,