aboutsummaryrefslogtreecommitdiff
path: root/src/partialator.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-02-03 11:56:11 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:13 +0100
commit4398834ad2897c83987d8537ea305d84f6d7b64c (patch)
treea4bcef2eb052a15b8ea8beffa35599eff3040446 /src/partialator.c
parentacde580b102dcfd09ad65bc1ca6078413707d19a (diff)
Don't try to use unscalable reflections for post refinement
Diffstat (limited to 'src/partialator.c')
-rw-r--r--src/partialator.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/partialator.c b/src/partialator.c
index 0e727ead..420638bf 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -232,6 +232,35 @@ static void integrate_image(struct image *image, ReflItemList *obs)
}
+/* Decide which reflections can be scaled */
+static void select_scalable_reflections(struct image *images, int n)
+{
+ int m;
+
+ for ( m=0; m<n; m++ ) {
+
+ int j;
+
+ for ( j=0; j<images[m].n_cpeaks; j++ ) {
+
+ int scalable = 1;
+
+ if ( images[m].cpeaks[j].p < 0.1 ) scalable = 0;
+ if ( !images[m].cpeaks[j].valid ) {
+ scalable = 0;
+ } else {
+ double v = fabs(images[m].cpeaks[j].intensity);
+ if ( v < 0.1 ) scalable = 0;
+ }
+
+ images[m].cpeaks[j].scalable = scalable;
+
+ }
+
+ }
+}
+
+
int main(int argc, char *argv[])
{
int c;
@@ -432,6 +461,7 @@ int main(int argc, char *argv[])
/* Make initial estimates */
STATUS("Performing initial scaling.\n");
+ select_scalable_reflections(images, n_total_patterns);
I_full = scale_intensities(images, n_total_patterns, sym, obs);
/* Iterate */
@@ -463,6 +493,7 @@ int main(int argc, char *argv[])
/* Re-estimate all the full intensities */
free(I_full);
+ select_scalable_reflections(images, n_total_patterns);
I_full = scale_intensities(images, n_total_patterns, sym, obs);
fclose(fhg);