Skip to content

Commit

Permalink
Per #1673, update vx_statistics library code to only set gbeta/beta_v…
Browse files Browse the repository at this point in the history
…alue to bad data for sub-domains.
  • Loading branch information
JohnHalleyGotway committed Aug 4, 2021
1 parent f1b1317 commit d36789b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
15 changes: 13 additions & 2 deletions met/src/libcode/vx_statistics/met_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2756,6 +2756,7 @@ void DMAPInfo::reset_options() {
fom_alpha = 0.1; // FOM Alpha
zhu_weight = 0.5; // Zhu Weight
beta_value = bad_data_double; // G-Beta Value
n_full_points = bad_data_int; // Number of FULL domain points

return;
}
Expand Down Expand Up @@ -2965,14 +2966,23 @@ void DMAPInfo::set(const SingleThresh &fthr, const SingleThresh &othr,
double g_y2 = g_med_fo * oy + g_med_of * fy;
double g_y = g_y1 * g_y2;
g = pow(g_y, 1.0 / 3.0);
gbeta = max(1.0 - g_y / beta_value, 0.0);

// Only compute GBETA over the full verification domain.
// Report bad data for masking regions.
if(total == n_full_points) {
gbeta = max(1.0 - g_y / beta_value, 0.0);
}
else {
gbeta = beta_value = bad_data_double;
}

// Dump debug distance map info
mlog << Debug(4) << " DMAP.Options: baddeley_p=" << baddeley_p
<< ", baddeley_max_dist=" << baddeley_max_dist
<< ", fom_alpha=" << fom_alpha
<< ", zhu_weight=" << zhu_weight
<< ", beta_value=" << beta_value
<< ", n_full_points=" << n_full_points
<< "\n";

mlog << Debug(4) << " DMAP: nf=" << fy << ", no=" << oy << ", nfo=" << foy << ", total=" << total
Expand All @@ -2994,12 +3004,13 @@ void DMAPInfo::set(const SingleThresh &fthr, const SingleThresh &othr,

void DMAPInfo::set_options(const int _baddeley_p, const double _baddeley_max_dist,
const double _fom_alpha, const double _zhu_weight,
const double _beta_value) {
const double _beta_value, const int _n_full_points) {
baddeley_p = _baddeley_p;
baddeley_max_dist = _baddeley_max_dist;
fom_alpha = _fom_alpha;
zhu_weight = _zhu_weight;
beta_value = _beta_value;
n_full_points = _n_full_points;
}

////////////////////////////////////////////////////////////////////////
Expand Down
3 changes: 2 additions & 1 deletion met/src/libcode/vx_statistics/met_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ class DMAPInfo {
double fom_alpha; // FOM Alpha
double zhu_weight; // Zhu Weight
double beta_value; // G-Beta Value
int n_full_points; // Number of FULL domain points

public:

Expand Down Expand Up @@ -647,7 +648,7 @@ class DMAPInfo {

void set_options(const int _baddeley_p, const double _baddeley_max_dist,
const double _fom_alpha, const double _zhu_weight,
const double _beta_value);
const double _beta_value, const int _n_full_points);

// Get functions
double get_beta_value() const;
Expand Down

0 comments on commit d36789b

Please sign in to comment.