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
ID11
id11
Commits
3963ff68
Commit
3963ff68
authored
Jan 28, 2020
by
Emmanuel Papillon
Browse files
* counting preset for 3dxrd
parent
32b1c534
Changes
1
Hide whitespace changes
Inline
Side-by-side
id11/tdxrd/counts.py
0 → 100644
View file @
3963ff68
from
bliss.config.static
import
get_config
from
bliss.common.scans
import
DEFAULT_CHAIN
from
bliss.scanning.chain
import
ChainPreset
def
set_frelon_trigger
():
config
=
get_config
()
chaincfg
=
config
.
get
(
"chain_3dxrd_trig"
)
DEFAULT_CHAIN
.
set_settings
(
chaincfg
[
"chain_config"
])
def
set_frelon_gate
():
config
=
get_config
()
chaincfg
=
config
.
get
(
"chain_3dxrd_gate"
)
DEFAULT_CHAIN
.
set_settings
(
chaincfg
[
"chain_config"
])
def
set_frelon_soft
():
DEFAULT_CHAIN
.
set_settings
({})
class
CountMuxPreset
(
ChainPreset
):
def
__init__
(
self
,
opmux
):
self
.
opmux
=
opmux
def
prepare
(
self
,
chain
):
devused
=
[
node
.
name
for
node
in
chain
.
nodes_list
]
frelons
=
[
name
for
name
in
devused
if
name
.
startswith
(
"frelon"
)
]
frelon2mux
=
{
"frelon1"
:
"CAM1"
,
"frelon2"
:
"CAM2"
,
"frelon3"
:
"CAM3"
,
}
shutter
=
"COUNTER"
if
frelons
:
shutter
=
frelon2mux
.
get
(
frelons
[
0
],
shutter
)
self
.
opmux
.
switch
(
"SHUTTER"
,
shutter
)
self
.
opmux
.
switch
(
"TRIGGER_MODE"
,
"COUNTER_CARD"
)
self
.
opmux
.
switch
(
"CAM1"
,
"ON"
)
self
.
opmux
.
switch
(
"CAM2"
,
"ON"
)
self
.
opmux
.
switch
(
"CAM3"
,
"ON"
)
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