Commit 4398834a authored by Thomas White's avatar Thomas White
Browse files

Don't try to use unscalable reflections for post refinement

parent acde580b
......@@ -375,29 +375,6 @@ double *scale_intensities(struct image *images, int n, const char *sym,
/* Start with all scale factors equal */
for ( m=0; m<n; m++ ) images[m].osf = 1.0;
/* Decide which reflections can be scaled */
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;
}
}
/* Iterate */
i = 0;
do {
......
......@@ -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);
......
......@@ -237,9 +237,7 @@ double mean_partial_dev(struct image *image, struct cpeak *spots, int n,
kind = spots[h].k;
lind = spots[h].l;
/* Don't attempt to use spots with very small
* partialities, since it won't be accurate. */
if ( spots[h].p < 0.1 ) continue;
if ( !spots[h].scalable ) continue;
/* Actual measurement of this reflection from this
* pattern? */
......@@ -309,9 +307,7 @@ double pr_iterate(struct image *image, double *i_full, const char *sym,
kind = spots[h].k;
lind = spots[h].l;
/* Don't attempt to use spots with very small
* partialities, since it won't be accurate. */
if ( spots[h].p < 0.1 ) continue;
if ( !spots[h].scalable ) continue;
/* Actual measurement of this reflection from this
* pattern? */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment