Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cfel-sc-public
Kamzik3
Commits
f4e5c007
Commit
f4e5c007
authored
May 19, 2022
by
Jerome Carnis
🦊
Browse files
deviceEigerP11.py: create constants for default frame numbers
parent
31c4e12e
Pipeline
#28463
passed with stages
in 11 minutes and 4 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
kamzik3/devices/deviceEigerP11.py
View file @
f4e5c007
...
...
@@ -32,6 +32,11 @@ from kamzik3.macro.step import Step, StepDeviceMethod
from
kamzik3.snippets.snippetsDecorators
import
expose_method
FRAMES_PER_FILE_SCAN
=
1000
FRAMES_PER_FILE_LIVE
=
1000000
# any large number is ok, images are not saved in the live-view mode
class
InterfaceStatus
(
IntEnum
):
"""Status of the Eiger interface (filewriter, eigerstream, monitor)."""
...
...
@@ -184,7 +189,6 @@ class DeviceTangoEigerDetector(DeviceTango):
:param Exposure: desired exposure time per frame
"""
frames_per_file
=
1000000
self
.
logger
.
info
(
"Live view has started."
)
self
.
set_attribute
([
"TriggerMode"
,
VALUE
],
TriggerMode
.
INTS
.
value
)
if
self
.
file_writer
is
not
None
:
...
...
@@ -192,7 +196,9 @@ class DeviceTangoEigerDetector(DeviceTango):
self
.
set_attribute
(
[
"FileWriter"
,
"Mode"
,
VALUE
],
InterfaceStatus
.
DISABLED
.
value
)
self
.
set_attribute
([
"FileWriter"
,
"NimagesPerFile"
,
VALUE
],
frames_per_file
)
self
.
set_attribute
(
[
"FileWriter"
,
"NimagesPerFile"
,
VALUE
],
FRAMES_PER_FILE_LIVE
)
if
self
.
eiger_stream
is
not
None
:
self
.
logger
.
info
(
"EigerStream disabled"
)
self
.
set_attribute
(
...
...
@@ -205,11 +211,11 @@ class DeviceTangoEigerDetector(DeviceTango):
self
.
set_attribute
([
"FrameTime"
,
VALUE
],
frame_time
)
self
.
set_attribute
([
"CountTime"
,
VALUE
],
exposure
)
self
.
set_attribute
([
"Ntrigger"
,
VALUE
],
1
)
self
.
set_attribute
([
"Nimages"
,
VALUE
],
frames_per_file
)
self
.
set_attribute
([
"Nimages"
,
VALUE
],
FRAMES_PER_FILE_LIVE
)
self
.
Arm
()
self
.
Trigger
()
self
.
set_value
(
ATTR_FRAME_COUNT
,
self
.
get_value
(
ATTR_FRAME_COUNT
)
+
frames_per_file
ATTR_FRAME_COUNT
,
self
.
get_value
(
ATTR_FRAME_COUNT
)
+
FRAMES_PER_FILE_LIVE
)
@
expose_method
()
...
...
@@ -409,6 +415,8 @@ class EigerScanner(DeviceScanner):
[
"FileWriter"
,
"Mode"
,
VALUE
],
InterfaceStatus
.
ENABLED
.
value
)
self
.
detector
.
set_attribute
([
"FileWriter"
,
"NamePattern"
,
VALUE
],
path
)
self
.
detector
.
set_attribute
([
"FileWriter"
,
"NimagesPerFile"
,
VALUE
],
1000
)
self
.
detector
.
set_attribute
(
[
"FileWriter"
,
"NimagesPerFile"
,
VALUE
],
FRAMES_PER_FILE_SCAN
)
self
.
detector
.
Arm
()
Write
Preview
Supports
Markdown
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