aboutsummaryrefslogtreecommitdiff
path: root/src/partialator.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2011-02-12 14:40:16 -0800
committerThomas White <taw@physics.org>2012-02-22 15:27:14 +0100
commit9a2773d90137c51149c254f376237ba18386ee8e (patch)
tree43ed1bc5a5bd8dc54d92163a9be61300ebe476c5 /src/partialator.c
parent54ff7acab385a0c524b8f2194e95621e92843db1 (diff)
More stream handling and reflection counting
Diffstat (limited to 'src/partialator.c')
-rw-r--r--src/partialator.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/partialator.c b/src/partialator.c
index 31b2b7e9..50f37fd8 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -155,6 +155,9 @@ int main(int argc, char *argv[])
int n_iter = 10;
struct beam_params *beam = NULL;
double *I_full;
+ int n_found = 0;
+ int n_expected = 0;
+ int n_notfound = 0;
/* Long options */
const struct option longopts[] = {
@@ -339,14 +342,15 @@ int main(int argc, char *argv[])
int clamp1, clamp2;
get_indices(refl, &h, &k, &l);
- STATUS("%3i %3i %3i\n", h, k, l);
+ get_detector_pos(refl, &x, &y);
+ n_expected++;
peak = find_refl(peaks, h, k, l);
if ( peak == NULL ) {
- if ( (h==0) && (k==0) && (l==0) ) continue;
- STATUS("%3i %3i %3i not found\n", h, k, l);
+ n_notfound++;
continue;
}
+ n_found++;
get_asymm(h, k, l, &ha, &ka, &la, sym);
add_item(obs, ha, ka, la);
@@ -364,6 +368,9 @@ int main(int argc, char *argv[])
}
fclose(fh);
+ STATUS("Found %5.2f%% of the expected peaks (%i %i %i).\n",
+ 100.0 * (double)n_found / n_expected,
+ n_found, n_notfound, n_expected);
cts = new_list_count();