aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw27@cam.ac.uk>2008-11-10 13:27:07 +0000
committerThomas White <taw27@cam.ac.uk>2008-11-10 13:27:07 +0000
commita2e3d847d013680de4885f60505fb9c10d79d1fb (patch)
tree61075e92bf0e874790142594f009566e1d44178e
parent55d6028d1fcf6d92e35cc888c101c4bbfa8b4c2b (diff)
parent60e003f6f6007cab0a99164080637dcbe2fc9bf8 (diff)
Merge branch 'master' into simple-search
-rw-r--r--src/reflections.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/reflections.c b/src/reflections.c
index 3a8c271..4809438 100644
--- a/src/reflections.c
+++ b/src/reflections.c
@@ -222,13 +222,17 @@ ReflectionList *reflection_list_from_cell(Basis *basis) {
signed int h, k, l;
int max_order_a, max_order_b, max_order_c;
- max_res = 20e9;
-
ordered = reflectionlist_new();
- max_order_a = max_res/modulus(basis->a.x, basis->a.y, basis->a.z);
- max_order_b = max_res/modulus(basis->b.x, basis->b.y, basis->b.z);
- max_order_c = max_res/modulus(basis->c.x, basis->c.y, basis->c.z);
+ max_res = 21e9;
+ do {
+ max_order_a = max_res/modulus(basis->a.x, basis->a.y, basis->a.z);
+ max_order_b = max_res/modulus(basis->b.x, basis->b.y, basis->b.z);
+ max_order_c = max_res/modulus(basis->c.x, basis->c.y, basis->c.z);
+ max_res -= 1e9;
+ } while ( (max_order_a * max_order_b * max_order_c * 8) > 1e4 );
+ printf("Selected maximum resolution %8.5f nm^-1\n", max_res/1e9);
+
for ( h=-max_order_a; h<=max_order_a; h++ ) {
for ( k=-max_order_b; k<=max_order_b; k++ ) {
for ( l=-max_order_c; l<=max_order_c; l++ ) {