Open capitanevs opened 3 years ago
I suggest a mail to Luca. He probably knows ...
Ok. Before doing that, I would try as follows:
I'll post an old answer of Luca here, just as common starting point.
Note: on MM laptopt, the recent update of OASYS was not installed (and the problem still persisted)
MARGOT TEST OWS attached here
Rename from .MOV to .OWS to make it work :-)**
It works in my installation, file: test_wiser_margot_correct2_READONLY.ows
It works in my installation, file: test_wiser_margot_correct2_READONLY.ows
please be sure that we all use the same file.
The correct one is test_margot_03_READONLY.ows
You're right, that one gets reset. Maybe there is some problem with Positioning directives, saving with a different one to the default?
file: test_margot_03_READONLY.ows
OS: (macOS) Catalina
RESULT: BAD :-(, values are defaulted (e.g. elliptical mirror F1=98)
You're right, that one gets reset. Maybe there is some problem with Positioning directives, saving with a different one to the default?
I do not understand exactly what you mean:-)
WISER has no default values, but oasys widget have. In addition, this is not a matter of PositioningDirectives only, but of all the attributes (F1 and F2 are sent to init, not to PositionindDirectives). So the problem is somewhere in OASYS, I would say.
If you have some idea for a test for this involving LibWiser, I can do a counterproof.
In the meanwhile, since we have the issue an all the platforms, we need to roll back OASYS-Wiser (of 1,2,3 versions?) and see whether we can get the right values back.
Can you possibly handle this?
There is a problem with the pickle
module for this specific file, that's why it happens. It's not a problem of LibWiser, but ows files of course. You can always revert the version by doing:
pip install oasys1-oasyswiser==version_no
So, I have tried LOTS of combination and couldn't manage to run the file: OASYS Tests/Test Margot/test_margot_03_READONLY.ows
The following combinations don't work (don't open the file with correct numbers)
Maybe we need to try some other strategy...
My OS File browser says the file test_margot_03_READONLY.ows
was last modified on 26. 8. 2021, there haven't been that many versions of OASYS1-oasyswiser
and LibWiser
since then, so at least the last one should be able to open it.
That's VERY interesting.
Premise: I clearly made some mistake in the process. test_margot_03_READONLY.ows is not really "read only" on my laptopt (wtf?). I sweared it was, but it is not. This means that there might have been a wrong saving operation on 26.8.2021, of which we still do not understand the causes (for sure I have never put the default values, for all the widgets, manually). But there is some partially good news:
I have a backup file in my "\old\" folder
test_margot_correct3_READONLY.ows => is still readonly, and it was last modified on 18.03.2021.
test_margot_03_READONLY.ows => wrong numbers Itest_margot_correct3_READONLY.ows => right numbers
Conclusion: Reading "seems" to work. Still do not know why in "margot_03" values are defaulted.
What to do now? All this is quite frustrating, We could: change the default values of the elliptical mirror focals F1, F2 to 0. Then cast an error message
If F1==0 or F2==0 then
errorMessage("Focal lengths of the elliptical mirror can not be 0. Please check them"
This is just a different strategy to monitor the behavior of this thing: if it occurs, you will realize it as easily as me (4 eyes are better than 2).
The other thing we can do is write an email to Janes&co and say: "Hey, sometimes our values are defaulted, but we do not know when and why. There is something we can do, like adding a warning somewhere in OASys"?
What you think of all this?
Ok, I can read the one in old
fine with the latest versions, values are not defaulted.
Ok, good. This is what I see in my \old\ folder
What do you think about setting F2 of the elliptic mirror to 0 and then cast the error message?
That means that always when you add an optical element you get this error?
Sorry, I was unclear.
The idea is: " if a certain value is 0 when you launch the computation, then cast the error message", not "when you drop an optical element" :-)
This is new...
-I create a new file ("untitled.ows"), i use gaussian source + elliptical mirror + detector. -I change "Displacement" in the source (and see nothing, which is another issue). "Longitudinal" is set to -15 -I close the ows, without saving. -I open another workspace (Wiser Snippets.ows) -I open the source and the "Longitudinal" displacement is still at -15...Also the values of the mirror are the same of the "untitled.ows"
This stuff is quite unpredictable
Note: I DID NOT close oasys, I just opened "wiser Snippets.ows" in the same session
TO DO
Then everything should gear up automatically.
Did new test: on new default falues F1 and F2 of elliptical mirror:
case 1 -open oasys -deploy an elliptical mirror widget -double click -F1 = 0, F2 = 0 => As (I) expected
case 1b) -the same as 1)
we still have to check what is gonna happen when defaulting occurs because "load ows" fails
We still have the Save/Load issue.
Because of its persistence, I will promote it to the nastiest bug ever, and the one with the highest priority.
What doest it happen At a certain point, the values stored in *.ows file are defaulted.
How do I see it? I have created a test workspace long time ago (Margot_3), which I marked as READONLY, (an which is read only on my laptop). This ensure that I have never overwritten the values since the file creation. The "right" values are written in ows file as comment.
What shall we do?