diff options
author | Thomas White <taw@physics.org> | 2015-07-17 15:35:02 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2015-07-17 15:35:02 +0200 |
commit | 854f85f90d6cc8424bc0459372720ed951165211 (patch) | |
tree | a568447c1de08f7e057a97679c4c4bece249bf13 /libcrystfel/src/geometry.c | |
parent | 93a708ef17d6bc314a343e837ce41ac4739cfc51 (diff) |
partialator: Detect (in a terminal fashion) NAN partialities
Diffstat (limited to 'libcrystfel/src/geometry.c')
-rw-r--r-- | libcrystfel/src/geometry.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libcrystfel/src/geometry.c b/libcrystfel/src/geometry.c index 048dc9f7..3325923c 100644 --- a/libcrystfel/src/geometry.c +++ b/libcrystfel/src/geometry.c @@ -236,6 +236,17 @@ static Reflection *check_reflection(struct image *image, Crystal *cryst, /* Calculate partiality */ part = partiality(pmodel, rlow, rhigh, pr); + if ( isnan(part) ) { + ERROR("Assigning NAN partiality!\n"); + ERROR("%3i %3i %3i rlow = %e, rhigh = %e\n", + h, k, l, rlow, rhigh); + ERROR("div + m = %e, R = %e, bw = %e\n", del, pr, image->bw); + ERROR("D = %e\n", rlow - rhigh); + ERROR("klow = %e khigh = %e\n", klow, khigh); + ERROR("distance(..) = %e\n", distance(cet, cez, tl, zl)); + abort(); + } + if ( updateme == NULL ) { refl = reflection_new(h, k, l); } else { |