diff options
author | Thomas White <taw@physics.org> | 2015-02-20 14:51:17 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2015-02-20 14:51:17 +0100 |
commit | a388a84d3377812332194c134e404c94d20c7706 (patch) | |
tree | 1c0631ef8ea7e1b704db042c6d826f096fddec4d /libcrystfel/src/detector.c | |
parent | 6ad20e4d35878c7fccc5bf765c2f33f1117e3c4d (diff) |
Rationalise get_value() stuff
Diffstat (limited to 'libcrystfel/src/detector.c')
-rw-r--r-- | libcrystfel/src/detector.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libcrystfel/src/detector.c b/libcrystfel/src/detector.c index 4f58df9c..635aa5e2 100644 --- a/libcrystfel/src/detector.c +++ b/libcrystfel/src/detector.c @@ -565,11 +565,15 @@ void fill_in_values(struct detector *det, struct hdfile *f, struct event* ev) if ( p->clen_from != NULL ) { - if (det->path_dim !=0 || det->dim_dim !=0 ){ - p->clen = get_ev_based_value(f, p->clen_from, - ev) * 1.0e-3; + double val; + int r; + + r = get_value(f, p->clen_from, ev, &val, + H5T_NATIVE_DOUBLE); + if ( r ) { + ERROR("Failed to read '%s'\n", p->clen_from); } else { - p->clen = get_value(f, p->clen_from) * 1.0e-3; + p->clen = val * 1.0e-3; } } |