Commit a428c0c2 authored by Antonino D'Anna's avatar Antonino D'Anna

fixed bug in plot_data, added support to mpcac for vector{vector{uwreal}}

parent 15dfff73
......@@ -271,7 +271,7 @@ function mpcac(a0p::Corr, pp::Corr, plat::Vector{Int64}; kwargs... )
end
end
function mpcac(a0p::Vector{Corr},pp::Vector{Corr},plat::Vector{Vector{Int64}}; kwargs...)
function mpcac(a0p::Vector{Vector{uwreal}},pp::Vector{Vector{uwreal}},plat::Vector{Vector{Int64}}; kwargs...)
a = mpcac.(a0p,pp,plat; kwargs...)
if length(a[1])==1
......@@ -293,6 +293,9 @@ function mpcac(a0p::Vector{Corr},pp::Vector{Corr},plat::Vector{Vector{Int64}}; k
return Tuple([r...] for r in eachrow(a))
end
function mpcac(a0p::Vector{Corr},pp::Vector{Corr},plat::Vector{Vector{Int64}}; kwargs...)
return mpcac([a.obs for a in a0p],[p.obs for p in pp],plat;kwargs...)
end
## Decay constants
@doc raw"""
......
......@@ -70,7 +70,7 @@ function plot_data(data::Vector{uwreal},xdata::Vector{uwreal};
isnothing(wpm) ? uwerr.(data) : [uwerr(d,wpm) for d in data];
isnothing(wpm) ? uwerr.(xdata) : [uwerr(x,wpm) for x in xdata];
fig, ax = isnothing(figs) ? subplots(1) : figs;
line, = ax.errorbar(xdata,value.(data), err.(data), err.(xdata),c=c,fmt=fmt)
line, = ax.errorbar(value.(xdata),value.(data), ADerrors.err.(data), ADerrors.err.(xdata),c=c,fmt=fmt)
if length(label)!=0
line.set_label(label)
ax.legend();
......
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