From f0e1d5a93bc7b681e3b6ac5d2694985f8f51d05e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 4 Aug 2014 14:34:43 +0200 Subject: Fix number of (integrated) reflections in stream --- libcrystfel/src/stream.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index fcb3bb21..808be152 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -317,6 +317,23 @@ static void write_stream_reflections_2_1(FILE *fh, RefList *list) } +static int num_integrated_reflections(RefList *list) +{ + Reflection *refl; + RefListIterator *iter; + int n = 0; + + for ( refl = first_refl(list, &iter); + refl != NULL; + refl = next_refl(refl, iter) ) + { + if ( get_redundancy(refl) > 0 ) n++; + } + + return n; +} + + static void write_crystal(Stream *st, Crystal *cr, int include_reflections) { UnitCell *cell; @@ -365,7 +382,7 @@ static void write_crystal(Stream *st, Crystal *cr, int include_reflections) 1e10 / crystal_get_resolution_limit(cr)); fprintf(st->fh, "num_reflections = %i\n", - num_reflections(reflist)); + num_integrated_reflections(reflist)); fprintf(st->fh, "num_saturated_reflections = %lli\n", crystal_get_num_saturated_reflections(cr)); -- cgit v1.2.3