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/hrs-scaling.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'src/hrs-scaling.c') diff --git a/src/hrs-scaling.c b/src/hrs-scaling.c index 0b0b700a..46cb9cc6 100644 --- a/src/hrs-scaling.c +++ b/src/hrs-scaling.c @@ -91,15 +91,12 @@ static double s_vha(signed int hat, signed int kat, signed int lat, for ( hi=0; hin_cpeaks; hi++ ) { double ic, sigi; - signed int ha, ka, la; if ( !spots[hi].scalable ) continue; - get_asymm(spots[hi].h, spots[hi].k, spots[hi].l, - &ha, &ka, &la, sym); - if ( ha != hat ) continue; - if ( ka != kat ) continue; - if ( la != lat ) continue; + if ( spots[hi].h != hat ) continue; + if ( spots[hi].k != kat ) continue; + if ( spots[hi].l != lat ) continue; ic = spots[hi].intensity / spots[hi].p; sigi = sqrt(fabs(ic)); @@ -153,15 +150,32 @@ static double iterate_scale(struct image *images, int n, int a; double max_shift; int n_ref; + double *uh_arr; + double *vh_arr; + int h; /* Reflection index */ M = gsl_matrix_calloc(n, n); v = gsl_vector_calloc(n); n_ref = num_items(obs); + uh_arr = new_list_intensity(); + vh_arr = new_list_intensity(); + for ( h=0; hh, it->k, it->l, sym); + vh = s_vh(images, n, it->h, it->k, it->l, sym); + + set_intensity(uh_arr, it->h, it->k, it->l, uh); + set_intensity(vh_arr, it->h, it->k, it->l, vh); + + } + for ( a=0; aosf * uha * Ih; -- cgit v1.2.3