From 687d051ccb2852018db0723ff96a9cd4c7f32fc0 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 4 Feb 2011 11:19:03 +0100 Subject: First round of scaling optimisations --- src/partialator.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/partialator.c') diff --git a/src/partialator.c b/src/partialator.c index 420638bf..d1ad3768 100644 --- a/src/partialator.c +++ b/src/partialator.c @@ -163,7 +163,19 @@ static void refine_all(struct image *images, int n_total_patterns, } -static void integrate_image(struct image *image, ReflItemList *obs) +static void uniquify(struct cpeak *spot, const char *sym) +{ + signed int ha, ka, la; + + get_asymm(spot->h, spot->k, spot->l, &ha, &ka, &la, sym); + spot->h = ha; + spot->k = ka; + spot->l = la; +} + + +static void integrate_image(struct image *image, ReflItemList *obs, + const char *sym) { struct cpeak *spots; int j, n; @@ -196,6 +208,8 @@ static void integrate_image(struct image *image, ReflItemList *obs) float i_partial; float xc, yc; + uniquify(&spots[j], sym); + h = spots[j].h; k = spots[j].k; l = spots[j].l; @@ -449,7 +463,7 @@ int main(int argc, char *argv[]) /* Get reflections from this image. * FIXME: Use the ones from the stream */ - integrate_image(&images[i], obs); + integrate_image(&images[i], obs, sym); progress_bar(i, n_total_patterns-1, "Loading pattern data"); -- cgit v1.2.3