aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2016-10-28 17:06:07 +0200
committerThomas White <taw@physics.org>2016-10-28 17:06:07 +0200
commitcccd318f5c1e1d18c42456d2ffa662e07d38f434 (patch)
tree50ffdc39356f24ded281c52edcc65b2559c2875e /src
parentcc55abcff6e91d57e8226fa8a4265b667c20ceb0 (diff)
partialator: Don't write a dataset if it contains no crystals
Diffstat (limited to 'src')
-rw-r--r--src/partialator.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/partialator.c b/src/partialator.c
index b246571d..3f9f91f6 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -274,6 +274,12 @@ static void write_custom_split(struct custom_split *csplit, int dsn,
tmp = insert_into_filename(outfile, csplit->dataset_names[dsn]);
+ if ( n_crystalsn == 0 ) {
+ ERROR("Not writing dataset '%s' because it contains no "
+ "crystals\n", csplit->dataset_names[dsn]);
+ return;
+ }
+
STATUS("Writing dataset '%s' to %s (%i crystals)\n",
csplit->dataset_names[dsn], tmp, n_crystalsn);
split = merge_intensities(crystalsn, n_crystalsn, nthreads,