aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-06-17 17:32:35 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:29 +0100
commit92a80a18aef4b1e6c1d2416ae881bb5ede663055 (patch)
tree9573f5359080ce36da1495a5008230142d0eb72b /src
parentbe3838b21cba88589a95ae3bd63c5b643b2e6002 (diff)
Refine against reference reflections as well
Diffstat (limited to 'src')
-rw-r--r--src/partialator.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/partialator.c b/src/partialator.c
index 2fcfbd46..ac505901 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -175,6 +175,7 @@ int main(int argc, char *argv[])
int n_usable_patterns = 0;
char *reference_file = NULL;
double *reference = NULL;
+ RefList *reference_list = NULL;
/* Long options */
const struct option longopts[] = {
@@ -283,14 +284,14 @@ int main(int argc, char *argv[])
if ( reference_file != NULL ) {
RefList *list;
- RefList *symmed;
+
list = read_reflections(reference_file);
free(reference_file);
if ( list == NULL ) return 1;
- symmed = asymmetric_indices(list, sym);
+ reference_list = asymmetric_indices(list, sym);
reflist_free(list);
- reference = intensities_from_list(symmed);
- reflist_free(symmed);
+ reference = intensities_from_list(reference_list);
+
}
n_total_patterns = count_patterns(fh);
@@ -429,11 +430,11 @@ int main(int argc, char *argv[])
/* Nothing will be written later */
}
+ if ( reference == NULL ) reference_list = full;
+
/* Refine the geometry of all patterns to get the best fit */
- /* FIXME: Refine against reference intensity if present */
- /* FIXME: Speedup by using array instead of RefList for 'full'? */
- refine_all(images, n_total_patterns, det, sym, scalable, full,
- nthreads, fhg, fhp);
+ refine_all(images, n_usable_patterns, det, sym, scalable,
+ reference_list, nthreads, fhg, fhp);
/* Re-estimate all the full intensities */
reflist_free(full);
@@ -465,6 +466,7 @@ int main(int argc, char *argv[])
free(beam);
free(cref);
free(reference);
+ reflist_free(reference_list);
for ( i=0; i<n_usable_patterns; i++ ) {
cell_free(images[i].indexed_cell);
free(images[i].filename);