Closed capitanevs closed 2 years ago
I haven't changed anything at all. If I remember correctly, these were checked just a few months ago and they were working. Can you specify a bit better what is not working, which widget, etc.
ow_gaussian_source_1d.py
(lines 182 to 188)ow_optical_element.py
(lines 540 to 546)We still have no all infos, but I guess the problem is on the "plane mirror". so in ow_optical_element.py.
Looking at the code, does it seems all ok to you?
The code for elements seems all ok for me, the question is whether everything works well in the library using setting:
self.rotation
self.transverse
self.longitudinal
All the optical elements widgets inherit from OWOpticalElement (ow_optical_element.py
)
Note1:
Design error: while writing "Slits" in LibWiser, the code was re-written from the Mirror Class (instead of using subclassing, inheritance).
Features which are present in Mirror but were not are not in slits
Features of Mirrors which would not make sense into slits, but are not dangerous
Temporary solution: I just short-linked the twofunctions
Error Found in LibWiser (shame on me)
xLab
appears instead of xNew
(the same for y)
After fixing the previous bug, I see that
The rotation angle affects somehow the computation (even if not as I would like to). If the angle is too high, aliasian occurs
Remember: now we have the two kind of output rays: nominal and real (it is not a problem, but I just point it out for me)
In the previous computations I used Rotation angles which were too big: angle * distance = displacement which was much greater than the size of the target element (the slits). Displacement was about 8 meters ( it should me mm).
In principle, what I expected to see was: flat or noisy field. ButI still could see the beam => why? strange aliasing effect?
Using meaningful Rotation angles I get correct results:
This is good
Below:
I see what I expected, with Rotation angle "slightly" greater than the angular acceptance of the target (brown)
Below:
for angles over 10,I see again the peak
Insight: probably it is because we are seeing the "higher" orders of the simulations. I.E. the plane mirror is sampled with a certain number of points, which make it act as a grating if we put the detector at proper angles!
It works!
Is it ready to be implemented in OasysWiser?
I close the issue. I will reopen it if something is wrong.
Can I update LibWiser on PyPI and therefore in OasysWiser?
A user just complained that "rotation", "transverse displacemente" within the displacement tab are no longer working.
We should not have changed them, and for sure they were working (as these people made a paper using these very old-dated features, so I guess they know what are talking about :-)
Can we check that they are properly linked from the GUI for ALL the elements (e.g. source, plane mirror, ellipsoidal mirror, detector)? Lately, we had some "GUI-link" issues, even if they were on new stuff (not old one). I guess.... it could be better to have a look.
At the same time, I will check that everything is ok on the library.