Commit 357cfeed authored by Alessandro 's avatar Alessandro

bug fixing in plat_av

parent ddb20d68
...@@ -186,7 +186,7 @@ function md_sea(a::uwreal, md::Vector{Matrix{Float64}}, ws::ADerrors.wspace=ADer ...@@ -186,7 +186,7 @@ function md_sea(a::uwreal, md::Vector{Matrix{Float64}}, ws::ADerrors.wspace=ADer
end end
end end
function plat_av(obs::Vector{uwreal}, plat::Vector{Int64}, wpm::Union{Dict{Int64,Vector{Float64}},Dict{String,Vector{Float64}}, Nothing}) function plat_av(obs::Vector{uwreal}, plat::Vector{Int64}, wpm::Union{Dict{Int64,Vector{Float64}},Dict{String,Vector{Float64}}, Nothing}=nothing)
isnothing(wpm) ? uwerr.(obs) : uwerr.(obs, wpm) isnothing(wpm) ? uwerr.(obs) : uwerr.(obs, wpm)
w = 1 ./ err.(obs)[plat[1]:plat[2]].^2 w = 1 ./ err.(obs)[plat[1]:plat[2]].^2
av = sum(w .* obs[plat[1]:plat[2]]) / sum(w) av = sum(w .* obs[plat[1]:plat[2]]) / sum(w)
......
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