Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
juobs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Javier Ugarrio
juobs
Commits
bc1bcae9
Commit
bc1bcae9
authored
Feb 23, 2021
by
Alessandro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added wpm documentation in fit_routine
parent
bb15ee61
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
src/juobs.jl
src/juobs.jl
+1
-1
src/juobs_linalg.jl
src/juobs_linalg.jl
+0
-2
src/juobs_tools.jl
src/juobs_tools.jl
+9
-1
No files found.
src/juobs.jl
View file @
bc1bcae9
...
...
@@ -8,7 +8,7 @@ include("juobs_tools.jl")
include
(
"juobs_obs.jl"
)
export
read_mesons
,
read_ms1
,
read_ms
,
read_md
export
get_matrix
,
uwgevp_tot
,
energies
,
uwdot
,
uweigvals
,
uweigvecs
,
uweigen
,
invert
,
getall_eigvals
,
getall_eigvecs
export
get_matrix
,
energies
,
uwdot
,
uweigvals
,
uweigvecs
,
uweigen
,
invert
,
getall_eigvals
,
getall_eigvecs
export
corr_obs
,
plat_av
,
lin_fit
,
x_lin_fit
,
y_lin_fit
,
fit_routine
export
meff
,
dec_const_pcvc
,
comp_t0
...
...
src/juobs_linalg.jl
View file @
bc1bcae9
...
...
@@ -63,7 +63,6 @@ function get_matrix(corr_diag::Vector{Vector{uwreal}}, corr_upper::Vector{Vector
aux
=
Matrix
{
uwreal
}(
undef
,
n
,
n
)
for
t
in
1
:
time
count
=
0
#testing = corr_upper[1][1]
for
i
in
range
(
n
-
1
,
1
,
step
=-
1
)
for
j
in
range
(
n
,
i
+
1
,
step
=-
1
)
aux
[
i
,
j
]
=
corr_upper
[
d
-
count
][
t
]
...
...
@@ -91,7 +90,6 @@ function energies(evals::Union{Vector{Vector{uwreal}},Array{Array{uwreal}} })
eff_en
=
Array
{
Array
{
uwreal
}}(
undef
,
n
)
aux_en
=
Vector
{
uwreal
}(
undef
,
time
-
1
)
for
i
in
1
:
n
#aux_en = Vector{uwreal}(undef, time-1)
for
t
in
1
:
time
-
1
ratio
=
evals
[
t
][
i
]
/
evals
[
t
+
1
][
i
]
aux_en
[
t
]
=
0.5
*
log
(
ratio
*
ratio
)
...
...
src/juobs_tools.jl
View file @
bc1bcae9
...
...
@@ -145,11 +145,19 @@ Computes the results of a linear interpolation/extrapolation in the y axis
y_lin_fit
(
par
::
Vector
{
uwreal
},
x
::
Union
{
uwreal
,
Float64
})
=
par
[
1
]
+
par
[
2
]
*
x
@doc
raw
"""
fit_routine(model::Function, xdata::Array{<:Real}, ydata::Array{uwreal}, param::Int64=3)
fit_routine(model::Function, xdata::Array{<:Real}, ydata::Array{uwreal}, param::Int64=3
; wpm::Union{Dict{Int64,Vector{Float64}},Dict{String,Vector{Float64}}, Nothing}=nothing
)
Given a model function with a number param of parameters and an array of uwreal,
this function fit ydata with the given model and print fit information
The method return an array upar with the best fit parameters with their errors.
The flag wpm is an optional array of Float64 of lenght 4. The first three paramenters specify the criteria to determine
the summation windows:
vp[1]: The autocorrelation function is summed up to t = round(vp[1]).
vp[2]: The sumation window is determined using U. Wolff poposal with S_
\t
au = wpm[2]
vp[3]: The autocorrelation function Γ(t) is summed up a point where its error δΓ(t) is a factor vp[3] times larger than the signal.
An additional fourth parameter vp[4], tells ADerrors to add a tail to the error with
\t
au_{exp} = wpm[4].
Negative values of wpm[1:4] are ignored and only one component of wpm[1:3] needs to be positive.
'''@example
@. model(x,p) = p[1] + p[2] * exp(-(p[3]-p[1])*x)
fit_routine(model, ydata, param=3)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment