From 6568b39c309c85237d0268433be621fdf66a6a5e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 7 Jul 2021 18:28:08 +0200 Subject: 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. --- libcrystfel/src/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcrystfel/src') 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 ) { -- cgit v1.2.3