aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/peaks.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2016-05-19 17:10:35 +0200
committerThomas White <taw@physics.org>2016-05-19 17:10:35 +0200
commit7f4f953cf57cdc6e87f06f5651adc573f8af7be0 (patch)
treea56f88f30042946e66713ab79d7eb335857c9cd0 /libcrystfel/src/peaks.c
parent998c273be056b84e378bdec95fc36998d663ba14 (diff)
integrate_peak(): Trap if pk_total=0
Diffstat (limited to 'libcrystfel/src/peaks.c')
-rw-r--r--libcrystfel/src/peaks.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c
index 6f67255b..1b865bc8 100644
--- a/libcrystfel/src/peaks.c
+++ b/libcrystfel/src/peaks.c
@@ -335,6 +335,7 @@ static int integrate_peak(struct image *image, int cfs, int css,
}
if ( pk_counts == 0 ) return 11;
+ if ( pk_total == 0 ) return 13;
*pfs = ((double)fsct / pk_total) + 0.5;
*pss = ((double)ssct / pk_total) + 0.5;