diff options
author | Thomas White <taw@physics.org> | 2020-06-17 17:16:22 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-29 18:53:44 +0200 |
commit | 83f4aece3488f72496aad2ed2d9d559a06271557 (patch) | |
tree | 5c88d58913b5eb4f1779f800daf90b697def87bd /libcrystfel/src/datatemplate.c | |
parent | 66dcb61b36bfc1cd6694b4d282034d14c9b830a1 (diff) |
Require mask/satmap paths to have fewer placeholders than data
Diffstat (limited to 'libcrystfel/src/datatemplate.c')
-rw-r--r-- | libcrystfel/src/datatemplate.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libcrystfel/src/datatemplate.c b/libcrystfel/src/datatemplate.c index b48fd7ab..7d9e2030 100644 --- a/libcrystfel/src/datatemplate.c +++ b/libcrystfel/src/datatemplate.c @@ -915,6 +915,16 @@ DataTemplate *data_template_new_from_string(const char *string_in) num_mask_pl = num_path_placeholders(dt->panels[i].mask); num_satmap_pl = num_path_placeholders(dt->panels[i].satmap); + /* This is because the "data" path will be used to expand + * the path to generate the event list */ + if ( (num_mask_pl > num_data_pl) + || (num_satmap_pl > num_data_pl) ) + { + ERROR("Mask and saturation map paths must have fewer " + "placeholders than image data path.\n"); + reject = 1; + } + for ( i=0; i<dt->n_panels; i++ ) { struct panel_template *p = &dt->panels[i]; |