diff options
author | Thomas White <taw@physics.org> | 2015-03-29 10:53:19 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2015-04-01 09:29:46 +0200 |
commit | 5ce139000ebd73bd6897f1a498d5d806af75d51b (patch) | |
tree | 8a6ca1cbeac71b3aa96d3f9a90afc3a086c143d5 /libcrystfel | |
parent | b3936c6862df85d0e3a7909d9370c5c9f7b81701 (diff) |
Allow negative literal clen in geometry file
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/detector.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |