Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
KM3io.jl
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
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
common
KM3io.jl
Commits
06548b72
Verified
Commit
06548b72
authored
2 years ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Fix for base module t0
parent
fc27e7a4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/hardware.jl
+5
-1
5 additions, 1 deletion
src/hardware.jl
test/hardware.jl
+1
-0
1 addition, 0 deletions
test/hardware.jl
with
6 additions
and
1 deletion
src/hardware.jl
+
5
−
1
View file @
06548b72
...
...
@@ -299,7 +299,7 @@ function Detector(io::IO)
push!
(
pmts
,
PMT
(
pmt_id
,
Position
(
x
,
y
,
z
),
Direction
(
dx
,
dy
,
dz
),
t0
,
pmt_status
))
end
if
ismissing
(
t₀
)
||
t₀
==
0.0
if
(
ismissing
(
t₀
)
||
t₀
==
0.0
)
&&
floor
>
0
# t₀ is only available in DETX v4+ and even with supported versions, the value is
# sometimes 0 when e.g. the DETX was converted with Jpp from a version which did
# not include that informatino (v3 and below). Here, we are using the averaged
...
...
@@ -307,6 +307,10 @@ function Detector(io::IO)
t₀
=
mean
([
pmt
.
t₀
for
pmt
in
pmts
])
end
if
ismissing
(
t₀
)
&&
floor
==
0
t₀
=
0.0
end
if
ismissing
(
pos
)
# Similar to the module t₀, the module position was introduced in DETX v4.
# If this is missing, it will be set to the averaged PMT positions. If it's
...
...
This diff is collapsed.
Click to expand it.
test/hardware.jl
+
1
−
0
View file @
06548b72
...
...
@@ -27,6 +27,7 @@ const SAMPLES_DIR = joinpath(@__DIR__, "samples")
@test
361
==
length
(
mods
)
@test
106.95
≈
d
.
modules
[
808469291
]
.
pos
.
y
# base module
@test
97.3720395
≈
d
.
modules
[
808974928
]
.
pos
.
z
# base module
@test
0.0
==
d
.
modules
[
808469291
]
.
t₀
# base module
end
@test
116.600
≈
d
.
modules
[
808992603
]
.
pos
.
x
atol
=
1e-5
# optical module
...
...
This diff is collapsed.
Click to expand it.
Tamas Gal
@tgal
mentioned in commit
6209e528
·
2 years ago
mentioned in commit
6209e528
mentioned in commit 6209e528103cb6177164172d00e9df725ff683cf
Toggle commit list
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