Commit 8785f039 authored by Martin Drechsler's avatar Martin Drechsler

some bugs, fixing required

parent 4256cc80
......@@ -105,7 +105,8 @@ class anal_control_signal(QtCore.QObject):
if end<start:
array_of_steps = array_of_steps[::-1]
for i in array_of_steps:
self.AO.set_out(i)
if i<self.max and i>self.min:
self.AO.set_out(i)
......
......@@ -172,9 +172,9 @@ class CameraGuiMainWindow(QMainWindow):
self.cameraParamFrame.paramTree.t.setEnabled(True)
else:
self.repositionRoi(self.current_image_size)
self.scanROIdataX = np.linspace(0, 1, 2000)
self.scanROIdataY = np.zeros(2000)
self.timeROIdataY = np.zeros(2000)
self.scanROIdataX = np.linspace(0, 1, 10000)
self.scanROIdataY = np.zeros(10000)
self.timeROIdataY = np.zeros(10000)
self.iROIdata = 0
self.cameraButton.setText('Stop Acquisition')
self.measurementFrame.startMeasureButton.setEnabled(False)
......
......@@ -749,13 +749,17 @@ class AndorBase(SDK3Camera):
def live_acquisition_loop(self):
t = threading.currentThread()
timeout = self.ExposureTime.getValue() * 5000
if self.TriggerMode.getString()=='Internal':
timeout = self.ExposureTime.getValue() * 5000
if self.TriggerMode.getString()=='Software':
timeout = 1000000
while getattr(t, "do_run", True):
a_s, px_encoding, xs, ys, bufs = self._live_acq_auxs
try:
pData, lData = SDK3.WaitBuffer(self.handle, int(timeout))
except:
return
raise('Timeout in the camera')
img = create_aligned_array(xs*ys, 'uint16')
SDK3.ConvertBuffer(bufs[self.acq_index_i%len(bufs)].ctypes.data_as(ctypes.POINTER(ctypes.c_uint8)),
img.ctypes.data_as(ctypes.POINTER(ctypes.c_uint8)),
......
from PyQt5 import QtGui, QtCore
#from drivers.andorzyla import AndorZyla
from drivers.dummyAndor import AndorZyla
from drivers.andorzyla import AndorZyla
#from drivers.dummyAndor import AndorZyla
from cameraGui import CameraGuiMainWindow
from zylaCameraWorker import CameraWorker
......
......@@ -158,13 +158,17 @@ class CameraWorker(QtCore.QObject):
def simple_scan_measurement_step(self):
try:
print('Setting value of step')
value = next(self.scan_array_gen)
print('value set to ' + str(value))
self.ao_to_scan.AO.set_out(value)
print('value sent to ao')
# aca puede esperar o chequear algo, por ahora nada
self.cam.trigger()
except StopIteration:
print('trigger')
except:
self.simple_scan_measurement_end()
def get_scan_signal(self, ao_name):
return [ao for ao in anal_control_signal._registry if ao.name == ao_name][0]
......
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