aboutsummaryrefslogtreecommitdiff
path: root/src/check_hkl.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-04-11 18:15:34 +0200
committerThomas White <taw@physics.org>2013-04-11 18:16:08 +0200
commitf7314aa835d5379e3fdd76845f401c26790f171c (patch)
tree78cba94de8e870bbedf8c31890101c58a58f7e5a /src/check_hkl.c
parent2daf2a8fa448b22706ac67718084b88dcb6f613b (diff)
check_hkl: Fix iteration limits for possible reflection calculation
Diffstat (limited to 'src/check_hkl.c')
-rw-r--r--src/check_hkl.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/check_hkl.c b/src/check_hkl.c
index a0acadb6..0f485654 100644
--- a/src/check_hkl.c
+++ b/src/check_hkl.c
@@ -89,9 +89,9 @@ static void plot_shells(RefList *list, UnitCell *cell, const SymOpList *sym,
RefListIterator *iter;
RefList *counted;
int hmax, kmax, lmax;
- double asx, asy, asz;
- double bsx, bsy, bsz;
- double csx, csy, csz;
+ double ax, ay, az;
+ double bx, by, bz;
+ double cx, cy, cz;
possible = malloc(nshells*sizeof(int));
measurements = malloc(nshells*sizeof(unsigned int));
@@ -182,15 +182,15 @@ static void plot_shells(RefList *list, UnitCell *cell, const SymOpList *sym,
/* Count the number of reflections possible in each shell */
counted = reflist_new();
- 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<hmax; h++ ) {
- for ( k=-kmax; k<kmax; k++ ) {
- for ( l=-lmax; l<lmax; l++ ) {
+ cell_get_cartesian(cell, &ax, &ay, &az,
+ &bx, &by, &bz,
+ &cx, &cy, &cz);
+ hmax = rmax * modulus(ax, ay, az);
+ kmax = rmax * modulus(bx, by, bz);
+ lmax = rmax * modulus(cx, cy, cz);
+ for ( h=-hmax; h<=hmax; h++ ) {
+ for ( k=-kmax; k<=kmax; k++ ) {
+ for ( l=-lmax; l<=lmax; l++ ) {
double d;
signed int hs, ks, ls;