From 5ce139000ebd73bd6897f1a498d5d806af75d51b Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 29 Mar 2015 10:53:19 +0200 Subject: Allow negative literal clen in geometry file --- libcrystfel/src/detector.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/detector.c b/libcrystfel/src/detector.c index 6df88eaa..d1614d6e 100644 --- a/libcrystfel/src/detector.c +++ b/libcrystfel/src/detector.c @@ -1223,7 +1223,7 @@ struct detector *get_detector_geometry(const char *filename, det->defaults.orig_max_ss = -1; det->defaults.cnx = NAN; det->defaults.cny = NAN; - det->defaults.clen = -1.0; + det->defaults.clen = NAN; det->defaults.coffset = 0.0; det->defaults.res = -1.0; det->defaults.badrow = '-'; @@ -1496,7 +1496,7 @@ struct detector *get_detector_geometry(const char *filename, " panel %s\n", det->panels[i].name); reject = 1; } - if ( (det->panels[i].clen < 0.0) + if ( isnan(det->panels[i].clen) && (det->panels[i].clen_from == NULL) ) { ERROR("Please specify the camera length for" " panel %s\n", det->panels[i].name); -- cgit v1.2.3