From 2f515b4fe79633279baf989191fc3c1e04f56175 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 29 Mar 2010 16:15:57 +0200 Subject: get_hkl: Only *save* reflections out to a certain resolution --- src/get_hkl.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/get_hkl.c') diff --git a/src/get_hkl.c b/src/get_hkl.c index d59af595..5e27f2a1 100644 --- a/src/get_hkl.c +++ b/src/get_hkl.c @@ -109,6 +109,7 @@ int main(int argc, char *argv[]) int config_za = 0; char *output = NULL; unsigned int *counts; + unsigned int *cts; signed int h, k, l; /* Long options */ @@ -153,7 +154,8 @@ int main(int argc, char *argv[]) } mol = load_molecule(); - ideal_ref = get_reflections(mol, eV_to_J(1790.0), 1/(0.6e-9)); + cts = new_list_count(); + ideal_ref = get_reflections(mol, eV_to_J(1790.0), 1/(0.6e-9), cts); counts = new_list_count(); @@ -166,10 +168,14 @@ int main(int argc, char *argv[]) } else { + /* No template? Then only mark reflections which were + * calculated. */ for ( h=-INDMAX; h<=INDMAX; h++ ) { for ( k=-INDMAX; k<=INDMAX; k++ ) { for ( l=-INDMAX; l<=INDMAX; l++ ) { - set_count(counts, h, k, l, 1); + unsigned int c; + c = lookup_count(cts, h, k, l); + set_count(counts, h, k, l, c); } } } -- cgit v1.2.3