diff options
author | Thomas White <taw@physics.org> | 2021-09-03 12:48:30 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-09-03 12:48:30 +0200 |
commit | 7fea4dc8222825b0dde4bb059924d5a3eba20819 (patch) | |
tree | 706c6b05938dfd575447ae9aa1cdbb8e18a72907 /libcrystfel/src | |
parent | b9c138ebc1dc22c6142598baa0c6029467e08f0f (diff) |
Reject geometry file if fs and ss directions are not specified
Diffstat (limited to 'libcrystfel/src')
-rw-r--r-- | libcrystfel/src/datatemplate.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/libcrystfel/src/datatemplate.c b/libcrystfel/src/datatemplate.c index 48fe4cfa..9f14732b 100644 --- a/libcrystfel/src/datatemplate.c +++ b/libcrystfel/src/datatemplate.c @@ -1074,12 +1074,12 @@ DataTemplate *data_template_new_from_string(const char *string_in) defaults.cnz_offset = 0.0; defaults.pixel_pitch = -1.0; defaults.bad = 0; - defaults.fsx = 1.0; - defaults.fsy = 0.0; - defaults.fsz = 0.0; - defaults.ssx = 0.0; - defaults.ssy = 1.0; - defaults.ssz = 0.0; + defaults.fsx = NAN; + defaults.fsy = NAN; + defaults.fsz = NAN; + defaults.ssx = NAN; + defaults.ssy = NAN; + defaults.ssz = NAN; defaults.rail_x = NAN; /* The actual default rail direction */ defaults.rail_y = NAN; /* is below */ defaults.rail_z = NAN; @@ -1261,6 +1261,18 @@ DataTemplate *data_template_new_from_string(const char *string_in) reject = 1; } + if ( isnan(p->fsx) ) { + ERROR("Please specify the FS direction for panel %s\n", + dt->panels[i].name); + reject = 1; + } + + if ( isnan(p->ssx) ) { + ERROR("Please specify the FS direction for panel %s\n", + dt->panels[i].name); + reject = 1; + } + if ( p->orig_min_fs < 0 ) { ERROR("Please specify the minimum FS coordinate for" " panel %s\n", dt->panels[i].name); |