aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-07-07 18:28:08 +0200
committerThomas White <taw@physics.org>2021-07-07 18:28:08 +0200
commit6568b39c309c85237d0268433be621fdf66a6a5e (patch)
tree884131fe1990824dc8a2c30f43b91e3b501b33e7 /libcrystfel
parent4145eb98b622f6dae0c42c4d1510e0c06951b0c9 (diff)
Interpret old-style stream header records as floating point
The old way of recording metadata in the stream unfortunately doesn't include any information about the data type. Most of the time, floating point is what's intended. Older CrystFEL doesn't know about integer headers at all, but there might be string values if --copy-hdf5-field was used. By interpreting "hdf5/something = val" as floating-point, most things will work, e.g. camera length from HDF5 header enabling stream to be loaded without access to the image data. Anything that can't be interpreted as floating-point will be noisily ignored when loading the stream.
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c
index 33f1b4a8..09a505a7 100644
--- a/libcrystfel/src/stream.c
+++ b/libcrystfel/src/stream.c
@@ -1009,7 +1009,7 @@ struct image *stream_read_chunk(Stream *st, StreamFlags srf)
}
if ( strncmp(line, "hdf5/", 5) == 0 ) {
- parse_header(line+5, image, 'f');
+ parse_header(line+4, image, HEADER_FLOAT);
}
if ( strncmp(line, "header/int/", 11) == 0 ) {