Open aljosahafner opened 3 years ago
I will start working on this very soon.
Version 1:
WiserBeamline
, which is a LibWiser
beamline? Or the last/connected optical element?print(beamline)
command from LibWiser
This is good. On this note (native scripts) I have some more comments.
I did extensive use, for instance, of the "GetBeamline" script
Generally, I am also using other "OASYS Snippets" that can be useful while using oasys canvas (see below). The problem is that I did not found an easy way to gather all these "pre-written" python widget in a unique place, where they can be picked up from. Every time I have to open the *.ow file that contains them, copy the code, paste it to the python widget in the destination canvas, rename the widget with a meaningful name.
OASYS was not conceived for creating "libraries" of python scripts, so I am not complaining :-) But maybe we can find a common strategy toghether. For instance I saw that SRW has a section called "native scripts". We could think about something similar.
If you already have these codes, then it is very easy to convert to a widget, especially those such as GetBeamline
, Check Source Name
, etc.
For my own reference: use AutomaticWidget
class for this and NOT WiserWidget
.
Great, it's working.
Some More features
Beamline>Print()
rathern than print(Beamline)
import clipboard B = GetWiserBeamline(in_object_1) out_object = B BeamlineCode = B.GenerateCode() print(BeamlineCode) clipboard.copy(BeamlineCode)
A widget that can be connected to any point in the beamline (most likely detector) and provide info on: