Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OrcaSong
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Machine Learning
OrcaSong
Commits
4ac4c4be
Commit
4ac4c4be
authored
3 years ago
by
Stefan Reck
Browse files
Options
Downloads
Patches
Plain Diff
eliminate need for pandas in bundles.py; warn for exising calib only for hits
parent
c444aa82
No related branches found
Branches containing commit
Tags
v4.8.1
Tags containing commit
No related merge requests found
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
orcasong/extractors/bundles.py
+4
-6
4 additions, 6 deletions
orcasong/extractors/bundles.py
orcasong/modules.py
+9
-8
9 additions, 8 deletions
orcasong/modules.py
with
13 additions
and
14 deletions
orcasong/extractors/bundles.py
+
4
−
6
View file @
4ac4c4be
...
...
@@ -226,12 +226,10 @@ class BundleMCExtractor:
# bundle diameter; only makes sense for 2+ muons
if
len
(
mc_tracks_sel
)
>=
2
:
positions_plane
=
get_plane_positions
(
positions
=
mc_tracks_sel
[[
"
pos_x
"
,
"
pos_y
"
,
"
pos_z
"
]]
.
to_dataframe
()
.
to_numpy
(),
directions
=
mc_tracks_sel
[[
"
dir_x
"
,
"
dir_y
"
,
"
dir_z
"
]]
.
to_dataframe
()
.
to_numpy
(),
positions
=
np
.
concatenate
(
[
mc_tracks_sel
[
k
][:,
None
]
for
k
in
(
"
pos_x
"
,
"
pos_y
"
,
"
pos_z
"
)],
axis
=-
1
),
directions
=
np
.
concatenate
(
[
mc_tracks_sel
[
k
][:,
None
]
for
k
in
(
"
dir_x
"
,
"
dir_y
"
,
"
dir_z
"
)],
axis
=-
1
),
plane_point
=
self
.
plane_point
,
plane_normal
=
plane_normal
,
)
...
...
This diff is collapsed.
Click to expand it.
orcasong/modules.py
+
9
−
8
View file @
4ac4c4be
...
...
@@ -462,15 +462,16 @@ class DetApplier(kp.Module):
self
.
_cache_shift_center
()
def
process
(
self
,
blob
):
if
(
self
.
calib_hits
or
self
.
calib_mchits
)
and
self
.
_calib_checked
is
False
:
if
"
pos_x
"
in
blob
[
"
Hits
"
]:
self
.
log
.
warn
(
"
Warning: Using a det file, but pos_x in Hits detected.
"
"
Is the file already calibrated? This might lead to
"
"
errors with t0.
"
)
self
.
_calib_checked
=
True
if
self
.
calib_hits
:
if
self
.
_calib_checked
is
False
:
if
"
pos_x
"
in
blob
[
"
Hits
"
]:
self
.
log
.
warn
(
"
Warning: Using a det file, but pos_x in Hits detected.
"
"
Is the file already calibrated? This might lead to
"
"
errors with t0.
"
)
self
.
_calib_checked
=
True
blob
[
"
Hits
"
]
=
self
.
calib
.
apply
(
blob
[
"
Hits
"
],
correct_slewing
=
self
.
correct_timeslew
)
...
...
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