Commit 785a5537 authored by ale's avatar ale

add replica_sl as input for corr_obs_TSM

parent 96da8c01
......@@ -348,7 +348,7 @@ function corr_obs_TSM(cdata_sl::CData, cdata_corr::CData; real::Bool=true, rw::U
end
end
function corr_obs_TSM(cdata1::Array{CData, 1}, cdata2::Array{CData, 1}; real::Bool=true, rw::Union{Array{Array{Float64, 2}, 1}, Nothing}=nothing, L::Int64=1, info::Bool=false, idm_sl::Union{Vector{Int64},Nothing}=nothing, idm_corr::Union{Vector{Int64},Nothing}=nothing, nms::Union{Int64, Nothing}=nothing)
function corr_obs_TSM(cdata1::Array{CData, 1}, cdata2::Array{CData, 1}; real::Bool=true, rw::Union{Array{Array{Float64, 2}, 1}, Nothing}=nothing, L::Int64=1, info::Bool=false, replica_sl::Union{Vector{Int64},Nothing}=nothing, idm_sl::Union{Vector{Int64},Nothing}=nothing, idm_corr::Union{Vector{Int64},Nothing}=nothing, nms::Union{Int64, Nothing}=nothing)
if any(getfield.(cdata1, :id) .!= getfield.(cdata2, :id))
error("Error: cdata1 id != cdata2 id")
end
......@@ -362,7 +362,7 @@ function corr_obs_TSM(cdata1::Array{CData, 1}, cdata2::Array{CData, 1}; real::Bo
end
vcfg_sl = getfield.(cdata1, :vcfg)
replica_sl = Int64.(maximum.(vcfg_sl))
replica_sl = isnothing(replica_sl) ? Int64.(maximum.(vcfg_sl)) : replica_sl
vcfg_corr = getfield.(cdata2, :vcfg)
replica_corr = Int64.(maximum.(vcfg_corr))
......
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