Commit 41bf22af authored by Antonino D'Anna's avatar Antonino D'Anna

corrected kwargs... use

parent 16052740
......@@ -69,16 +69,23 @@ function meff(corr::Vector{uwreal}, plat::Vector{Int64}; pl::Bool=true, data::Bo
return (mass, aux)
end
end
function meff(corr::Corr, plat::Vector{Int64}; pl::Bool=true, data::Bool=false,
wpm::Union{Dict{Int64,Vector{Float64}},Dict{String,Vector{Float64}}, Nothing}=nothing, savepl::Bool=false,
label::Union{String,Nothing}=nothing)
function meff(corr::Corr, plat::Vector{Int64}; kwargs...)
if corr.mu == [0.0, 0.0]
return meff(corr.obs, plat, pl=pl, data=data, kappa=corr.kappa, mu=nothing, wpm=wpm,savepl=savepl, label=label)
return meff(corr.obs, plat; kappa=corr.kappa, mu=nothing,kwargs...)
else
return meff(corr.obs, plat, pl=pl, data=data, mu=corr.mu, kappa=nothing, wpm=wpm,savepl=savepl, label=label)
return meff(corr.obs, plat; mu=corr.mu, kappa=nothing, kwargs...)
end
end
function meff(corrs::Vector{Corr}, plats::Vector{Vector{Int64}}; data::Bool=false, kwargs...)
if !data
return meff.(corrs,plats;kwargs)
end
aux = meff.(corrs,plats; data=data, kwargs...)
return getfield.(aux,1), getfield.(aux,2);
end
@doc raw"""
mpcac(a0p::Vector{uwreal}, pp::Vector{uwreal}, plat::Vector{Int64}; ca::Float64=0.0, pl::Bool=true, data::Bool=false, wpm::Union{Dict{Int64,Vector{Float64}},Dict{String,Vector{Float64}}, Nothing}=nothing,savepl::Bool=false, label::Union{String,Nothing}=nothing)
......@@ -180,28 +187,24 @@ function mpcac(a0p::Vector{uwreal}, pp::Vector{uwreal}, plat::Vector{Int64}; ca:
end
end
function mpcac(a0p::Corr, pp::Corr, plat::Vector{Int64}; ca::Float64=0.0, pl::Bool=true, data::Bool=false,
wpm::Union{Dict{Int64,Vector{Float64}},Dict{String,Vector{Float64}}, Nothing}=nothing,
savepl::Bool=false, label::Union{String,Nothing}=nothing)
function mpcac(a0p::Corr, pp::Corr, plat::Vector{Int64}; kwargs... )
if a0p.kappa == pp.kappa || a0p.mu == pp.mu
if a0p.mu == [0.0, 0.0]
return mpcac(a0p.obs, pp.obs, plat, ca=ca, pl=pl, data=data, kappa=a0p.kappa, mu=nothing, wpm=wpm,savepl=savepl, label=label)
return mpcac(a0p.obs, pp.obs, plat; kappa=a0p.kappa, mu=nothing, kwargs...)
else
return mpcac(a0p.obs, pp.obs, plat, ca=ca, pl=pl, data=data, mu=a0p.mu, kappa=nothing, wpm=wpm,savepl=savepl,label=label)
return mpcac(a0p.obs, pp.obs, plat; mu=a0p.mu, kappa=nothing, kwargs...)
end
else
error("mu or kappa values does not match")
end
end
function mpcac(a0p::Vector{Corr},pp::Vector{Corr},plat::Vector{Vector{Int64}}; ca::Float64=0.0, pl::Bool=true, data::Bool=false,
wpm::Union{Dict{Int64,Vector{Float64}},Dict{String,Vector{Float64}}, Nothing}=nothing,
savepl::Bool=false, label::Union{String,Nothing}=nothing)
function mpcac(a0p::Vector{Corr},pp::Vector{Corr},plat::Vector{Vector{Int64}}; data::Bool=false, kwargs...)
if !data
return mpcac.(a0p,pp,plat,ca=ca,pl=pl,data=data,wpm=wpm,savepl=savepl,label=label)
return mpcac.(a0p,pp,plat;kwargs...)
else
aux = mpcac.(a0p,pp,plat,ca=ca,pl=pl,data=data,wpm=wpm,savepl=savepl,label=label)
aux = mpcac.(a0p,pp,plat; data=true, kwargs...)
return (getfield.(aux,1),getfield.(aux,2))
end
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