From 3b6b3a6053c6b72fc0d2d7133edc2d32782c9a96 Mon Sep 17 00:00:00 2001 From: a3eille <146197392+a3eille@users.noreply.github.com> Date: Sun, 16 Jun 2024 17:46:26 +0200 Subject: [PATCH] make it so sct_dual sends back OK flag (0) for values that don't have enough neighboors in the inner or outer circles --- src/sct_dual.cpp | 46 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/src/sct_dual.cpp b/src/sct_dual.cpp index 9b87e1d..eb1add4 100644 --- a/src/sct_dual.cpp +++ b/src/sct_dual.cpp @@ -125,6 +125,8 @@ ivec titanlib::sct_dual( const Points& points, // initializations float na = -999.; // code for "Not Available". Any type of missing data + int flag_not_tested_inner; + int flag_not_tested_outer; ivec flags( p, na); ivec obs_test( p, 1); vec w( p, 0); @@ -133,6 +135,17 @@ ivec titanlib::sct_dual( const Points& points, vec t( p, na); bool set_all_good = false; + bool accept_not_tested = true; + if(accept_not_tested){ + std::cout << "Set flags for values that could not be tested as good " << p << std::endl; + flag_not_tested_inner = 0; + flag_not_tested_outer = 0; + } + else{ + std::cout << "Set flags for values that could not be tested due to lack of points in the inner/outer radius to 11/12." << p << std::endl; + flag_not_tested_inner = 11; + flag_not_tested_outer = 12; + } if (obs_to_check.size() == p) { for(int g=0; g 0) std::cout << std::setprecision(3) << "!!!! failure in matrix inversion: " << count_fail_matinv << std::endl; if(count_impossible > 0)