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
9c66f11f
Commit
9c66f11f
authored
Oct 11, 2024
by
Antonino D'Anna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Manifest.toml and double copies of function in juobs_obs.jl
parent
387f9d13
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
890 additions
and
697 deletions
+890
-697
Manifest.toml
Manifest.toml
+889
-504
src/juobs_obs.jl
src/juobs_obs.jl
+1
-193
No files found.
Manifest.toml
View file @
9c66f11f
This diff is collapsed.
Click to expand it.
src/juobs_obs.jl
View file @
9c66f11f
...
...
@@ -727,205 +727,13 @@ function dec_const_w(vv::Vector{uwreal}, pp::Vector{uwreal}, plat::Vector{Int64}
return
data
?
(
f
,
R
)
:
f
end
end
function
dec_const
(
vv
::
Corr
,
plat
::
Vector
{
Int64
},
m
::
uwreal
;
kwargs
...
)
return
dec_const
(
vv
.
obs
,
plat
,
m
,
vv
.
y0
,
kappa
=
vv
.
kappa
;
kwargs
...
)
end
function
dec_const
(
vv
::
Vector
{
Corr
},
plat
::
Vector
{
Vector
{
Int64
}},
m
::
Vector
{
uwreal
};
kwargs
...
)
a
=
dec_const
.
(
vv
,
plat
,
m
;
kwargs
...
)
if
length
(
a
[
1
])
==
1
return
a
;
end
# Due to the broadcast, a is a Vector{Tuple{...}} where each element of the vector is the output of the function
# The following lines of code reshape a into a Matrix such that each column
# correspond to one Tuple and each row correspond to one component of the Tuple. The it will return each row
# separately.
#
# Example:
# V = [(a1,a2,a3),(b1,b2,b3)]
# V = collect.(V) #[[a1,a2,a3],[b1,b2,b3]]
# V stack(V) #[a1 b1; a2 b2; a3 b3]
# return Tuple([r...] for e in eachrow(r)) #([a1,b1],[a1,b2],[a3,b3])
a
=
stack
(
collect
.
(
a
));
return
Tuple
([
r
...
]
for
r
in
eachrow
(
a
))
end
# this can be used also for pseudoscalar decay constants with wilson fermions
function
dec_const_w
(
vv
::
Vector
{
uwreal
},
pp
::
Vector
{
uwreal
},
plat
::
Vector
{
Int64
},
m
::
uwreal
,
y0
::
Int64
;
ca
::
Float64
=
0.0
,
pl
::
Bool
=
true
,
data
::
Bool
=
false
,
kappa
::
Union
{
Vector
{
Float64
},
Nothing
}
=
nothing
,
wpm
::
Union
{
Dict
{
Int64
,
Vector
{
Float64
}},
Dict
{
String
,
Vector
{
Float64
}},
Nothing
}
=
nothing
)
corr_vv
=
vv
[
2
:
end
-
1
]
corr_pp
=
pp
[
2
:
end
-
1
]
T
=
length
(
corr_vv
)
if
ca
!=
0.0
der_pp
=
(
corr_pp
[
3
:
end
]
-
corr_pp
[
1
:
end
-
2
])
/
2
corr_vv
=
corr_vv
[
2
:
end
-
1
]
+
ca
*
der_pp
aux
=
exp
.
((
collect
(
1
:
T
-
2
)
.-
y0
)
.*
fill
(
m
,
T
-
2
))
else
#corr_vv = corr_vv[2:end-1]
aux
=
exp
.
((
collect
(
1
:
T
)
.-
y0
)
.*
fill
(
m
/
2
,
T
))
end
R
=
(
aux
.*
corr_vv
./
sqrt
.
(
corr_pp
))
R_av
=
plat_av
(
R
,
plat
,
wpm
)
f
=
sqrt
(
2
/
m
)
*
R_av
R
.*=
sqrt
.
(
2
./
[
m
for
i
in
1
:
length
(
R
)])
if
pl
uwerr
.
(
R
)
R_av
*=
sqrt
(
2
/
m
)
isnothing
(
wpm
)
?
uwerr
(
R_av
)
:
uwerr
(
R_av
,
wpm
)
isnothing
(
wpm
)
?
uwerr
(
f
)
:
uwerr
(
f
,
wpm
)
x
=
1
:
length
(
R
)
y
=
value
.
(
R
)
dy
=
err
.
(
R
)
v
=
value
(
R_av
)
e
=
err
(
R_av
)
figure
()
lbl
=
string
(
L"
$
af =
$
"
,
sprint
(
show
,
f
))
fill_between
(
plat
[
1
]
:
plat
[
2
],
v
-
e
,
v
+
e
,
color
=
"green"
,
alpha
=
0.75
,
label
=
L"
$
R
$
"
)
errorbar
(
x
,
y
,
dy
,
fmt
=
"x"
,
color
=
"black"
,
label
=
lbl
)
legend
()
xlim
(
left
=
y0
)
ylim
(
v
-
10
*
e
,
v
+
10
*
e
)
ylabel
(
L"
$
af_{vec}
$
"
)
#ylabel(L"$R_\mathrm{av}$")
xlabel
(
L"
$
x_0
$
"
)
#title(L"$f_{B^*}$")
if
!
isnothing
(
kappa
)
title
(
string
(
L"
$
\kappa_1 =
$
"
,
kappa
[
1
],
L"
$
\kappa_2 =
$
"
,
kappa
[
2
]))
end
display
(
gcf
())
#t = "ps_decay_$(kappa[1])_$(kappa[2]).pdf"
#savefig(joinpath("/Users/ale/Il mio Drive/phd/secondment/3pf test/analysis/plots",t))
end
if
!
data
return
f
else
return
f
,
R
end
end
function
dec_const_w
(
vv
::
Corr
,
pp
::
Corr
,
plat
::
Vector
{
Int64
},
m
::
uwreal
;
ca
::
Float64
=
0.0
,
pl
::
Bool
=
true
,
data
::
Bool
=
false
,
wpm
::
Union
{
Dict
{
Int64
,
Vector
{
Float64
}},
Dict
{
String
,
Vector
{
Float64
}},
Nothing
}
=
nothing
)
return
dec_const
(
vv
.
obs
,
plat
,
m
,
vv
.
y0
,
kappa
=
vv
.
kappa
,
pl
=
pl
,
data
=
data
,
wpm
=
wpm
)
return
dec_const
(
vv
.
obs
,
p
p
.
obs
,
p
lat
,
m
,
vv
.
y0
,
kappa
=
vv
.
kappa
,
pl
=
pl
,
data
=
data
,
wpm
=
wpm
)
end
# this can be used also for pseudoscalar decay constants with wilson fermions
function
dec_const_w
(
vv
::
Vector
{
uwreal
},
pp
::
Vector
{
uwreal
},
plat
::
Vector
{
Int64
},
m
::
uwreal
,
y0
::
Int64
;
ca
::
Float64
=
0.0
,
pl
::
Bool
=
true
,
data
::
Bool
=
false
,
kappa
::
Union
{
Vector
{
Float64
},
Nothing
}
=
nothing
,
wpm
::
Union
{
Dict
{
Int64
,
Vector
{
Float64
}},
Dict
{
String
,
Vector
{
Float64
}},
Nothing
}
=
nothing
)
corr_vv
=
vv
[
2
:
end
-
1
]
corr_pp
=
pp
[
2
:
end
-
1
]
T
=
length
(
corr_vv
)
aux
=
exp
.
((
collect
(
1
:
T
)
.-
y0
)
.*
fill
(
m
,
T
))
R
=
(
aux
.*
corr_vv
./
sqrt
.
(
corr_pp
))
R_av
=
plat_av
(
R
,
plat
,
wpm
)
f
=
sqrt
(
2
/
m
)
*
R_av
R
.*=
sqrt
.
(
2
./
[
m
for
i
in
1
:
length
(
R
)])
if
pl
uwerr
.
(
R
)
R_av
*=
sqrt
(
2
/
m
)
isnothing
(
wpm
)
?
uwerr
(
R_av
)
:
uwerr
(
R_av
,
wpm
)
isnothing
(
wpm
)
?
uwerr
(
f
)
:
uwerr
(
f
,
wpm
)
x
=
1
:
length
(
R
)
y
=
value
.
(
R
)
dy
=
err
.
(
R
)
v
=
value
(
R_av
)
e
=
err
(
R_av
)
figure
()
lbl
=
string
(
L"
$
af =
$
"
,
sprint
(
show
,
f
))
fill_between
(
plat
[
1
]
:
plat
[
2
],
v
-
e
,
v
+
e
,
color
=
"green"
,
alpha
=
0.75
,
label
=
L"
$
R
$
"
)
errorbar
(
x
,
y
,
dy
,
fmt
=
"x"
,
color
=
"black"
,
label
=
lbl
)
legend
()
xlim
(
left
=
y0
)
ylim
(
v
-
10
*
e
,
v
+
10
*
e
)
ylabel
(
L"
$
af_{vec}
$
"
)
#ylabel(L"$R_\mathrm{av}$")
xlabel
(
L"
$
x_0
$
"
)
#title(L"$f_{B^*}$")
if
!
isnothing
(
kappa
)
title
(
string
(
L"
$
\kappa_1 =
$
"
,
kappa
[
1
],
L"
$
\kappa_2 =
$
"
,
kappa
[
2
]))
end
display
(
gcf
())
#t = "ps_decay_$(kappa[1])_$(kappa[2]).pdf"
#savefig(joinpath("/Users/ale/Il mio Drive/phd/secondment/3pf test/analysis/plots",t))
end
if
!
data
return
f
else
return
f
,
R
end
end
function
dec_const_w
(
vv
::
Corr
,
pp
::
Corr
,
plat
::
Vector
{
Int64
},
m
::
uwreal
;
ca
::
Float64
=
0.0
,
pl
::
Bool
=
true
,
data
::
Bool
=
false
,
wpm
::
Union
{
Dict
{
Int64
,
Vector
{
Float64
}},
Dict
{
String
,
Vector
{
Float64
}},
Nothing
}
=
nothing
)
return
dec_const
(
vv
.
obs
,
plat
,
m
,
vv
.
y0
,
kappa
=
vv
.
kappa
,
pl
=
pl
,
data
=
data
,
wpm
=
wpm
)
end
# this can be used also for pseudoscalar decay constants with wilson fermions
function
dec_const_w
(
vv
::
Vector
{
uwreal
},
pp
::
Vector
{
uwreal
},
plat
::
Vector
{
Int64
},
m
::
uwreal
,
y0
::
Int64
;
ca
::
Float64
=
0.0
,
pl
::
Bool
=
true
,
data
::
Bool
=
false
,
kappa
::
Union
{
Vector
{
Float64
},
Nothing
}
=
nothing
,
wpm
::
Union
{
Dict
{
Int64
,
Vector
{
Float64
}},
Dict
{
String
,
Vector
{
Float64
}},
Nothing
}
=
nothing
)
corr_vv
=
vv
[
2
:
end
-
1
]
corr_pp
=
pp
[
2
:
end
-
1
]
T
=
length
(
corr_vv
)
if
ca
!=
0.0
der_pp
=
(
corr_pp
[
3
:
end
]
-
corr_pp
[
1
:
end
-
2
])
/
2
corr_vv
=
corr_vv
[
2
:
end
-
1
]
+
ca
*
der_pp
aux
=
exp
.
((
collect
(
1
:
T
-
2
)
.-
y0
)
.*
fill
(
m
,
T
-
2
))
else
#corr_vv = corr_vv[2:end-1]
aux
=
exp
.
((
collect
(
1
:
T
)
.-
y0
)
.*
fill
(
m
/
2
,
T
))
end
R
=
(
aux
.*
corr_vv
./
sqrt
.
(
corr_pp
))
R_av
=
plat_av
(
R
,
plat
,
wpm
)
f
=
sqrt
(
2
/
m
)
*
R_av
if
pl
R
.*=
sqrt
.
(
2
./
[
m
for
i
in
1
:
length
(
R
)])
uwerr
.
(
R
)
R_av
*=
sqrt
(
2
/
m
)
isnothing
(
wpm
)
?
uwerr
(
R_av
)
:
uwerr
(
R_av
,
wpm
)
isnothing
(
wpm
)
?
uwerr
(
f
)
:
uwerr
(
f
,
wpm
)
x
=
1
:
length
(
R
)
y
=
value
.
(
R
)
dy
=
err
.
(
R
)
v
=
value
(
R_av
)
e
=
err
(
R_av
)
figure
()
lbl
=
string
(
L"
$
af =
$
"
,
sprint
(
show
,
f
))
fill_between
(
plat
[
1
]
:
plat
[
2
],
v
-
e
,
v
+
e
,
color
=
"green"
,
alpha
=
0.75
,
label
=
L"
$
R
$
"
)
errorbar
(
x
,
y
,
dy
,
fmt
=
"x"
,
color
=
"black"
,
label
=
lbl
)
legend
()
xlim
(
y0
,
y0
+
plat
[
2
]
)
ylim
(
v
-
10
*
e
,
v
+
10
*
e
)
ylabel
(
L"
$
af_{vec}
$
"
)
#ylabel(L"$R_\mathrm{av}$")
xlabel
(
L"
$
x_0
$
"
)
#title(L"$f_{B^*}$")
if
!
isnothing
(
kappa
)
title
(
string
(
L"
$
\kappa_1 =
$
"
,
kappa
[
1
],
L"
$
\kappa_2 =
$
"
,
kappa
[
2
]))
end
display
(
gcf
())
#t = "ps_decay_$(kappa[1])_$(kappa[2]).pdf"
#savefig(joinpath("/Users/ale/Il mio Drive/phd/secondment/3pf test/analysis/plots",t))
end
if
!
data
return
f
else
return
f
,
R
end
end
function
dec_const_w
(
vv
::
Corr
,
pp
::
Corr
,
plat
::
Vector
{
Int64
},
m
::
uwreal
;
ca
::
Float64
=
0.0
,
pl
::
Bool
=
true
,
data
::
Bool
=
false
,
wpm
::
Union
{
Dict
{
Int64
,
Vector
{
Float64
}},
Dict
{
String
,
Vector
{
Float64
}},
Nothing
}
=
nothing
)
return
dec_const_w
(
vv
.
obs
,
pp
.
obs
,
plat
,
m
,
vv
.
y0
,
ca
=
ca
,
kappa
=
vv
.
mu
,
pl
=
pl
,
data
=
data
,
wpm
=
wpm
)
end
@doc
raw
"""
dec_const_pcvc(corr::Vector{uwreal}, plat::Vector{Int64}, m::uwreal, mu::Vector{Float64}, y0::Int64 ; pl::Bool=true, data::Bool=false, wpm::Union{Dict{Int64,Vector{Float64}},Dict{String,Vector{Float64}}, Nothing}=nothing)
...
...
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