Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NeRCA.jl
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
Container Registry
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
Tamas Gal
NeRCA.jl
Commits
bedad30a
Commit
bedad30a
authored
1 year ago
by
Tamas Gal
Browse files
Options
Downloads
Plain Diff
Merge branch 'move-angle-to-km3io' into 'master'
Move angle to KM3io See merge request
!5
parents
8f418b86
04249e23
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!5
Move angle to KM3io
Pipeline
#48316
passed
1 year ago
Stage: test
Stage: docs
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Project.toml
+1
-1
1 addition, 1 deletion
Project.toml
src/math.jl
+0
-6
0 additions, 6 deletions
src/math.jl
test/math_tests.jl
+0
-8
0 additions, 8 deletions
test/math_tests.jl
with
1 addition
and
15 deletions
Project.toml
+
1
−
1
View file @
bedad30a
...
...
@@ -39,7 +39,7 @@ DocStringExtensions = "^0.8, ^0.9"
HDF5
=
"^0.16, ^0.17"
HTTP
=
"^1"
KM3NeTTestData
=
"^0.4.7"
KM3io
=
"
^0.15.0,
^0.16.
2
"
KM3io
=
"^0.16.
3
"
LandauDistribution
=
"^0.2"
ProgressMeter
=
"^1"
RecipesBase
=
"^0.7, ^0.8, ^1"
...
...
This diff is collapsed.
Click to expand it.
src/math.jl
+
0
−
6
View file @
bedad30a
Base
.
angle
(
d1
,
d2
)
=
acos
(
min
(
dot
(
normalize
(
d1
),
normalize
(
d2
)),
1
))
# TODO: type piracy: this needs to go to KM3io
Base
.
angle
(
a
::
T
,
b
::
T
)
where
{
T
<:
Union
{
KM3io
.
AbstractCalibratedHit
,
KM3io
.
PMT
}}
=
Base
.
angle
(
a
.
dir
,
b
.
dir
)
Base
.
angle
(
a
,
b
::
Union
{
KM3io
.
AbstractCalibratedHit
,
KM3io
.
PMT
})
=
Base
.
angle
(
a
,
b
.
dir
)
Base
.
angle
(
a
::
Union
{
KM3io
.
AbstractCalibratedHit
,
KM3io
.
PMT
},
b
)
=
Base
.
angle
(
a
.
dir
,
b
)
"""
Calculate the cartesian coordinates for given `ϕ`, `θ` and radius `r`.
"""
...
...
This diff is collapsed.
Click to expand it.
test/math_tests.jl
+
0
−
8
View file @
bedad30a
...
...
@@ -2,14 +2,6 @@ using NeRCA
using
Test
@testset
"angle()"
begin
@test
0
==
angle
([
1
,
0
,
0
],
[
1
,
0
,
0
])
@test
π
/
2
≈
angle
([
1
,
0
,
0
],
[
0
,
1
,
0
])
@test
π
/
2
≈
angle
([
1
,
0
,
0
],
[
0
,
0
,
1
])
@test
π
≈
angle
([
1
,
0
,
0
],
[
-
1
,
0
,
0
])
end
@testset
"spread()"
begin
directions
=
[
Direction
(
1.0
,
0.0
,
0.0
),
...
...
This diff is collapsed.
Click to expand it.
Tamas Gal
@tgal
mentioned in commit
b33b079c
·
1 year ago
mentioned in commit
b33b079c
mentioned in commit b33b079c0e0c35107a2ce4be501b096c85924349
Toggle commit list
Tamas Gal
@tgal
mentioned in commit
e121f337
·
1 year ago
mentioned in commit
e121f337
mentioned in commit e121f3374a9981bfe44d58c20878200f04f87a12
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