Commit c436476b authored by Thomas White's avatar Thomas White
Browse files

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.
parent 2a747e28
...@@ -250,6 +250,9 @@ static int pair_peaks(struct image *image, Crystal *cr, ...@@ -250,6 +250,9 @@ static int pair_peaks(struct image *image, Crystal *cr,
k = lrint(kd); k = lrint(kd);
l = lrint(ld); 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); refl = reflection_new(h, k, l);
if ( refl == NULL ) { if ( refl == NULL ) {
ERROR("Failed to create reflection\n"); ERROR("Failed to create reflection\n");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment