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
a33a42eb
Verified
Commit
a33a42eb
authored
1 year ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Add prefit stuff
parent
24f5a3cb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#41802
failed
1 year ago
Stage: test
Stage: docs
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Project.toml
+1
-0
1 addition, 0 deletions
Project.toml
src/NeRCA.jl
+1
-0
1 addition, 0 deletions
src/NeRCA.jl
src/math.jl
+23
-0
23 additions, 0 deletions
src/math.jl
src/prefit.jl
+28
-0
28 additions, 0 deletions
src/prefit.jl
with
53 additions
and
0 deletions
Project.toml
+
1
−
0
View file @
a33a42eb
...
...
@@ -10,6 +10,7 @@ Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
DataFrames
=
"a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Distributions
=
"31c24e10-a181-5473-b8eb-7969acd0382f"
DocStringExtensions
=
"ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
FHist
=
"68837c9b-b678-4cd5-9925-8a54edc8f695"
HDF5
=
"f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
HTTP
=
"cd3eb016-35fb-5094-929b-558a96fad6f3"
IntervalArithmetic
=
"d1acc4aa-44c8-5952-acd4-ba5d80a2a253"
...
...
This diff is collapsed.
Click to expand it.
src/NeRCA.jl
+
1
−
0
View file @
a33a42eb
...
...
@@ -36,6 +36,7 @@ export
include
(
"math.jl"
)
include
(
"hits.jl"
)
include
(
"mc.jl"
)
include
(
"prefit.jl"
)
include
(
"fit.jl"
)
include
(
"plot.jl"
)
include
(
"db.jl"
)
...
...
This diff is collapsed.
Click to expand it.
src/math.jl
+
23
−
0
View file @
a33a42eb
...
...
@@ -74,3 +74,26 @@ The function to fit time residual plot distributions.
function
langauss
(
x
,
LA
,
Lμ
,
Lσ
,
GA
,
Gμ
,
Gσ
,
offset
)
LA
*
pdf
(
Landau
(
Lμ
,
Lσ
),
x
)
+
GA
*
pdf
(
Normal
(
Gμ
,
Gσ
),
x
)
+
offset
end
"""
Creates directions (points on a unit sphere) which are quite evenly distributed
with respect to their space angles using the Fibonacci lattice algorithm. The
axial anisotropy is much smaller compared to a simple latitude-longitude
lattice.
"""
function
fibonaccisphere
(
N
)
ϕ
=
π
*
(
√5
-
1
)
# golden angle in rad
directions
=
sizehint!
(
Direction
[],
N
)
for
i
∈
0
:
N
-
1
y
=
1
-
2
(
i
/
(
N
-
1
))
r
=
√
(
1
-
y
*
y
)
θ
=
ϕ
*
i
x
=
cos
(
θ
)
*
r
z
=
sin
(
θ
)
*
r
push!
(
directions
,
Direction
(
x
,
y
,
z
))
end
directions
end
This diff is collapsed.
Click to expand it.
src/prefit.jl
0 → 100644
+
28
−
0
View file @
a33a42eb
struct
Hit
t
::
Float64
tot
::
Float64
end
starttime
(
hit
)
=
hit
.
t
endtime
(
hit
)
=
hit
.
t
+
hit
.
tot
function
combine
(
hits
::
Vector
{
Hit
})
isempty
(
hits
)
&&
return
Hit
(
0.0
,
0.0
)
t1
=
starttime
(
first
(
hits
))
t2
=
endtime
(
first
(
hits
))
@inbounds
for
hit
∈
hits
[
2
:
end
]
_t1
=
starttime
(
hit
)
_t2
=
endtime
(
hit
)
if
t1
>
_t1
t1
=
_t1
end
if
t2
<
_t2
t2
=
_t2
end
end
Hit
(
t1
,
t2
-
t1
)
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