diff options
author | Thomas White <taw@physics.org> | 2011-04-26 15:13:42 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:24 +0100 |
commit | 6815bab588d3e995bd1319e23614372aa1a07f0c (patch) | |
tree | 14b2e12ff2cda12f6ed4baed992cdee6448a44ea /src/geometry.c | |
parent | 074034e2dcc34a9a0bab7c979f0deea060a3be21 (diff) |
Progress with post refinement...
Diffstat (limited to 'src/geometry.c')
-rw-r--r-- | src/geometry.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/geometry.c b/src/geometry.c index b3d4c8ee..db261e6b 100644 --- a/src/geometry.c +++ b/src/geometry.c @@ -292,6 +292,34 @@ double integrate_all(struct image *image, RefList *reflections) } +/* Decide which reflections can be scaled */ +static int select_scalable_reflections(RefList *list) +{ + int n_scalable = 0; + + Reflection *refl; + RefListIterator *iter; + + for ( refl = first_refl(list, &iter); + refl != NULL; + refl = next_refl(refl, iter) ) { + + int scalable = 1; + double v; + + if ( get_partiality(refl) < 0.1 ) scalable = 0; + v = fabs(get_intensity(refl)); + if ( v < 0.1 ) scalable = 0; + + set_scalable(refl, scalable); + if ( scalable ) n_scalable++; + + } + + return n_scalable; +} + + /* Calculate partialities and apply them to the image's raw_reflections */ void update_partialities(struct image *image, const char *sym, int *n_expected, int *n_found, int *n_notfound) @@ -355,6 +383,7 @@ void update_partialities_and_asymm(struct image *image, const char *sym, * to get the list used for scaling and post refinement */ image->reflections = asymmetric_indices(image->raw_reflections, sym, obs); + select_scalable_reflections(image->reflections); /* Need these lists to work fast */ optimise_reflist(image->reflections); |