Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bliss-tomo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tomo
bliss-tomo
Commits
a9bb5c0c
Commit
a9bb5c0c
authored
4 months ago
by
Perceval Guillou
Browse files
Options
Downloads
Patches
Plain Diff
add ximea det in shutter presets
parent
c8010d8d
No related branches found
No related tags found
1 merge request
!303
Draft: Id16a holo
Pipeline
#193286
failed
4 months ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tomo/scan/presets/dark_shutter.py
+17
-1
17 additions, 1 deletion
tomo/scan/presets/dark_shutter.py
tomo/scan/presets/fast_shutter.py
+13
-1
13 additions, 1 deletion
tomo/scan/presets/fast_shutter.py
with
30 additions
and
2 deletions
tomo/scan/presets/dark_shutter.py
+
17
−
1
View file @
a9bb5c0c
...
...
@@ -29,15 +29,25 @@ class DarkShutterPreset(ScanPreset):
Close shutter
"""
self
.
restore_params
=
{}
self
.
restore_shutter_mode
=
None
dets
=
[
node
.
device
for
node
in
scan
.
acq_chain
.
nodes_list
if
isinstance
(
node
,
LimaAcquisitionMaster
)
]
for
det
in
dets
:
if
det
.
camer
a_type
==
"
Frelon
"
:
if
det
.
proxy
.
lim
a_type
==
"
Frelon
"
:
det
.
shutter
.
mode
=
"
MANUAL
"
det
.
shutter
.
close_time
=
0.0
elif
det
.
proxy
.
lima_type
==
"
Ximea
"
:
proxy
=
det
.
_get_proxy
(
'
Ximea
'
)
self
.
restore_params
[
proxy
]
=
(
"
gpo_mode
"
,
proxy
.
gpo_mode
)
proxy
.
gpo_mode
=
'
OFF
'
self
.
restore_shutter_mode
=
self
.
shutter
.
mode
self
.
shutter
.
mode
=
self
.
shutter
.
MANUAL
print
(
f
"
\n
Preparing shutter for
{
scan
.
name
}
\n
"
)
print
(
f
"
Closing the dark shutter
"
)
...
...
@@ -54,3 +64,9 @@ class DarkShutterPreset(ScanPreset):
if
self
.
open_shutter
:
print
(
f
"
Opening the dark shutter
"
)
self
.
shutter
.
open
()
for
obj
,
(
attr
,
value
)
in
self
.
restore_params
.
items
():
setattr
(
obj
,
attr
,
value
)
if
self
.
restore_shutter_mode
is
not
None
:
self
.
shutter
.
mode
=
self
.
restore_shutter_mode
\ No newline at end of file
This diff is collapsed.
Click to expand it.
tomo/scan/presets/fast_shutter.py
+
13
−
1
View file @
a9bb5c0c
...
...
@@ -29,6 +29,7 @@ class FastShutterPreset(ScanPreset):
Open shutter if shutter controlled by detector
"""
self
.
soft_shutter
=
False
self
.
restore_shutter_mode
=
None
dets
=
[
node
.
device
...
...
@@ -37,7 +38,7 @@ class FastShutterPreset(ScanPreset):
]
det
=
dets
[
0
]
if
len
(
dets
)
==
1
else
None
if
det
is
not
None
and
det
.
camer
a_type
==
"
Frelon
"
:
if
det
is
not
None
and
det
.
proxy
.
lim
a_type
==
"
Frelon
"
:
if
det
.
camera
.
image_mode
==
"
FULL FRAME
"
:
det
.
shutter
.
mode
=
"
AUTO_FRAME
"
det
.
shutter
.
close_time
=
self
.
shutter
.
closing_time
...
...
@@ -45,6 +46,14 @@ class FastShutterPreset(ScanPreset):
self
.
soft_shutter
=
True
det
.
shutter
.
mode
=
"
MANUAL
"
det
.
shutter
.
close_time
=
0.0
elif
det
is
not
None
and
det
.
proxy
.
lima_type
==
"
Ximea
"
:
proxy
=
det
.
_get_proxy
(
'
Ximea
'
)
if
proxy
.
gpo_mode
==
'
OFF
'
:
self
.
soft_shutter
=
True
self
.
restore_shutter_mode
=
self
.
shutter
.
mode
self
.
shutter
.
mode
=
self
.
shutter
.
MANUAL
elif
self
.
shutter
is
not
None
:
self
.
soft_shutter
=
True
...
...
@@ -62,3 +71,6 @@ class FastShutterPreset(ScanPreset):
"""
if
self
.
soft_shutter
and
self
.
close_shutter
:
self
.
shutter
.
close
()
if
self
.
restore_shutter_mode
is
not
None
:
self
.
shutter
.
mode
=
self
.
restore_shutter_mode
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment