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
a91ba9c0
Commit
a91ba9c0
authored
2 years ago
by
Laurent Mercadier
Browse files
Options
Downloads
Patches
Plain Diff
More clean up of get_digitizer_peaks()
parent
66f5983c
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/detectors/digitizers.py
+15
-15
15 additions, 15 deletions
src/toolbox_scs/detectors/digitizers.py
with
15 additions
and
15 deletions
src/toolbox_scs/detectors/digitizers.py
+
15
−
15
View file @
a91ba9c0
...
...
@@ -939,27 +939,27 @@ def get_digitizer_peaks(run, mnemonics=None, merge_with=None,
# find digitizer type and get the list of mnemonics to process
def
to_processed_name
(
name
):
return
name
.
replace
(
'
raw
'
,
'
peaks
'
).
replace
(
'
apd
'
,
'
peaks
'
)
if
isinstance
(
mnemonics
,
str
):
mnemonics
=
[
mnemonics
]
digitizer
=
digitizer_type
(
mnemonics
[
0
],
run_mnemonics
)
else
:
# find mnemonics to process in merge_with
for
v
in
merge_with
:
if
'
FastADC2_
'
in
v
:
digitizer
=
'
FastADC2
'
break
if
'
FastADC
'
in
v
:
digitizer
=
'
FastADC
'
break
if
'
MCP
'
in
v
:
digitizer
=
'
ADQ412
'
break
if
mnemonics
is
None
:
if
digitizer
is
None
:
for
v
in
merge_with
:
if
'
FastADC2_
'
in
v
:
digitizer
=
'
FastADC2
'
break
if
'
FastADC
'
in
v
:
digitizer
=
'
FastADC
'
break
if
'
MCP
'
in
v
:
digitizer
=
'
ADQ412
'
break
if
digitizer
is
None
:
log
.
warning
(
f
'
No array with digitizer data
'
'
to extract. Skipping.
'
)
return
merge_with
mnemonics
=
mnemonics_to_process
(
mnemonics
,
merge_with
,
digitizer
,
to_processed_name
)
else
:
mnemonics
=
[
mnemonics
]
if
isinstance
(
mnemonics
,
str
)
else
mnemonics
digitizer
=
digitizer_type
(
mnemonics
[
0
],
run_mnemonics
)
if
len
(
mnemonics
)
==
0
:
log
.
info
(
f
'
No array with unaligned
{
digitizer
}
peaks to extract.
'
...
...
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