Closed capitanevs closed 3 years ago
I found one mistake I did in the focussing mirror:
If I manually set the distance, I get an "almost right result" LibWiser:
Oasys:
QUITE good, but... LibWiser has a wrong scale?
fm_h.PlotIntensity()
return the right plot
Beamline.PlotIntensity()
does not
I'll fix this...
Plot bug corrected .
Also the focusing on the detector now is correct:
I close, update and save.
I get errors at the detector:
On problem is the mu character of enf formatting (omg). I fix this
However there must be another problem somewhere else. Look at the intensity on the KB.
I see that the distances of slits and KB are WRONG:
ARE WE SURE THAT UPDATING DOES NOT AFFECT SAVED PARAMETERS? (old question)
The widget of KB has been defaulted!
before F1 and F2 were 99 and 1.4 and distance was 99.
investigate
also the names have been changed
I do "save", close Oasys, open test_wiser_margot_correct3.ows and see that the new name is correctly stored
Conclusion: Some kind of updates do generate problems.
Conclusions
test_wiser_margot_correct3.zip just rename zip into ows
Now, together wi Aljosa
file: margot3, before update
About Numba:
Intermediate Conclusions
* Please push the fixed version of Units * Does this help, after Numba update (seems to be the source of previous errors) I am getting this error with FigureError ![image](https://user-images.githubusercontent.com/51963146/123240881-ff8b1580-d4e0-11eb-9d61-ef2acdcfaa6d.png)
Interesting and curious.
I obviously conceived the message because it often happened that one of the two arrays was 0 length (itis what it is written). But even more obviously this is not what is happening: they are 5000 and 5016 long. np.linspace seems to be a good candidate
I will check.
Can you share the very same file?
Definitely the source of the "data not plottable" is Units package! If I remove the usage of GetAxisSI out, then the error dissapears!
Definitely the source of the "data not plottable" is Units package! If I remove the usage of GetAxisSI out, then the error dissapears!
Yes, but how? GetAxisSI is returning two values: an array (which does no contain strings) and a character, which we hardcoded to "K". There must be another link to Units.py.....
I sent you an E-mail, maybe this helps with debugging...
I am confused... this is what I get now with the same lines...
When you have time, let's try to run this test code
#%%
from LibWiser import Units
import numpy as np
Units.PrefixLookup['u']
Units.PrefixLookup['μ']
x = 2e-6
xx = np.array([x, 2*x])
Units.GetEngFormatWithPrefix(x)
#Units.GetEngFormatWithExponential(x)
Units.GetEngArgument(x)
Units.GetEngPrefix(x)
Units.GetEngInfo(xx)
Units.GetEngAxis(xx)
Units.GetAxisSI(xx)
there's my output
Ok, that IS really funny...
Going to lunch now, back on it late....
I have pushed my latest version of units
Yes, it's the character, somehow you can't pass it around, probably some encoding problem... Let's try to avoid this character entirely
This is even more funny
Ok, the mu is now totally disappeared.
Excellent! Plotting works, starting from v0.2.29
!
What remains to be solved from this test session is the FigureError.
This was a long thread. We found&fixed a lot of things.
I think that the only still open question is whether "save&restore" is really stable.
We do not have a procedure for re-creating the save&restore errors, and I have not found any in the last updates.
I'll close this issue.
Here I test the following beamline.
The first results I get are:
LibWiser:
Oasys:
So, there is a problem in positioning.
Let's have a look at the widget settings.... (next)