aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-05-13 17:24:57 +0200
committerThomas White <taw@physics.org>2015-05-19 13:57:51 +0200
commit5f52b9ffdc010e27d5e6b9972e4975dd06a01345 (patch)
tree5d45b52c9c985a5957bbb1dd3011b1d0e98c1478
parent809c5304e4234a24f2dc18105cd10415f6a4af15 (diff)
partialator: Output split merged reflection lists
-rw-r--r--src/partialator.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/partialator.c b/src/partialator.c
index 00d1865b..b1e32c2f 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -689,6 +689,33 @@ int main(int argc, char *argv[])
/* Output results */
write_reflist(outfile, full);
+ /* Output split results */
+ char tmp[1024];
+ RefList *split;
+ Crystal *crystals1[n_crystals];
+ Crystal *crystals2[n_crystals];
+ int n_crystals1 = 0;
+ int n_crystals2 = 0;
+ for ( i=0; i<n_crystals; i++ ) {
+ if ( i % 2 ) {
+ crystals1[n_crystals1] = crystals[i];
+ n_crystals1++;
+ } else {
+ crystals2[n_crystals2] = crystals[i];
+ n_crystals2++;
+ }
+ }
+ snprintf(tmp, 1024, "%s1", outfile);
+ split = lsq_intensities(crystals1, n_crystals1, nthreads,
+ pmodel, min_measurements);
+ write_reflist(tmp, split);
+ reflist_free(split);
+ snprintf(tmp, 1024, "%s2", outfile);
+ split = lsq_intensities(crystals2, n_crystals2, nthreads,
+ pmodel, min_measurements);
+ write_reflist(tmp, split);
+ reflist_free(split);
+
/* Dump parameters */
FILE *fh;
fh = fopen("partialator.params", "w");