aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-08-29 15:34:37 +0200
committerThomas White <taw@physics.org>2023-08-29 15:34:37 +0200
commit65283ba88efca2a85e96fc1ac2128d3d999f8fa2 (patch)
treeb7a64c9a528da80ffe33922d4d266703f00979a7 /libcrystfel
parent29ea5fd743b0177b0ab7c04976f6565ff536b39f (diff)
Automatically add top-level group for single-panel detectors
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/datatemplate.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcrystfel/src/datatemplate.c b/libcrystfel/src/datatemplate.c
index 26d0bd06..cbec604f 100644
--- a/libcrystfel/src/datatemplate.c
+++ b/libcrystfel/src/datatemplate.c
@@ -1383,6 +1383,12 @@ DataTemplate *data_template_new_from_string(const char *string_in)
free(defaults.masks[i].filename);
}
+ /* If this is a single-panel detector, there should only be one group
+ * called "all" which points to the panel */
+ if ( (dt->n_panels == 1) && (dt->n_groups == 1) ) {
+ parse_group("all", dt, dt->groups[0]->name);
+ }
+
free(string_orig);
if ( reject ) return NULL;