aboutsummaryrefslogtreecommitdiff
path: root/src/partialator.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-02-04 11:19:03 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:13 +0100
commit687d051ccb2852018db0723ff96a9cd4c7f32fc0 (patch)
tree474cafe0e2742c2b7ce1242a606789f137312b62 /src/partialator.c
parent7198ffd1070a0bd9bca88ae1384aef0e562482a4 (diff)
First round of scaling optimisations
Diffstat (limited to 'src/partialator.c')
-rw-r--r--src/partialator.c18
1 files changed, 16 insertions, 2 deletions
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");