Closedown

This commit is contained in:
gac-x03da
2023-08-22 12:16:22 +02:00
parent 0c8c97dfc1
commit 641470ac84
2 changed files with 18 additions and 15 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
#Tue Aug 22 11:56:01 CEST 2023
#Tue Aug 22 12:13:56 CEST 2023
LastRunDate=230822
FileSequentialNumber=18663
DaySequentialNumber=5
FileSequentialNumber=18666
DaySequentialNumber=8
+15 -12
View File
@@ -72,17 +72,19 @@ be_axis.setRange(eb2, eb1)
def plot_cur_spectrum():
try:
while get_context().state.running:
y = Scienta.spectrum.take(100)
x = Scienta.spectrumX
#x = Scienta.spectrumScale.take(100)
if len(y)>len(x):
y=y[:len(x)]
spectrum_series.setData(x, y)
eb2, eb1 = get_binding_range(plots[0])
if (be_axis.min != eb2) or (be_axis.max != eb1):
plots[0].resetZoom()
be_axis.setRange(eb2, eb1)
#y = Scienta.spectrum.take(100) ###TODO restore
y = Scienta.spectrum.read()
if y is not None:
x = Scienta.spectrumX
#x = Scienta.spectrumScale.take(100)
if len(y)>len(x):
y=y[:len(x)]
spectrum_series.setData(x, y)
eb2, eb1 = get_binding_range(plots[0])
if (be_axis.min != eb2) or (be_axis.max != eb1):
plots[0].resetZoom()
be_axis.setRange(eb2, eb1)
time.sleep(1.0)
finally:
@@ -145,7 +147,8 @@ try:
if beam_ok:
if image_data is None:
time.sleep(2.0)
(_width, _height) = Scienta.getImageSize()
size = Scienta.getImageSize()
(_width, _height,) = (size[0], size[1])
break
if ydata is None:
ydata = spectrum_array