This function read a mesons dat file at a given path and returns a vector of `CData` structures for different masses and Dirac structures.
This function read a mesons dat file at a given path and returns a vector of `CData` structures for different masses and Dirac structures.
Dirac structures `g1` and/or `g2` can be passed as string arguments in order to filter correaltors.
Dirac structures `g1` and/or `g2` can be passed as string arguments in order to filter correaltors.
ADerrors id can be specified as argument. If is not specified, the `id` is fixed according to the ensemble name (example: "H400"-> id = 400)
ADerrors id can be specified as argument. If is not specified, the `id` is fixed according to the ensemble name (example: "H400"-> id = 400)
*For the old version (without smearing, distance preconditioning and theta) set legacy=true
Examples:
Examples:
```@example
```@example
read_mesons(path)
read_mesons(path)
...
@@ -85,13 +97,12 @@ read_mesons(path, "G5")
...
@@ -85,13 +97,12 @@ read_mesons(path, "G5")
read_mesons(path, nothing, "G5")
read_mesons(path, nothing, "G5")
read_mesons(path, "G5", "G5")
read_mesons(path, "G5", "G5")
read_mesons(path, "G5", "G5", id=1)
read_mesons(path, "G5", "G5", id=1)
read_mesons([path1, path2], "G5", "G5")
read_mesons(path, "G5_d2", "G5_d2", legacy=true)
```
```
"""
"""
function read_mesons(path::String,g1::Union{String,Nothing}=nothing,g2::Union{String,Nothing}=nothing;id::Union{Int64,Nothing}=nothing)
function read_mesons(path::String,g1::Union{String,Nothing}=nothing,g2::Union{String,Nothing}=nothing;id::Union{Int64,Nothing}=nothing,legacy::Bool=false)
@@ -99,8 +110,8 @@ function read_mesons(path::String, g1::Union{String, Nothing}=nothing, g2::Union
...
@@ -99,8 +110,8 @@ function read_mesons(path::String, g1::Union{String, Nothing}=nothing, g2::Union
end
end
data=open(path,"r")
data=open(path,"r")
g_header=read_global_header(path)
g_header=read_GHeader(path)
c_header=read_CHeader(path)
c_header=read_CHeader(path,legacy=legacy)
ncorr=g_header.ncorr
ncorr=g_header.ncorr
tvals=g_header.tvals
tvals=g_header.tvals
...
@@ -159,8 +170,8 @@ function read_mesons(path::String, g1::Union{String, Nothing}=nothing, g2::Union
...
@@ -159,8 +170,8 @@ function read_mesons(path::String, g1::Union{String, Nothing}=nothing, g2::Union
returnres
returnres
end
end
function read_mesons(path::Vector{String},g1::Union{String,Nothing}=nothing,g2::Union{String,Nothing}=nothing;id::Union{Int64,Nothing}=nothing)
function read_mesons(path::Vector{String},g1::Union{String,Nothing}=nothing,g2::Union{String,Nothing}=nothing;id::Union{Int64,Nothing}=nothing,legacy::Bool=false)