aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-06-24 13:58:08 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:28 +0100
commitf17c83d14c7dc5c327a7896e1c3f88ab0efe379e (patch)
tree4386e02c9a759c7fcf2608843c2a615ef897cbd7 /tests
parenta49a42ad89fab9da5a859bd04ebad8811ad9eecd (diff)
Make fifth integration check agree with actual integration method
Diffstat (limited to 'tests')
-rw-r--r--tests/integration_check.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/integration_check.c b/tests/integration_check.c
index d6577032..ed11efd7 100644
--- a/tests/integration_check.c
+++ b/tests/integration_check.c
@@ -165,7 +165,7 @@ static void fifth_integration_check(struct image *image, int n_trials,
for ( ss=0; ss<image->height; ss++ ) {
int idx = fs+image->width*ss;
image->data[idx] = poisson_noise(10.0);
- if ( (fs-64)*(fs-64) + (ss-64)*(ss-64) <= 10*10 ) {
+ if ( (fs-64)*(fs-64) + (ss-64)*(ss-64) < 10*10 ) {
pcount++;
}
}
@@ -189,7 +189,7 @@ static void fifth_integration_check(struct image *image, int n_trials,
" max = %.2f, sigma = %.2f\n",
mean_intensity, mean_bg, mean_max, mean_sigma);
double s = pcount*10.0;
- if ( fabs(mean_intensity - s) > 1.0 ) {
+ if ( fabs(mean_intensity - s) > 5.0 ) {
ERROR("Mean intensity should be close to %f.\n", pcount*10.0);
*fail = 1;
}
@@ -227,7 +227,7 @@ static void sixth_integration_check(struct image *image, int n_trials,
if ( r < 9*9 ) {
image->data[idx] += 1000.0;
pcount++;
- } else if ( r <= 10*10 ) {
+ } else if ( r < 10*10 ) {
npcount++;
}
}