diff options
author | Thomas White <taw@bitwiz.org.uk> | 2011-01-28 11:55:52 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:12 +0100 |
commit | e8bb1ed6c98b2477fd266e0225b0b1048ee67a6c (patch) | |
tree | fda4667c39ecd4db0f22716c421180c1e2cd6a31 /src | |
parent | d2fb93d03b1bff0f2615f2f35979a35241e07245 (diff) |
Add missing validity check
Diffstat (limited to 'src')
-rw-r--r-- | src/hrs-scaling.c | 2 |
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; } |