diff options
author | Thomas White <taw@physics.org> | 2019-12-13 16:25:33 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-12-13 16:25:33 +0100 |
commit | c436476bf872bebb551b974de2c68b2fed2640af (patch) | |
tree | b68e8ade24a54bfe042b5c8437989ac40410826c /libcrystfel/src | |
parent | 2a747e2872840deb05988ff1660fca51d13d2207 (diff) |
pair_peaks: Don't attempt to pair 000
Normally the beam centre is masked out or not on the detector. However,
when it is, pairing with 000 causes gradients to come out as NaN and the
prediction refinement to fail.
Diffstat (limited to 'libcrystfel/src')
-rw-r--r-- | libcrystfel/src/predict-refine.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libcrystfel/src/predict-refine.c b/libcrystfel/src/predict-refine.c index 6facc6c3..84e3c5bf 100644 --- a/libcrystfel/src/predict-refine.c +++ b/libcrystfel/src/predict-refine.c @@ -250,6 +250,9 @@ static int pair_peaks(struct image *image, Crystal *cr, k = lrint(kd); l = lrint(ld); + /* Don't pair with 000, because that can cause trouble later */ + if ( (h==0) && (k==0) && (l==0) ) continue; + refl = reflection_new(h, k, l); if ( refl == NULL ) { ERROR("Failed to create reflection\n"); |