Closed capitanevs closed 2 years ago
I see, you're right, this has to be fixed.
Keep in mind
Of course!
YEah yeah, it was for "personal" notice:) I mean, always get confused on what the meaning of X/YScaling is supposed to be (if the scaling of the written data, or if the factor I have to multiply once I have read them to make them in the SI system; apparently it is the first one. :)
Bug fixed in 0.3.19
. Please close when tested.
The figure error is read correctly (x>mm, y>nm)
However the intensity on the element has changed?
No figure error
With figure error
For sure before the update (if the good numbers were given) this was not happening.
Ok, weird, let's discuss today.
A Problem could still be that the x and y are not returned properly (because of the scaling factor)
if the figure error is too high,then we are deformating the mirror a lot, and we do not know what is happening to the scattered light.
i messed on a similar problem my as well:) maybe it is the same.
This error is still persistent and it has nothing to do with the issue related to "ignore" function.
Do we have any clue?
Ok, I haven't been to this issue yet. I need to do a bit more thorough inspection, as at the moment everything seems fine (lines 548 to 579 in ow_optical_element.py).
if self.use_figure_error == 1:
libWiserOE.CoreOptics.ComputationSettings.UseFigureError = True
if ((self.figure_error_select_file_format == FIGURE_ERROR_FILE_FORMAT.HEIGHT_ONLY) or
(self.figure_error_select_file_format == FIGURE_ERROR_FILE_FORMAT.SLOPE_ONLY)):
figure_error_step_final = self.figure_error_step
figure_error_xscaling_final = 1.
figure_error_yscaling_final = self.figure_error_YScaling * figure_error_units[self.figure_error_height_unit]
elif self.figure_error_select_file_format == FIGURE_ERROR_FILE_FORMAT.POSITION_AND_HEIGHT:
figure_error_step_final = None
figure_error_xscaling_final = figure_error_units[self.figure_error_step_unit]
figure_error_yscaling_final = self.figure_error_YScaling * figure_error_units[self.figure_error_height_unit]
elif self.figure_error_select_file_format == FIGURE_ERROR_FILE_FORMAT.ELETTRA_LTP_JAVA1:
figure_error_step_final = None
figure_error_xscaling_final = 1.
figure_error_yscaling_final = self.figure_error_YScaling
elif self.figure_error_select_file_format == FIGURE_ERROR_FILE_FORMAT.ELETTRA_LTP_DOS:
figure_error_step_final = None
figure_error_xscaling_final = 1.
figure_error_yscaling_final = self.figure_error_YScaling
libWiserOE.CoreOptics.FigureErrorLoadFromFile(PathFile=self.figure_error_file,
FileType=self.figure_error_select_file_format,
Step=figure_error_step_final,
#Delimiter=self.figure_error_delimiter,
SkipLines=int(self.figure_error_skip_rows),
XScaling=figure_error_xscaling_final,
YScaling=figure_error_yscaling_final
)
But the plot is also not updating upon change of units, which gives me no confidence in my answer :)
Hey, I solved the "bug".
libWiserOE.CoreOptics.FigureErrorLoadFromFile(PathFile=self.figure_error_file,
FileType=self.figure_error_select_file_format,
Step=figure_error_step_final,
#Delimiter=self.figure_error_delimiter,
SkipLines=int(self.figure_error_skip_rows),
XScaleFactor=figure_error_xscaling_final,
YScaleFactor=figure_error_yscaling_final
)
The underlying code in LibWiser changed, before it was called XScaling
and YScaling
, now it has another name YScaleFactor
and XScaleFactor
.
Sorry for the inconvenience. Now it works and it works nicely!
What does Scaling do?
I expect in the previous image to change the Y on the chart, but it does not.
Similarly for "Height Unit"