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
9ed96117
Commit
9ed96117
authored
4 years ago
by
Rafael Gort
Browse files
Options
Downloads
Patches
Plain Diff
added missing masking when binning xgm data for post-process normalization
parent
9e2b7655
No related branches found
Tags
1.1.1-rc1
Tags containing commit
2 merge requests
!98
WIP: Separate digitizers from XGM, assign absolute pulse ID to XGM and digitizers data
,
!87
Introduce package structure, generalized binning principle, ...
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/toolbox_scs/detectors/dssc.py
+3
-0
3 additions, 0 deletions
src/toolbox_scs/detectors/dssc.py
src/toolbox_scs/test/test_dssc_cls.py
+1
-0
1 addition, 0 deletions
src/toolbox_scs/test/test_dssc_cls.py
with
4 additions
and
0 deletions
src/toolbox_scs/detectors/dssc.py
+
3
−
0
View file @
9ed96117
...
...
@@ -171,11 +171,14 @@ class DSSCBinner:
"""
if
self
.
xgm
is
not
None
:
xgm_data
=
self
.
xgm
.
to_dataset
(
name
=
'
xgm
'
)
if
self
.
pulsemask
is
not
None
:
xgm_data
=
xgm_data
.
where
(
self
.
pulsemask
)
for
b
in
self
.
binners
:
if
b
in
[
'
trainId
'
,
'
pulse
'
]:
xgm_data
[
b
+
"
_binned
"
]
=
self
.
binners
[
b
]
xgm_data
=
xgm_data
.
groupby
(
b
+
"
_binned
"
).
mean
(
b
)
xgm_data
=
xgm_data
.
rename
(
name_dict
=
{
b
+
"
_binned
"
:
b
})
log
.
info
(
'
binned xgm data according to dssc binners.
'
)
return
xgm_data
.
transpose
(
'
trainId
'
,
'
pulse
'
)
else
:
log
.
warning
(
"
no xgm data. Use load_xgm() to load the xgm data.
"
)
...
...
This diff is collapsed.
Click to expand it.
src/toolbox_scs/test/test_dssc_cls.py
+
1
−
0
View file @
9ed96117
...
...
@@ -79,6 +79,7 @@ class TestDSSC(unittest.TestCase):
run235
.
add_binner
(
'
pulse
'
,
binner2
)
xgm_threshold
=
(
300.0
,
8000.0
)
run235
.
create_xgm_mask
(
xgm_threshold
,
1
)
self
.
assertIsNotNone
(
run235
.
get_xgm_binned
())
self
.
assertEqual
(
run235
.
binners
[
'
trainId
'
].
values
[
0
],
np
.
float32
(
7585.52
))
...
...
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