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
e56752e7
Verified
Commit
e56752e7
authored
2 years ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Remove warnings and add inline comments instead
parent
9e0ca922
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2
API cleanup for online files reading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/hardware.jl
+7
-7
7 additions, 7 deletions
src/hardware.jl
with
7 additions
and
7 deletions
src/hardware.jl
+
7
−
7
View file @
e56752e7
...
...
@@ -301,28 +301,28 @@ function Detector(io::IO)
end
if
ismissing
(
t₀
)
||
t₀
==
0.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
# PMT t₀s for the module t₀, just like Jpp does nowadays.
t₀
=
mean
([
pmt
.
t₀
for
pmt
in
pmts
])
t₀_warning
=
true
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
# a base module, the position is set to (0, 0, 0).
if
length
(
pmts
)
>
0
pos
=
mean
([
pmt
.
pos
for
pmt
in
pmts
])
else
pos
=
Position
(
0
,
0
,
0
)
end
pos_warning
=
true
end
modules
[
module_id
]
=
DetectorModule
(
module_id
,
pos
,
Location
(
string
,
floor
),
n_pmts
,
pmts
,
q
,
status
,
t₀
)
idx
+=
n_pmts
+
1
end
t₀_warning
&&
@warn
"t₀ == 0 (for DOMs) -> using the averaged PMT t₀s instead."
if
pos_warning
@warn
"The optical module positions were calculated from the PMT positions and the base modules were placed at (0, 0, 0)."
end
Detector
(
version
,
det_id
,
validity
,
utm_position
,
utm_ref_grid
,
n_modules
,
modules
,
strings
,
comments
)
end
...
...
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