From 8eab85fe4edba01a5354853a75bd983a09fb0eb9 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 27 May 2011 17:29:02 +0200 Subject: Use reference reflections for scaling --- src/partialator.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'src/partialator.c') diff --git a/src/partialator.c b/src/partialator.c index 64546a7b..e3eccafb 100644 --- a/src/partialator.c +++ b/src/partialator.c @@ -171,7 +171,7 @@ int main(int argc, char *argv[]) char *cref; int n_usable_patterns = 0; char *reference_file = NULL; - RefList *reference; + double *reference = NULL; /* Long options */ const struct option longopts[] = { @@ -230,7 +230,7 @@ int main(int argc, char *argv[]) break; case 1 : - reference = strdup(optarg); + reference_file = strdup(optarg); break; case 0 : @@ -278,9 +278,15 @@ int main(int argc, char *argv[]) } if ( reference_file != NULL ) { - reference = read_reflections(reference_file); + RefList *list; + RefList *symmed; + list = read_reflections(reference_file); free(reference_file); - if ( reference == NULL ) return 1; + if ( list == NULL ) return 1; + symmed = asymmetric_indices(list, sym); + reflist_free(list); + reference = intensities_from_list(symmed); + reflist_free(symmed); } n_total_patterns = count_patterns(fh); @@ -360,7 +366,7 @@ int main(int argc, char *argv[]) /* Make initial estimates */ STATUS("Performing initial scaling.\n"); full = scale_intensities(images, n_usable_patterns, sym, - scalable, cref); + scalable, cref, reference); for ( i=0; i