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
3467bd56
Commit
3467bd56
authored
3 years ago
by
Javier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
analysis
parent
9308ef32
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
88 additions
and
6 deletions
+88
-6
.gitignore
.gitignore
+2
-0
analysis/analysis_pcac.jl
analysis/analysis_pcac.jl
+49
-0
analysis/functions.jl
analysis/functions.jl
+37
-6
No files found.
.gitignore
View file @
3467bd56
...
...
@@ -2,3 +2,5 @@
analysis/plat\.txt
*.pdf
analysis/*.txt
This diff is collapsed.
Click to expand it.
analysis/analysis_pcac.jl
0 → 100644
View file @
3467bd56
using
juobs
,
ADerrors
,
DelimitedFiles
,
PyPlot
,
LaTeXStrings
const
path
=
"/home/javier/Lattice/charm/production_2"
const
path_plat
=
"/home/javier/Lattice/juobs/analysis/plat.txt"
const
ensembles
=
[
"H400"
,
"N202"
,
"N200"
,
"N203"
,
"N300"
,
"J303"
]
const
deg
=
[
true
,
true
,
false
,
false
,
true
,
false
]
const
L
=
[
32
,
48
,
48
,
48
,
48
,
64
]
const
beta
=
[
3.46
,
3.55
,
3.55
,
3.55
,
3.70
,
3.70
]
const
R
=
[[
"H400r001"
,
"H400r002"
],
"N202r001"
,
[
"N200r000"
,
"N200r001"
],
[
"N203r000"
,
"N203r001"
],
"N300r002"
,
"J303r003"
]
include
(
"/home/javier/Lattice/juobs/analysis/functions.jl"
)
include
(
"/home/javier/Lattice/juobs/constants/juobs_const.jl"
)
m_ll
=
Vector
{
uwreal
}(
undef
,
length
(
ensembles
))
m_ss
=
Vector
{
uwreal
}(
undef
,
length
(
ensembles
))
m_hh
=
Vector
{
Vector
{
uwreal
}}(
undef
,
length
(
ensembles
))
mu_pp
=
Vector
{
Vector
{
Vector
{
Float64
}}}(
undef
,
length
(
ensembles
))
for
iens
=
1
:
length
(
ensembles
)
pp
=
read_dat
(
R
[
iens
],
"G5"
,
"G5"
)
a0p
=
read_dat
(
R
[
iens
],
"G5"
,
"G0G5"
)
rew
=
read_rew
(
R
[
iens
])
pp_obs
=
corr_obs
.
(
pp
,
L
=
L
[
iens
],
rw
=
rew
)
a0p_obs
=
corr_obs
.
(
a0p
,
L
=
L
[
iens
],
rw
=
rew
)
mu_pp
[
iens
]
=
getfield
.
(
pp_obs
,
:
mu
)
m
=
comp_pcac
(
a0p_obs
,
pp_obs
,
deg
[
iens
],
ensembles
[
iens
])
m_ll
[
iens
]
=
get_ll
(
mu_pp
[
iens
],
m
,
deg
[
iens
])
m_ss
[
iens
]
=
deg
[
iens
]
?
m_ll
[
iens
]
:
get_ss
(
mu_pp
[
iens
],
m
,
deg
[
iens
])
m_hh
[
iens
]
=
get_hh
(
mu_pp
[
iens
],
m
,
deg
[
iens
])
end
mm
=
get_mu
.
(
mu_pp
,
deg
)
mul_pp
=
getindex
.
(
mm
,
1
)
mus_pp
=
getindex
.
(
mm
,
2
)
muh_pp
=
getindex
.
(
mm
,
3
)
cot_ll
=
Vector
{
uwreal
}(
undef
,
length
(
ensembles
))
cot_ss
=
Vector
{
uwreal
}(
undef
,
length
(
ensembles
))
cot_hh
=
Vector
{
Vector
{
uwreal
}}(
undef
,
length
(
ensembles
))
for
iens
=
1
:
length
(
ensembles
)
cot_ll
[
iens
]
=
za
(
beta
[
iens
])
*
m_ll
[
iens
]
/
mul_pp
[
iens
]
cot_ss
[
iens
]
=
za
(
beta
[
iens
])
*
m_ss
[
iens
]
/
mus_pp
[
iens
]
cot_hh
[
iens
]
=
fill
(
za
(
beta
[
iens
]),
3
)
.*
m_hh
[
iens
]
./
muh_pp
[
iens
]
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
analysis/functions.jl
View file @
3467bd56
...
...
@@ -8,14 +8,19 @@ function read_dat(rep::Vector{String}, g1::String="G5", g2::String="G5")
p
=
joinpath
.
(
path
,
rep
,
"info"
)
f
=
[
filter
(
x
->
contains
(
x
,
".dat"
),
readdir
(
p
[
k
]))[
1
]
for
k
=
1
:
length
(
p
)]
f
=
joinpath
.
(
p
,
f
)
aux
=
read_mesons
.
(
f
,
g1
,
g2
)
res
=
[]
for
j
=
1
:
length
(
aux
[
1
])
aux2
=
[
aux
[
i
][
j
]
for
i
=
1
:
length
(
aux
)]
push!
(
res
,
aux2
)
return
read_mesons
(
f
,
g1
,
g2
)
end
function
read_rew
(
rep
::
String
)
p
=
joinpath
(
path
,
rep
,
"rew"
)
f
=
filter
(
x
->
contains
(
x
,
".dat"
),
readdir
(
p
))
f
=
joinpath
(
p
,
f
[
1
])
try
return
read_ms1
(
f
)
catch
return
read_ms1
(
f
,
v
=
"1.4"
)
end
return
res
end
read_rew
(
rep
::
Vector
{
String
})
=
read_rew
.
(
rep
)
function
get_mu
(
mu_list
::
Vector
{
Vector
{
Float64
}},
deg
::
Bool
)
mu_sorted
=
unique
(
sort
(
minimum
.
(
mu_list
)))
...
...
@@ -48,6 +53,16 @@ function get_ls(mu_list, obs::Vector{uwreal}, deg::Bool)
end
end
function
get_ss
(
mu_list
,
obs
::
Vector
{
uwreal
},
deg
::
Bool
)
mul
,
mus
,
muh
=
get_mu
(
mu_list
,
deg
)
for
k
=
1
:
length
(
mu_list
)
mu
=
mu_list
[
k
]
if
mus
in
mu
&&
mu
[
1
]
==
mu
[
2
]
#s-s
return
obs
[
k
]
end
end
end
function
get_lh
(
mu_list
,
obs
::
Vector
{
uwreal
},
deg
::
Bool
)
mul
,
mus
,
muh
=
get_mu
(
mu_list
,
deg
)
obs_lh
=
Vector
{
uwreal
}(
undef
,
0
)
...
...
@@ -72,6 +87,17 @@ function get_sh(mu_list, obs::Vector{uwreal}, deg::Bool)
return
obs_sh
end
function
get_hh
(
mu_list
,
obs
::
Vector
{
uwreal
},
deg
::
Bool
)
mul
,
mus
,
muh
=
get_mu
(
mu_list
,
deg
)
obs_hh
=
Vector
{
uwreal
}(
undef
,
0
)
for
k
=
1
:
length
(
mu_list
)
mu
=
mu_list
[
k
]
if
mu
[
1
]
==
mu
[
2
]
&&
!
(
mul
in
mu
)
&&
!
(
mus
in
mu
)
push!
(
obs_hh
,
obs
[
k
])
end
end
return
obs_hh
end
function
select_plateau
(
ens
::
String
,
mu_list
,
deg
::
Bool
)
mul
,
mus
,
muh
=
get_mu
(
mu_list
,
deg
)
f
=
readdlm
(
path_plat
)
...
...
@@ -116,6 +142,11 @@ function comp_meff(pp_obs::Vector{juobs.Corr}, deg::Bool, ens::String; pl::Bool=
plat
=
select_plateau
(
ens
,
mu_list
,
deg
)
return
meff
.
(
pp_obs
,
plat
,
pl
=
pl
)
end
function
comp_pcac
(
a0p_obs
::
Vector
{
juobs
.
Corr
},
pp_obs
::
Vector
{
juobs
.
Corr
},
deg
::
Bool
,
ens
::
String
;
pl
::
Bool
=
false
)
mu_list
=
getfield
.
(
pp_obs
,
:
mu
)
plat
=
select_plateau
(
ens
,
mu_list
,
deg
)
return
mpcac
.
(
a0p_obs
,
pp_obs
,
plat
,
pl
=
pl
)
end
function
comp_f
(
pp_obs
::
Vector
{
juobs
.
Corr
},
m
::
Vector
{
uwreal
},
deg
::
Bool
,
ens
::
String
;
pl
::
Bool
=
false
)
mu_list
=
getfield
.
(
pp_obs
,
:
mu
)
plat
=
select_plateau
(
ens
,
mu_list
,
deg
)
...
...
This diff is collapsed.
Click to expand it.
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