Commit 63640556 authored by Martin Drechsler's avatar Martin Drechsler

more changes

parent e3836e5b
......@@ -63,7 +63,6 @@ class CameraGuiMainWindow(QMainWindow):
self.label = QLabel("Counter of frames")
self.d1.addWidget(self.label)
self.param_tree = CameraParameterTree()
self.d3.addWidget(self.param_tree.t)
......
......@@ -747,10 +747,7 @@ class AndorBase(SDK3Camera):
while getattr(t, "do_run", True):
a_s, px_encoding, xs, ys, bufs = self._live_acq_auxs
try:
# start = time.time()
pData, lData = SDK3.WaitBuffer(self.handle, 10000)
# end = time.time()
# print(end-start)
except:
return
img = create_aligned_array(xs*ys, 'uint16')
......
from pyqtgraph import ROI
class CustomRectangularROI(ROI):
"""
Rectangular ROI subclass with a single scale handle at the top-right corner.
============== =============================================================
**Arguments**
pos (length-2 sequence) The position of the ROI origin.
See ROI().
size (length-2 sequence) The size of the ROI. See ROI().
centered (bool) If True, scale handles affect the ROI relative to its
center, rather than its origin.
sideScalers (bool) If True, extra scale handles are added at the top and
right edges.
\**args All extra keyword arguments are passed to ROI()
============== =============================================================
"""
def __init__(self, pos, size = [8, 8], centered=False, sideScalers=False):
#ROI.__init__(self, pos, size, **args)
super().__init__(pos, size, centered, sideScalers)
## handles scaling horizontally around center
self.addScaleHandle([1, 0.5], [0.5, 0.5])
self.addScaleHandle([0, 0.5], [0.5, 0.5])
## handles scaling vertically from opposite edge
self.addScaleHandle([0.5, 0], [0.5, 1])
self.addScaleHandle([0.5, 1], [0.5, 0])
## handles scaling both vertically and horizontally
self.addScaleHandle([1, 1], [0, 0])
self.addScaleHandle([0, 0], [1, 1])
self.sigRegionChangeFinished.connect(self.correct_scaling)
def correct_scaling(self):
x, y = self.pos()[0], self.pos()[1]
print(x, y)
if x%8 != 0 or y%8 != 0:
self.setPos((x//8)*8, (y//8)*8)
\ No newline at end of file
......@@ -11,8 +11,8 @@ Created on Thu Apr 4 11:10:20 2019
import numpy as np
from PyQt5 import QtCore
from drivers.andorzyla import AndorZyla
#from dummyAndor import AndorZyla
#from drivers.andorzyla import AndorZyla
from dummyAndor import AndorZyla
import threading
......
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