Commit 00659812 authored by Martin Drechsler's avatar Martin Drechsler

small change in dummy andor so that it changes image size with binning

parent f6b374b5
...@@ -54,15 +54,10 @@ class AndorZyla: ...@@ -54,15 +54,10 @@ class AndorZyla:
def live_acquisition_loop(self): def live_acquisition_loop(self):
self._set_image_area()
self.images_array = []
if self.TriggerMode.getString() == 'Software': if self.TriggerMode.getString() == 'Software':
pass pass
else: else:
t = threading.currentThread() t = threading.currentThread()
for i in range(10):
self.images_array.append(self._twoD_gaussian())
while getattr(t, "do_run", True): while getattr(t, "do_run", True):
self.current_image = self.images_array[self.acq_index_i%10] self.current_image = self.images_array[self.acq_index_i%10]
self.wait_for_image() self.wait_for_image()
...@@ -91,6 +86,9 @@ class AndorZyla: ...@@ -91,6 +86,9 @@ class AndorZyla:
def _set_image_area(self): def _set_image_area(self):
d = {'1x1': 2048, '2x2': 1024, '4x4': 512, '8x8': 256} d = {'1x1': 2048, '2x2': 1024, '4x4': 512, '8x8': 256}
self.ImageArea.setValue(d[self.AOIBinning.getValue()]) self.ImageArea.setValue(d[self.AOIBinning.getValue()])
self.images_array = []
for i in range(10):
self.images_array.append(self._twoD_gaussian())
def _twoD_gaussian(self, lim=10, sigma=1, x0=0, y0=0): def _twoD_gaussian(self, lim=10, sigma=1, x0=0, y0=0):
N = self.ImageArea.getValue() N = self.ImageArea.getValue()
......
...@@ -74,45 +74,7 @@ class MeasurementFrame(QtWidgets.QFrame, Ui_Frame): ...@@ -74,45 +74,7 @@ class MeasurementFrame(QtWidgets.QFrame, Ui_Frame):
self.treeModel.setData(self.treeModel.index(0, 1), (self.endValue.value()-self.startValue.value())/self.stepsNum.value() ) self.treeModel.setData(self.treeModel.index(0, 1), (self.endValue.value()-self.startValue.value())/self.stepsNum.value() )
except: except:
self.treeModel.setData(self.treeModel.index(0, 1), '?') self.treeModel.setData(self.treeModel.index(0, 1), '?')
"""
class MeasurementWorker(QtCore.QObject):
Backend for the measurement frame.
Simple scan measurement: for scanning a spinbox.
External scan measurement: scans an external object. For example, the rigol function generator.
def __init__(self):
super().__init__()
def make_connections(self, frontend, camera):
frontend.startMeasureButton.clicked.connect(self.simple_scan_measurement)
def simple_scan_measurement(self):
for l in LaserControlLayout._registry + LaserScanLayout._registry :
l.freeze()
scanSignal = self.get_scan_signal()
scan_array = create_measurement_array() # aca necesito parametros de los spinboxes de la measurementGUi
prepare_camara_to_triggered_acq() #includes stopping acquisition if it is in acq live
create_temporary_data_files
measurement loop:
set_scan_signal
wait_predefined_time
take_and_recibe_image
process_image_to_get_data
save_data
update_camera_gui_with_image_and_data
update_measurement_gui
for l in LaserControlLayout._registry + LaserScanLayout._registry :
l.unfreeze()
"""
if __name__ == '__main__': if __name__ == '__main__':
import sys import sys
from PyQt5 import QtWidgets from PyQt5 import QtWidgets
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment