aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-06-17 15:22:06 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:29 +0100
commitfcc79c2d02cd918fafaff69f487b8d680a2dbb14 (patch)
tree04e2eacb5834b61d4d34cf9168d11a47a09730d4 /src
parent401c581e1b243919e24cc93543b46529806bca66 (diff)
Scaling with reference now works
It was always working, but I'd set the partialities to 1 in partial_sim but not partialator.
Diffstat (limited to 'src')
-rw-r--r--src/hrs-scaling.c6
-rw-r--r--src/partial_sim.c8
2 files changed, 3 insertions, 11 deletions
diff --git a/src/hrs-scaling.c b/src/hrs-scaling.c
index 8fed4304..ff842697 100644
--- a/src/hrs-scaling.c
+++ b/src/hrs-scaling.c
@@ -32,7 +32,7 @@
/* Maximum number of iterations of NLSq scaling per macrocycle. */
-#define MAX_CYCLES (30)
+#define MAX_CYCLES (10)
char *find_common_reflections(struct image *images, int n)
@@ -91,7 +91,7 @@ static void s_uhavha(signed int hat, signed int kat, signed int lat,
if ( !get_scalable(refl) ) continue;
ic = get_intensity(refl) / get_partiality(refl);
- sigi = 10.0; /* FIXME */
+ sigi = ic / 10.0; /* FIXME */
uha_val += 1.0 / pow(sigi, 2.0);
vha_val += ic / pow(sigi, 2.0);
@@ -119,8 +119,6 @@ static void s_uhvh(struct image *images, int n,
uh += pow(images[a].osf, 2.0) * uha;
vh += images[a].osf * vha;
- STATUS("uha = %e\n", uha);
- STATUS("vha = %e\n", vha);
}
diff --git a/src/partial_sim.c b/src/partial_sim.c
index d089640b..5fc79e6e 100644
--- a/src/partial_sim.c
+++ b/src/partial_sim.c
@@ -61,7 +61,6 @@ static void calculate_partials(RefList *partial, double osf,
{
Reflection *refl;
RefListIterator *iter;
- int first = 1;
for ( refl = first_refl(partial, &iter);
refl != NULL;
@@ -75,7 +74,6 @@ static void calculate_partials(RefList *partial, double osf,
get_indices(refl, &h, &k, &l);
get_asymm(h, k, l, &h, &k, &l, sym);
p = get_partiality(refl);
- p = 1.0; /* FIXME!!! */
rfull = find_refl(full, h, k, l);
if ( rfull == NULL ) {
@@ -84,10 +82,6 @@ static void calculate_partials(RefList *partial, double osf,
Ip = osf * p * get_intensity(rfull);
set_int(refl, Ip);
}
-
- if ( !first ) set_redundancy(refl, 0);
- first = 0;
-
}
}
@@ -292,7 +286,7 @@ int main(int argc, char *argv[])
calculate_partials(image.reflections, osf, full, sym);
/* Give a slightly incorrect cell in the stream */
- mess_up_cell(image.indexed_cell);
+ //mess_up_cell(image.indexed_cell);
write_chunk(ofh, &image, STREAM_INTEGRATED);
reflist_free(image.reflections);