Commit fbf1f3a0 authored by Javier's avatar Javier

rw_info -> info

info==true && rw==nothing provides primary observable
parent 5eb61b12
......@@ -461,7 +461,7 @@ t0_r = comp_t0(Y, [38, 58], L=32, rw=[rw1, rw2], pl=true)
"""
function comp_t0(Y::YData, plat::Vector{Int64}; L::Int64, pl::Bool=false,
rw::Union{Matrix{Float64}, Nothing}=nothing, npol::Int64=2, ws::ADerrors.wspace=ADerrors.wsg,
wpm::Union{Dict{Int64,Vector{Float64}},Dict{String,Vector{Float64}}, Nothing}=nothing, rw_info::Bool=false)
wpm::Union{Dict{Int64,Vector{Float64}},Dict{String,Vector{Float64}}, Nothing}=nothing, info::Bool=false)
Ysl = Y.obs
t = Y.t
......@@ -548,8 +548,10 @@ function comp_t0(Y::YData, plat::Vector{Int64}; L::Int64, pl::Bool=false,
title(string(L"$t/a^2 = $", t[nt0]))
display(gcf())
end
if rw_info && !isnothing(rw)
(t0, WY_aux, W_obs)
if info && !isnothing(rw)
return (t0, WY_aux, W_obs)
elseif info && isnothing(rw)
return (t0, Y_aux)
else
return t0
end
......@@ -557,7 +559,7 @@ end
function comp_t0(Y::Vector{YData}, plat::Vector{Int64}; L::Int64, pl::Bool=false,
rw::Union{Vector{Matrix{Float64}}, Nothing}=nothing, npol::Int64=2, ws::ADerrors.wspace=ADerrors.wsg,
wpm::Union{Dict{Int64,Vector{Float64}},Dict{String,Vector{Float64}}, Nothing}=nothing)
wpm::Union{Dict{Int64,Vector{Float64}},Dict{String,Vector{Float64}}, Nothing}=nothing, info::Bool=false)
nr = length(Y)
Ysl = getfield.(Y, :obs)
......@@ -658,8 +660,10 @@ function comp_t0(Y::Vector{YData}, plat::Vector{Int64}; L::Int64, pl::Bool=false
title(string(L"$t/a^2 = $", t[nt0]))
display(gcf())
end
if rw_info && !isnothing(rw)
(t0, WY_aux, W_obs)
if info && !isnothing(rw)
return (t0, WY_aux, W_obs)
elseif info && isnothing(rw)
return (t0, Y_aux)
else
return t0
end
......
......@@ -81,7 +81,7 @@ corr_pp = corr_obs.(data)
corr_pp_r = corr_obs.(data, rw=[rw1, rw2])
```
"""
function corr_obs(cdata::CData; real::Bool=true, rw::Union{Array{Float64, 2}, Nothing}=nothing, L::Int64=1, rw_info::Bool=false)
function corr_obs(cdata::CData; real::Bool=true, rw::Union{Array{Float64, 2}, Nothing}=nothing, L::Int64=1, info::Bool=false)
real ? data = cdata.re_data ./ L^3 : data = cdata.im_data ./ L^3
nt = size(data)[2]
......@@ -95,8 +95,10 @@ function corr_obs(cdata::CData; real::Bool=true, rw::Union{Array{Float64, 2}, No
obs = [ow[x0] / W_obs for x0 = 1:nt]
end
if rw_info && !isnothing(rw)
if info && !isnothing(rw)
return (Corr(obs, cdata), ow, W_obs)
elseif info && isnothing(rw)
return (Corr(obs, cdata), obs)
else
return Corr(obs, cdata)
end
......@@ -104,7 +106,7 @@ end
#function corr_obs for R != 1
#TODO: vcfg with gaps
function corr_obs(cdata::Array{CData, 1}; real::Bool=true, rw::Union{Array{Array{Float64, 2}, 1}, Nothing}=nothing, L::Int64=1, rw_info::Bool=false)
function corr_obs(cdata::Array{CData, 1}; real::Bool=true, rw::Union{Array{Array{Float64, 2}, 1}, Nothing}=nothing, L::Int64=1, info::Bool=false)
nr = length(cdata)
id = getfield.(cdata, :id)
vcfg = getfield.(cdata, :vcfg)
......@@ -133,8 +135,10 @@ function corr_obs(cdata::Array{CData, 1}; real::Bool=true, rw::Union{Array{Array
W_obs = uwreal(tmp_W, id[1], replica)
obs = [ow[x0] / W_obs for x0 = 1:nt]
end
if rw_info && !isnothing(rw)
if info && !isnothing(rw)
return (Corr(obs, cdata), ow, W_obs)
elseif info && isnothing(rw)
return (Corr(obs, cdata), obs)
else
return Corr(obs, cdata)
end
......@@ -325,7 +329,7 @@ function md_val(a::uwreal, obs::Corr, derm::Vector{Corr})
corr = getfield(obs, :obs)
prop = getfield.(corr, :prop)
if all(count.(prop) .== 1)
der = [derivative(a, corr[k]) for k = 1:length(corr)]
elseif all(count.(prop) .== 2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment