diff options
author | Thomas White <taw@physics.org> | 2023-03-31 15:36:27 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2023-03-31 15:37:36 +0200 |
commit | fcffbf23484f1227b3732d9e5b587d431a91e4d3 (patch) | |
tree | e1022459338df6fb0032871d43ea9fc126cc4b19 | |
parent | c89fa1b2211beff38c6e8ad18fe2b3b7e67a95e8 (diff) |
Reject mask if good/bad bits are specified without location
This should avoid surprises if the location is accidentally missed out.
-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 0ddbe107..504f0514 100644 --- a/libcrystfel/src/datatemplate.c +++ b/libcrystfel/src/datatemplate.c @@ -1351,6 +1351,16 @@ DataTemplate *data_template_new_from_string(const char *string_in) j, p->name); reject = 1; } + + if ( (mt->good_bits || mt->bad_bits) + && (mt->filename == NULL) + && (mt->data_location == NULL) ) + { + ERROR("You have specified good/bad bits for " + "mask %i of panel %s, but not the mask " + "location.\n", j, p->name); + reject = 1; + } } } |