aboutsummaryrefslogtreecommitdiff
path: root/src/hrs-scaling.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2011-01-28 11:55:52 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:12 +0100
commite8bb1ed6c98b2477fd266e0225b0b1048ee67a6c (patch)
treefda4667c39ecd4db0f22716c421180c1e2cd6a31 /src/hrs-scaling.c
parentd2fb93d03b1bff0f2615f2f35979a35241e07245 (diff)
Add missing validity check
Diffstat (limited to 'src/hrs-scaling.c')
-rw-r--r--src/hrs-scaling.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/hrs-scaling.c b/src/hrs-scaling.c
index b26a44f0..35eedbdc 100644
--- a/src/hrs-scaling.c
+++ b/src/hrs-scaling.c
@@ -384,6 +384,8 @@ double *scale_intensities(struct image *images, int n, const char *sym,
int j;
for ( j=0; j<images[m].n_cpeaks; j++ ) {
+ if ( !images[m].cpeaks[j].valid ) continue;
+ if ( images[m].cpeaks[j].p < 0.1 ) continue;
tot += images[m].cpeaks[j].intensity
/ images[m].cpeaks[j].p;
}