Typo and reader

parent eccce80f
......@@ -138,7 +138,7 @@ function save_data()
for fl in 1:length(flow_times)
BDIO_write!(fb,pp_corr_t[:,noi,fl])
BDIO_write!(fb,ap_corr_t[:,noi,fl])
BDIO_write!(fb,Quark_cond[noi,fl])
BDIO_write!(fb,[Quark_cond[noi,fl]])
end
end
......
......@@ -22,7 +22,7 @@ function read_ff(name::String)
BDIO_read(file, dpars)
BDIO_read(file, th)
BDIO_read(file, nflow)
flow_times=Vector{Float64}(undef,nflow)
flow_times=Vector{Float64}(undef,nflow[1])
BDIO_read(file, flow_times)
BDIO_read(file, N_noise)
......@@ -75,7 +75,8 @@ function read_ff(name::String)
ap_corr_t_mc=[ap_corr_t_mc;ap_corr_t]
Sigma_mc=[Sigma_mc;Sigma]
BDIO_seek!(file,2)
BDIO_seek!(file)
BDIO_seek!(file)
end
BDIO_close!(file)
......@@ -83,3 +84,28 @@ function read_ff(name::String)
return pp_corr_mc,ap_corr_mc,pp_corr_t_mc,ap_corr_t_mc,Sigma_mc
end
"""
function uwff(file::String)
Loads in the variables 'pp_corr','ap_corr','pp_corr_t','ap_corr_t' and 'Sigma' the corresponding
'uwreal' quantities. The indices are, when corresponding, eucliden time and flow times
"""
function uwff(file::String)
pp_corr_mc,ap_corr_mc,pp_corr_t_mc,ap_corr_t_mc,Sigma_mc = read_ff(file)
runame = String(split(split(file,"/")[end],".")[1])
T = size(pp_corr_mc)[2]
Ns = size(pp_corr_mc)[3]
Nfl = size(pp_corr_t_mc)[4]
global pp_corr = [uwreal(sum(pp_corr_mc,dims = 3)[:,i,1]./Ns,runame) for i in 1:T]
global ap_corr = [uwreal(real.(sum(ap_corr_mc,dims = 3)[:,i,1]./Ns),runame) for i in 1:T]
global pp_corr_t = [uwreal(sum(pp_corr_t_mc,dims = 3)[:,i,1,k]./Ns,runame) for i in 1:T, k in 1:Nfl]
global ap_corr_t = [uwreal(real.(sum(ap_corr_t_mc,dims = 3)[:,i,1,k]./Ns),runame) for i in 1:T, j in 1:Ns,k in 1:Nfl]
global Sigma = [uwreal(real.(sum(Sigma_mc,dims = 2)[:,1,i]./Ns),runame) for i in 1:Nfl]
return nothing
end
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