aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/integration.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2014-02-17 12:48:55 +0100
committerThomas White <taw@bitwiz.org.uk>2014-02-17 12:48:55 +0100
commitb2d65cb9b307a321e88fb5ff88197580ca0c59e4 (patch)
tree0079295d30501835f19161221ec6d84f1ec799f5 /libcrystfel/src/integration.c
parent021ddf275adf896de795ffad662f8debc6857317 (diff)
parent7551e70603982392c2b7d9f4287fd431ecccc7c9 (diff)
Merge branch 'master' of ssh://git.bitwiz.org.uk/crystfel
Diffstat (limited to 'libcrystfel/src/integration.c')
-rw-r--r--libcrystfel/src/integration.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c
index 1b2193fa..b86399e9 100644
--- a/libcrystfel/src/integration.c
+++ b/libcrystfel/src/integration.c
@@ -3,11 +3,11 @@
*
* Integration of intensities
*
- * Copyright © 2012-2013 Deutsches Elektronen-Synchrotron DESY,
+ * Copyright © 2012-2014 Deutsches Elektronen-Synchrotron DESY,
* a research centre of the Helmholtz Association.
*
* Authors:
- * 2010-2013 Thomas White <taw@physics.org>
+ * 2010-2014 Thomas White <taw@physics.org>
*
* This file is part of CrystFEL.
*
@@ -1483,6 +1483,15 @@ static void integrate_prof2d(IntegrationMethod meth, Crystal *cr,
setup_profile_boxes(&ic, list);
calculate_reference_profiles(&ic);
+ for ( i=0; i<ic.n_reference_profiles; i++ ) {
+ if ( ic.n_profiles_in_reference[i] == 0 ) {
+ ERROR("Reference profile %i has no contributions.\n",
+ i);
+ free_intcontext(&ic);
+ return;
+ }
+ }
+
for ( i=0; i<ic.n_boxes; i++ ) {
struct peak_box *bx;
bx = &ic.boxes[i];