From 8af55d282069373612e51db65345ee9eaf317ed5 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 23 Mar 2011 14:39:12 +0100 Subject: Use calculated max wavelength for calculating number of possible reflections --- src/check_hkl.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/check_hkl.c b/src/check_hkl.c index d220252d..898846d4 100644 --- a/src/check_hkl.c +++ b/src/check_hkl.c @@ -72,6 +72,10 @@ static void plot_shells(RefList *list, UnitCell *cell, const char *sym, int nout = 0; Reflection *refl; RefListIterator *iter; + int hmax, kmax, lmax; + double asx, asy, asz; + double bsx, bsy, bsz; + double csx, csy, csz; if ( cell == NULL ) { ERROR("Need the unit cell to plot resolution shells.\n"); @@ -151,9 +155,15 @@ static void plot_shells(RefList *list, UnitCell *cell, const char *sym, /* Count the number of reflections possible in each shell */ counted = new_list_count(); - for ( h=-150; h<=+150; h++ ) { - for ( k=-150; k<=+150; k++ ) { - for ( l=-150; l<=+150; l++ ) { + cell_get_reciprocal(cell, &asx, &asy, &asz, + &bsx, &bsy, &bsz, + &csx, &csy, &csz); + hmax = rmax / modulus(asx, asy, asz); + kmax = rmax / modulus(bsx, bsy, bsz); + lmax = rmax / modulus(csx, csy, csz); + for ( h=-hmax; h