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
3a956b5c
Commit
3a956b5c
authored
2 years ago
by
Laurent Mercadier
Browse files
Options
Downloads
Patches
Plain Diff
Add Fast ADC 2 detector in mnemonics_to_process()
parent
494bb616
No related branches found
No related tags found
1 merge request
!215
Clean digitizers peak functions and add documentation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/toolbox_scs/mnemonics_machinery.py
+10
-3
10 additions, 3 deletions
src/toolbox_scs/mnemonics_machinery.py
with
10 additions
and
3 deletions
src/toolbox_scs/mnemonics_machinery.py
+
10
−
3
View file @
3a956b5c
...
@@ -98,7 +98,7 @@ def mnemonics_to_process(mnemo_list, merge_with, detector, func=None):
...
@@ -98,7 +98,7 @@ def mnemonics_to_process(mnemo_list, merge_with, detector, func=None):
merge_with: xarray Dataset
merge_with: xarray Dataset
Dataset that may contain non-processed arrays
Dataset that may contain non-processed arrays
detector: str
detector: str
One in {
'
ADQ412
'
,
'
FastADC
'
,
'
XGM
'
,
'
BAM
'
,
'
PES
'
}
One in {
'
ADQ412
'
,
'
FastADC
'
,
'
FastADC2
'
,
'
XGM
'
,
'
BAM
'
,
'
PES
'
}
func: function
func: function
function that takes one argument, an unprocessed mnemonic string,
function that takes one argument, an unprocessed mnemonic string,
and converts it into a processed one, i.e. from
'
MCP2apd
'
to
and converts it into a processed one, i.e. from
'
MCP2apd
'
to
...
@@ -112,7 +112,9 @@ def mnemonics_to_process(mnemo_list, merge_with, detector, func=None):
...
@@ -112,7 +112,9 @@ def mnemonics_to_process(mnemo_list, merge_with, detector, func=None):
if
func
is
None
:
if
func
is
None
:
def
func
(
x
):
def
func
(
x
):
return
x
return
x
det_list
=
[
'
ADQ412
'
,
'
FastADC
'
,
'
FastADC2
'
,
'
XGM
'
,
'
BAM
'
,
'
PES
'
]
if
detector
not
in
det_list
:
raise
ValueError
(
f
"
Detector not supported. Expecting one in
{
det_list
}
"
)
if
detector
==
'
BAM
'
:
if
detector
==
'
BAM
'
:
det_mnemos
=
[
m
for
m
in
_mnemonics
if
'
BAM
'
in
m
]
det_mnemos
=
[
m
for
m
in
_mnemonics
if
'
BAM
'
in
m
]
default_mnemo
=
'
BAM1932M
'
default_mnemo
=
'
BAM1932M
'
...
@@ -130,9 +132,14 @@ def mnemonics_to_process(mnemo_list, merge_with, detector, func=None):
...
@@ -130,9 +132,14 @@ def mnemonics_to_process(mnemo_list, merge_with, detector, func=None):
default_mnemo
=
'
MCP2apd
'
default_mnemo
=
'
MCP2apd
'
default_processed
=
'
MCP2peaks
'
default_processed
=
'
MCP2peaks
'
if
detector
==
'
FastADC
'
:
if
detector
==
'
FastADC
'
:
det_mnemos
=
[
m
for
m
in
_mnemonics
if
'
FastADC
'
in
m
]
det_mnemos
=
[
m
for
m
in
_mnemonics
if
'
FastADC
'
in
m
\
and
'
FastADC2_
'
not
in
m
]
default_mnemo
=
'
FastADC5raw
'
default_mnemo
=
'
FastADC5raw
'
default_processed
=
'
FastADC5peaks
'
default_processed
=
'
FastADC5peaks
'
if
detector
==
'
FastADC2
'
:
det_mnemos
=
[
m
for
m
in
_mnemonics
if
'
FastADC2_
'
in
m
]
default_mnemo
=
'
FastADC2_5raw
'
default_processed
=
'
FastADC2_5peaks
'
if
detector
==
'
PES
'
:
if
detector
==
'
PES
'
:
det_mnemos
=
[
m
for
m
in
_mnemonics
if
'
PES
'
in
m
and
'
raw
'
in
m
]
det_mnemos
=
[
m
for
m
in
_mnemonics
if
'
PES
'
in
m
and
'
raw
'
in
m
]
default_mnemo
=
'
PES_W_raw
'
default_mnemo
=
'
PES_W_raw
'
...
...
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