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
a229d099
Commit
a229d099
authored
4 weeks ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
PMT address map
parent
910db20a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!52
PMT address map
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/src/api.md
+3
-1
3 additions, 1 deletion
docs/src/api.md
src/exports.jl
+2
-0
2 additions, 0 deletions
src/exports.jl
src/hardware.jl
+49
-1
49 additions, 1 deletion
src/hardware.jl
with
54 additions
and
2 deletions
docs/src/api.md
+
3
−
1
View file @
a229d099
...
...
@@ -66,9 +66,11 @@ DetectorModule
Detector
PMTFile
PMTData
PMTPhysicalAddress
modules
getmodule
getpmt
getaddress
haslocation
hasstring
isbasemodule
...
...
@@ -183,4 +185,4 @@ hashistory
```
@docs
angle
distance
```
\ No newline at end of file
```
This diff is collapsed.
Click to expand it.
src/exports.jl
+
2
−
0
View file @
a229d099
...
...
@@ -24,10 +24,12 @@ StringMechanicsParameters,
Tripod
,
PMTFile
,
PMTData
,
PMTPhysicalAddress
,
center
,
getmodule
,
getpmt
,
getpmts
,
getaddress
,
haslocation
,
hasstring
,
isbasemodule
,
...
...
This diff is collapsed.
Click to expand it.
src/hardware.jl
+
49
−
1
View file @
a229d099
...
...
@@ -23,6 +23,54 @@ function Base.isapprox(lhs::PMT, rhs::PMT; kwargs...)
end
end
"""
The physical address of a PMT consisting of the ring (A-F) and the position (1-6).
"""
struct
PMTPhysicalAddress
ring
::
Char
position
::
Int
end
const
_PMTAddressMapSV
=
SVector
(
PMTPhysicalAddress
(
'F'
,
4
),
PMTPhysicalAddress
(
'E'
,
5
),
PMTPhysicalAddress
(
'E'
,
4
),
PMTPhysicalAddress
(
'E'
,
3
),
PMTPhysicalAddress
(
'F'
,
3
),
PMTPhysicalAddress
(
'F'
,
5
),
PMTPhysicalAddress
(
'E'
,
2
),
PMTPhysicalAddress
(
'F'
,
6
),
PMTPhysicalAddress
(
'F'
,
2
),
PMTPhysicalAddress
(
'F'
,
1
),
PMTPhysicalAddress
(
'E'
,
1
),
PMTPhysicalAddress
(
'E'
,
6
),
PMTPhysicalAddress
(
'D'
,
1
),
PMTPhysicalAddress
(
'C'
,
1
),
PMTPhysicalAddress
(
'B'
,
1
),
PMTPhysicalAddress
(
'D'
,
2
),
PMTPhysicalAddress
(
'D'
,
6
),
PMTPhysicalAddress
(
'C'
,
6
),
PMTPhysicalAddress
(
'B'
,
6
),
PMTPhysicalAddress
(
'B'
,
2
),
PMTPhysicalAddress
(
'C'
,
5
),
PMTPhysicalAddress
(
'C'
,
2
),
PMTPhysicalAddress
(
'A'
,
1
),
PMTPhysicalAddress
(
'D'
,
3
),
PMTPhysicalAddress
(
'B'
,
4
),
PMTPhysicalAddress
(
'B'
,
3
),
PMTPhysicalAddress
(
'B'
,
5
),
PMTPhysicalAddress
(
'D'
,
5
),
PMTPhysicalAddress
(
'C'
,
4
),
PMTPhysicalAddress
(
'C'
,
3
),
PMTPhysicalAddress
(
'D'
,
4
)
)
"""
Get the physical address of a PMT.
"""
getaddress
(
pmt
::
PMT
)
=
_PMTAddressMap
[
pmt
.
id
+
1
]
getaddress
(
channel_id
::
Integer
)
=
_PMTAddressMap
[
channel_id
+
1
]
"""
A module's location in the detector where string represents the
...
...
@@ -385,7 +433,7 @@ end
"""
function Detector(filename::AbstractString)
Create a `Detector` instance from a DETX file.
Create a `Detector` instance from a DETX
/DATX
file.
"""
function
Detector
(
filename
::
AbstractString
)
::
Detector
_
,
ext
=
splitext
(
filename
)
...
...
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