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
74d82fba
Commit
74d82fba
authored
4 years ago
by
Javier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corr_sym added
parent
34dd8c51
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
1 deletion
+30
-1
src/juobs.jl
src/juobs.jl
+1
-1
src/juobs_tools.jl
src/juobs_tools.jl
+28
-0
src/juobs_types.jl
src/juobs_types.jl
+1
-0
No files found.
src/juobs.jl
View file @
74d82fba
...
...
@@ -10,7 +10,7 @@ include("juobs_obs.jl")
export
read_mesons
,
read_ms1
,
read_ms
,
read_md
,
truncate_data!
export
get_matrix
,
energies
,
uwdot
,
uweigvals
,
uweigvecs
,
uweigen
,
invert
,
getall_eigvals
,
getall_eigvecs
export
corr_obs
,
md_sea
,
md_val
,
plat_av
,
lin_fit
,
x_lin_fit
,
y_lin_fit
,
fit_routine
export
corr_obs
,
corr_sym
,
md_sea
,
md_val
,
plat_av
,
lin_fit
,
x_lin_fit
,
y_lin_fit
,
fit_routine
export
meff
,
mpcac
,
dec_const
,
dec_const_pcvc
,
comp_t0
end
# module
This diff is collapsed.
Click to expand it.
src/juobs_tools.jl
View file @
74d82fba
...
...
@@ -125,7 +125,35 @@ function corr_obs(cdata::Array{CData, 1}; real::Bool=true, rw::Union{Array{Array
return
Corr
(
obs
,
cdata
)
end
@doc
raw
"""
corr_sym(corrL::Corr, corrR::Corr, parity::Int64=1)
Computes the symmetrized correlator using the left correlador `corrL` and the right correlator `corrR`. The source position
of `corrR` must be `T - 1 - y0`, where `y0` is the source position of `corrL`.
```@example
pp_sym = corr_sym(ppL, ppR, +1)
a0p_sym = corr_sym(a0pL, a0pR, -1)
```
"""
function
corr_sym
(
corrL
::
Corr
,
corrR
::
Corr
,
parity
::
Int64
=
1
)
T
=
length
(
corrL
.
obs
)
sym
=
[
:
kappa
,
:
mu
,
:
gamma
]
if
corrL
.
y0
!=
T
-
1
-
corrR
.
y0
error
(
"Corr: Parameter mismatch"
)
end
for
s
in
sym
if
getfield
(
corrL
,
s
)
!=
getfield
(
corrR
,
s
)
error
(
"Corr: Parameter mismatch"
)
end
end
if
abs
(
parity
)
!=
1
error
(
"incorrect value of parity (+- 1)"
)
end
res
=
(
corrL
.
obs
[
1
:
end
]
+
parity
*
corrR
.
obs
[
end
:-
1
:
1
])
/
2
return
Corr
(
res
,
corrL
.
kappa
,
corrL
.
mu
,
corrL
.
gamma
,
corrL
.
y0
)
end
#TODO: VECTORIZE, uwreal?
@doc
raw
"""
md_sea(a::uwreal, md::Vector{Matrix{Float64}}, ws::ADerrors.wspace=ADerrors.wsg)
...
...
This diff is collapsed.
Click to expand it.
src/juobs_types.jl
View file @
74d82fba
...
...
@@ -167,6 +167,7 @@ mutable struct Corr
y0
=
Int64
(
h
[
1
]
.
x0
)
return
new
(
a
,
kappa
,
mu
,
gamma
,
y0
)
end
Corr
(
o
::
Vector
{
uwreal
},
k
::
Vector
{
Float64
},
m
::
Vector
{
Float64
},
g
::
Vector
{
String
},
y
::
Int64
)
=
new
(
o
,
k
,
m
,
g
,
y
)
end
mutable struct
YData
...
...
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