diff options
author | Thomas White <taw@physics.org> | 2011-10-12 12:25:35 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:39 +0100 |
commit | c4e91973d72f159a8e3be0e5e45580f54352c5ed (patch) | |
tree | d968609b13c43c14288a1ce346b4c09c6af2c0aa | |
parent | 8dc02bb973241b9dd3cb2f876bc09b9b7eb62f70 (diff) |
Take number of dud images into account for partiality graph
-rw-r--r-- | src/scaling-report.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/scaling-report.c b/src/scaling-report.c index a1d1fbd3..b499e59d 100644 --- a/src/scaling-report.c +++ b/src/scaling-report.c @@ -178,6 +178,7 @@ static void partiality_graph(cairo_t *cr, const struct image *images, int n, double prob; double pcalcmin[nbins]; double pcalcmax[nbins]; + int num_nondud; show_text_simple(cr, "Observed partiality", -20.0, g_height/2.0, NULL, -M_PI_2, J_CENTER); @@ -199,8 +200,14 @@ static void partiality_graph(cairo_t *cr, const struct image *images, int n, } pcalcmax[nbins-1] += 0.001; /* Make sure it include pcalc = 1 */ + num_nondud = 0; + for ( i=0; i<n; i++ ) { + if ( images[i].pr_dud ) continue; + num_nondud++; + } + cairo_set_source_rgb(cr, 0.0, 0.7, 0.0); - prob = 1.0 / n; + prob = 1.0 / num_nondud; for ( i=0; i<n; i++ ) { Reflection *refl; |