Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
ToolBox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
SCS
ToolBox
Commits
efdf89b2
Commit
efdf89b2
authored
3 years ago
by
Laurent Mercadier
Browse files
Options
Downloads
Plain Diff
Merge branch 'get-pes-fix' into 'master'
Get pes fix See merge request
!138
parents
475f9003
b625028f
No related branches found
No related tags found
1 merge request
!138
Get pes fix
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/toolbox_scs/constants.py
+5
-5
5 additions, 5 deletions
src/toolbox_scs/constants.py
src/toolbox_scs/detectors/pes.py
+7
-4
7 additions, 4 deletions
src/toolbox_scs/detectors/pes.py
with
12 additions
and
9 deletions
src/toolbox_scs/constants.py
+
5
−
5
View file @
efdf89b2
...
@@ -132,19 +132,19 @@ mnemonics = {
...
@@ -132,19 +132,19 @@ mnemonics = {
'
key
'
:
'
value.value
'
,
'
key
'
:
'
value.value
'
,
'
dim
'
:
None
},),
'
dim
'
:
None
},),
"
PES_RV
"
:
({
'
source
'
:
'
SA3_XTD10_PES/MDL/DAQ_MPOD
'
,
"
PES_RV
"
:
({
'
source
'
:
'
SA3_XTD10_PES/MDL/DAQ_MPOD
'
,
'
key
'
:
'
u21
5
.value
'
,
'
key
'
:
'
u21
3
.value
'
,
'
dim
'
:
None
},),
'
dim
'
:
None
},),
"
PES_N2
"
:
({
'
source
'
:
'
SA3_XTD10_PES/DCTRL/V30300S_NITROGEN
'
,
"
PES_N2
"
:
({
'
source
'
:
'
SA3_XTD10_PES/DCTRL/V30300S_NITROGEN
'
,
'
key
'
:
'
interlock.AAction
State.value
'
,
'
key
'
:
'
hardware
State.value
'
,
'
dim
'
:
None
},),
'
dim
'
:
None
},),
"
PES_Ne
"
:
({
'
source
'
:
'
SA3_XTD10_PES/DCTRL/V30310S_NEON
'
,
"
PES_Ne
"
:
({
'
source
'
:
'
SA3_XTD10_PES/DCTRL/V30310S_NEON
'
,
'
key
'
:
'
interlock.AAction
State.value
'
,
'
key
'
:
'
hardware
State.value
'
,
'
dim
'
:
None
},),
'
dim
'
:
None
},),
"
PES_Kr
"
:
({
'
source
'
:
'
SA3_XTD10_PES/DCTRL/V30320S_KRYPTON
'
,
"
PES_Kr
"
:
({
'
source
'
:
'
SA3_XTD10_PES/DCTRL/V30320S_KRYPTON
'
,
'
key
'
:
'
interlock.AAction
State.value
'
,
'
key
'
:
'
hardware
State.value
'
,
'
dim
'
:
None
},),
'
dim
'
:
None
},),
"
PES_Xe
"
:
({
'
source
'
:
'
SA3_XTD10_PES/DCTRL/V30330S_XENON
'
,
"
PES_Xe
"
:
({
'
source
'
:
'
SA3_XTD10_PES/DCTRL/V30330S_XENON
'
,
'
key
'
:
'
interlock.AAction
State.value
'
,
'
key
'
:
'
hardware
State.value
'
,
'
dim
'
:
None
},),
'
dim
'
:
None
},),
# XTD10 MCP (after GATT)
# XTD10 MCP (after GATT)
...
...
This diff is collapsed.
Click to expand it.
src/toolbox_scs/detectors/pes.py
+
7
−
4
View file @
efdf89b2
...
@@ -14,7 +14,7 @@ import extra_data as ed
...
@@ -14,7 +14,7 @@ import extra_data as ed
from
..misc.bunch_pattern_external
import
is_sase_3
from
..misc.bunch_pattern_external
import
is_sase_3
from
..mnemonics_machinery
import
(
mnemonics_to_process
,
from
..mnemonics_machinery
import
(
mnemonics_to_process
,
mnemonics_for_run
)
mnemonics_for_run
)
from
..constants
import
mnemonics
as
_mnemonics
__all__
=
[
__all__
=
[
'
get_pes_params
'
,
'
get_pes_params
'
,
...
@@ -169,10 +169,13 @@ def get_pes_params(run):
...
@@ -169,10 +169,13 @@ def get_pes_params(run):
params
=
{}
params
=
{}
sel
=
run
.
select_trains
(
ed
.
by_index
[:
20
])
sel
=
run
.
select_trains
(
ed
.
by_index
[:
20
])
mnemonics
=
mnemonics_for_run
(
run
)
mnemonics
=
mnemonics_for_run
(
run
)
for
gas
in
[
'
N2
'
,
'
Ne
'
,
'
Kr
'
,
'
Xe
'
]:
gas_dict
=
{
'
N2
'
:
409.9
,
'
Ne
'
:
870.2
,
'
Kr
'
:
1921
,
'
Xe
'
:
1148.7
}
arr
=
sel
.
get_array
(
*
mnemonics
[
f
'
PES_
{
gas
}
'
].
values
())
for
gas
in
gas_dict
.
keys
():
if
arr
[
0
]
==
0
:
mnemo
=
_mnemonics
[
f
'
PES_
{
gas
}
'
][
0
]
arr
=
sel
.
get_run_value
(
mnemo
[
'
source
'
],
mnemo
[
'
key
'
])
if
arr
==
'
ON
'
:
params
[
'
gas
'
]
=
gas
params
[
'
gas
'
]
=
gas
params
[
'
binding_energy
'
]
=
gas_dict
[
gas
]
break
break
if
'
gas
'
not
in
params
:
if
'
gas
'
not
in
params
:
params
[
'
gas
'
]
=
'
unknown
'
params
[
'
gas
'
]
=
'
unknown
'
...
...
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