From 6156c2197b004479552c4507e936358b6a4ca6a6 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 26 Feb 2024 14:31:16 +0100 Subject: stream_read_chunk: Set kpred to nominal wavelength This avoids having to awkwardly pass the wavelength separately, e.g. to the polarisation correction. --- libcrystfel/src/stream.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index ffe68162..f1f2173c 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -199,7 +199,7 @@ static int write_peaks(const struct image *image, } -static RefList *read_stream_reflections_2_3(Stream *st) +static RefList *read_stream_reflections_2_3(Stream *st, double kpred) { char *rval = NULL; int first = 1; @@ -267,6 +267,7 @@ static RefList *read_stream_reflections_2_3(Stream *st) set_mean_bg(refl, bg); set_redundancy(refl, 1); set_symmetric_indices(refl, h, k, l); + set_kpred(refl, kpred); } } while ( rval != NULL ); @@ -657,7 +658,7 @@ static void read_crystal(Stream *st, struct image *image, if ( (strcmp(line, STREAM_REFLECTION_START_MARKER) == 0) && (srf & STREAM_REFLECTIONS) ) { - reflist = read_stream_reflections_2_3(st); + reflist = read_stream_reflections_2_3(st, 1.0/image->lambda); if ( reflist == NULL ) { ERROR("Failed while reading reflections\n"); ERROR("Filename = %s\n", image->filename); -- cgit v1.2.3