aboutsummaryrefslogtreecommitdiff
path: root/src/partialator.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-07-13 16:51:56 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:33 +0100
commitd7f432c33754443d9552c5715f906bbf8b4765ca (patch)
treee36c89d28fd54eb4e9e309d1bdcbea2e06e1eaec /src/partialator.c
parent0787f3a99627f7a29a81690b7c19b926e2395259 (diff)
Loads of scaling report stuff
Diffstat (limited to 'src/partialator.c')
-rw-r--r--src/partialator.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/partialator.c b/src/partialator.c
index 7b8eefa1..19c1b058 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -282,6 +282,8 @@ int main(int argc, char *argv[])
RefList *reference = NULL;
int n_dud;
int have_reference = 0;
+ char cmdline[1024];
+ SRContext *sr;
/* Long options */
const struct option longopts[] = {
@@ -296,6 +298,12 @@ int main(int argc, char *argv[])
{0, 0, NULL, 0}
};
+ cmdline[0] = '\0';
+ for ( i=1; i<argc; i++ ) {
+ strncat(cmdline, argv[i], 1023-strlen(cmdline));
+ strncat(cmdline, " ", 1023-strlen(cmdline));
+ }
+
/* Short options */
while ((c = getopt_long(argc, argv, "hi:g:x:j:y:o:b:",
longopts, NULL)) != -1)
@@ -414,6 +422,8 @@ int main(int argc, char *argv[])
return 1;
}
+ sr = sr_header("scaling-report.pdf", infile, cmdline);
+
/* Fill in what we know about the images so far */
rewind(fh);
nobs = 0;
@@ -480,6 +490,8 @@ int main(int argc, char *argv[])
STATUS("Performing initial scaling.\n");
full = scale_intensities(images, n_usable_patterns, reference);
+ sr_before(sr, images, n_usable_patterns, full);
+
/* Iterate */
for ( i=0; i<n_iter; i++ ) {
@@ -537,18 +549,16 @@ int main(int argc, char *argv[])
}
- STATUS("Final scale factors:\n");
n_dud = 0;
for ( i=0; i<n_usable_patterns; i++ ) {
if ( images[i].pr_dud ) n_dud++;
- STATUS("%4i : %5.2f\n", i, images[i].osf);
}
STATUS("%i images could not be refined on the last cycle.\n", n_dud);
/* Output results */
write_reflist(outfile, full, images[0].indexed_cell);
- scaling_report("scaling-report.pdf", images, n_usable_patterns, infile);
+ sr_after(sr, images, n_usable_patterns, full);
/* Clean up */
for ( i=0; i<n_usable_patterns; i++ ) {