diff options
author | Thomas White <taw@physics.org> | 2014-02-13 11:58:34 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-02-13 11:58:34 +0100 |
commit | 2cb4c47dc477761fb621a4df6683c3f27fc7d5a1 (patch) | |
tree | 099466b411ce63d61c874334ce3fd633bea7f346 /libcrystfel | |
parent | da7099fb56730ab89ce9642c2caf090e7b902c72 (diff) |
Don't proceed with integration if no suitable reference reflections were found
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/integration.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c index 1b2193fa..b14d0f1c 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,14 @@ 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 0 has no contributions.\n"); + free_intcontext(&ic); + return; + } + } + for ( i=0; i<ic.n_boxes; i++ ) { struct peak_box *bx; bx = &ic.boxes[i]; |