Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BCU-Vercors
ID26
id26
Commits
0dd3c7a3
Commit
0dd3c7a3
authored
Mar 09, 2022
by
bliss administrator
Browse files
check eneund.controller.approx before programming motion
parent
ad101cb1
Changes
1
Hide whitespace changes
Inline
Side-by-side
id26/scripts/xas.py
View file @
0dd3c7a3
...
...
@@ -587,15 +587,19 @@ class ID26StepXAS(ID26Measurement):
# get a list of "tracked" undulators:
undu_list
=
[]
motion
=
()
for
one_undu
in
setup_globals
.
get_available_undulators
():
print
(
one_undu
.
name
)
if
(
one_undu
.
name
[
0
]
==
'u'
and
one_undu
.
track
()
==
True
):
undu_list
=
undu_list
+
[
one_undu
.
name
]
# calculate desired gap openings for each "tracked" undulator and save into "xas_pos" Position Instance
for
undname
in
undu_list
:
pos
=
setup_globals
.
name_to_obj
(
undname
).
position
calc_position
=
ENEUND
.
controller
.
undu
.
energy2undulator
(
setup_globals
.
name_to_obj
(
undname
),
energy_target
)
xas_pos
.
position
(
setup_globals
.
name_to_obj
(
undname
),
calc_position
)
motion
+=
(
setup_globals
.
name_to_obj
(
undname
),
calc_position
)
if
abs
(
calc_position
-
pos
)
>
ENEUND
.
controller
.
approx
:
xas_pos
.
position
(
setup_globals
.
name_to_obj
(
undname
),
calc_position
)
motion
+=
(
setup_globals
.
name_to_obj
(
undname
),
calc_position
)
xas_pos
.
move
(
*
motion
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment