Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
total_control_app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Martin Drechsler
total_control_app
Commits
17ed9d1d
Commit
17ed9d1d
authored
May 21, 2019
by
Martin Drechsler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
now measures dont freeze. A trigger is shot at the end to unlock the acq thread
parent
69c03a31
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
andorzyla.py
drivers/andorzyla.py
+5
-6
zylaCameraWorker.py
zylaCameraWorker.py
+9
-7
No files found.
drivers/andorzyla.py
View file @
17ed9d1d
...
...
@@ -59,7 +59,7 @@ def create_aligned_array(shape, dtype=np.typeDict['singlecomplex'], boundary=16)
class
Helper_messager
(
QtCore
.
QObject
):
imageAquiredSignal
=
QtCore
.
pyqtSignal
(
int
)
timeoutSignal
=
QtCore
.
pyqtSignal
()
class
AndorBase
(
SDK3Camera
):
...
...
@@ -752,17 +752,16 @@ class AndorBase(SDK3Camera):
if
self
.
TriggerMode
.
getString
()
==
'Internal'
:
timeout
=
self
.
ExposureTime
.
getValue
()
*
5000
if
self
.
TriggerMode
.
getString
()
==
'Software'
:
timeout
=
10000
00
timeout
=
10000
while
getattr
(
t
,
"do_run"
,
True
):
try
:
a_s
,
px_encoding
,
xs
,
ys
,
bufs
=
self
.
_live_acq_auxs
except
AttributeError
:
print
(
'AndorZyla object has no attribute _live_acq_auxs'
)
try
:
pData
,
lData
=
SDK3
.
WaitBuffer
(
self
.
handle
,
int
(
timeout
))
except
:
raise
Exception
(
'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
)),
...
...
zylaCameraWorker.py
View file @
17ed9d1d
...
...
@@ -51,7 +51,7 @@ class CameraWorker(QtCore.QObject):
# internal connections
self
.
cam
.
helper
.
imageAquiredSignal
.
connect
(
self
.
new_image_acquired
)
#self.cam.helper.timeoutSignal.connect()
def
__del__
(
self
):
print
(
"adios camera worker"
)
...
...
@@ -151,16 +151,17 @@ class CameraWorker(QtCore.QObject):
target
=
self
.
cam
.
live_acquisition_loop
)
self
.
acq_thread
.
start
()
with
self
.
_lock
:
#
with self._lock:
self
.
simple_scan_measurement_step
()
def
simple_scan_measurement_end
(
self
):
print
(
'entering scan ending in worker'
)
self
.
measurementEndingSignal
.
emit
()
self
.
cam
.
trigger
()
self
.
_stop_acquisition_loop
()
self
.
cam
.
TriggerMode
.
setString
(
'Internal'
)
self
.
ao_to_scan
.
go_softly_to_value
(
self
.
measure_params
[
'end'
])
self
.
measurementEndingSignal
.
emit
()
self
.
cam
.
TriggerMode
.
setString
(
'Internal'
)
print
(
'exiting scan ending in worker'
)
def
simple_scan_measurement_step
(
self
):
...
...
@@ -175,6 +176,8 @@ class CameraWorker(QtCore.QObject):
print
(
'trigger'
)
except
StopIteration
:
self
.
simple_scan_measurement_end
()
except
:
raise
def
get_scan_signal
(
self
,
ao_name
):
return
[
ao
for
ao
in
anal_control_signal
.
_registry
if
ao
.
name
==
ao_name
][
0
]
...
...
@@ -188,7 +191,6 @@ class CameraWorker(QtCore.QObject):
def
abort_measurement
(
self
):
self
.
scan_array_gen
.
close
()
self
.
simple_scan_measurement_end
()
print
(
'Measurement aborted'
)
@
QtCore
.
pyqtSlot
(
str
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment