aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/integration.c
diff options
context:
space:
mode:
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];