Skip to content

Commit

Permalink
Per #2395, update logic of is_vector_dir_stat(). Instead of just chec…
Browse files Browse the repository at this point in the history
…king 'DIR_', check 'DIR_ME', 'DIR_MAE', and 'DIR_MSE' to avoid an false positive match for the 'DIR_ERR' column which is computed from the vector partial sums rather than the individual direction differences.
  • Loading branch information
JohnHalleyGotway committed May 20, 2024
1 parent 588e4db commit 406afe4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tools/core/stat_analysis/aggr_stat_line.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ using namespace std;
static bool is_precip_var_name(const ConcatString &s);
static const string case_str = "CASE";
static bool is_vector_dir_stat(const STATLineType &t, const ConcatString &s);
static const string dir_stat_str = "DIR_";

////////////////////////////////////////////////////////////////////////
//
Expand Down Expand Up @@ -4233,7 +4232,9 @@ static bool is_vector_dir_stat(const STATLineType &t, const ConcatString &s) {
bool match = (t == STATLineType::vl1l2 ||
t == STATLineType::val1l2 ||
t == STATLineType::vcnt) &&
s.startswith(dir_stat_str.c_str());
(s.startswith("DIR_ME") ||
s.startswith("DIR_MAE") ||
s.startswith("DIR_MSE"));

return match;
}
Expand Down

0 comments on commit 406afe4

Please sign in to comment.