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
f8270ea3
Commit
f8270ea3
authored
Dec 21, 2021
by
bliss administrator
Browse files
fscan compatible with daiquiri compatible fast_shutter
parent
f04daa1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
id26/controllers/fscan_controller.py
View file @
f8270ea3
import
numpy
[
import
numpy
import
time
import
math
import
gevent
...
...
@@ -39,7 +39,7 @@ from bliss.controllers.calccnt_background import BackgroundCalcCounterController
from
bliss.controllers.lima.lima_base
import
Lima
from
id26.musst_prg.zap_musst_prg
import
zap_musst_program_data
from
id26.controllers.fast_shutter
import
FShutterChainPreset
from
id26.controllers.fast_shutter
import
FShutterChainPreset
,
ID26FastShutterState
'''
...
...
@@ -154,7 +154,7 @@ class ID26FScanController:
for
id
in
list
(
self
.
_get_id_tracked
()):
msg
+=
f
"
{
id
.
name
}
"
msg
+=
f
"
\n
FShutter is
{
'AUTO'
if
self
.
opiom
.
getOutputStat
(
'FSON'
)
==
'ON'
else
self
.
fast_shutter
.
state
()
}
\n
"
msg
+=
f
"
\n
FShutter is
{
'AUTO'
if
self
.
opiom
.
getOutputStat
(
'FSON'
)
==
'ON'
else
self
.
fast_shutter
.
state
.
value
.
upper
()
}
\n
"
msg
+=
f
"
\n
Monochromator:
{
self
.
dcm
.
name
}
,
{
self
.
mono
.
name
}
{
self
.
mono
.
controller
}
\n
"
msg
+=
f
" ID tracker:
{
self
.
idtracker
.
pseudos
[
0
].
name
if
self
.
idtracker
is
not
None
else
None
}
, ID synchro:
{
self
.
wago
.
name
if
self
.
wago
else
None
}
\n
"
if
self
.
idtraj
:
...
...
@@ -306,7 +306,7 @@ class ID26FScanController:
@
property
def
synchro_delay
(
self
):
delay
=
self
.
fscan_par
[
"pm600_wp_delay"
]
if
self
.
fshutter
.
state
()
==
"
AUTO
"
:
if
self
.
fshutter
.
state
==
ID26FastShutterState
.
AUTO
:
delay
+=
self
.
fshutter
.
delay
return
delay
...
...
@@ -720,7 +720,8 @@ class ID26FScanController:
#_idtimebase, _idpositions = self.idtraj._id_prog_trajectory (energy_start, energy_end, duration, prf_intervals)
#to start energy scan after synchro_delay
if
self
.
fshutter
.
state
()
==
'AUTO'
and
0
:
#TODO never tested, this would work only if duration/self.synchro_delay is really integer
if
self
.
fshutter
.
state
==
ID26FastShutterState
.
AUTO
and
0
:
#TODO never tested, this would work only if duration/self.synchro_delay is really integer
_idtimebase
,
_idpositions
=
self
.
idtraj
.
_id_prog_trajectory
(
energy_start
,
energy_end
,
duration
,
int
(
duration
/
self
.
synchro_delay
))
_esti
=
_idpositions
[
1
:]
-
_idpositions
[:
-
1
]
_idposlist
=
[
_idpositions
[
0
]
-
_esti
[
0
]]
+
list
(
_idpositions
)
...
...
@@ -892,7 +893,7 @@ class ID26FScanController:
# AUTO FAST SHUTTER PRESET
if
self
.
fshutter
.
state
()
==
"
AUTO
"
:
if
self
.
fshutter
.
state
==
ID26FastShutterState
.
AUTO
:
if
self
.
fscan_par
[
"id_linked"
]:
chain
.
add_preset
(
IDlinkedFShutterChainPreset
(
self
.
fshutter
))
else
:
...
...
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