diff options
author | Thomas White <taw@physics.org> | 2014-08-04 14:34:43 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-08-04 14:34:43 +0200 |
commit | f0e1d5a93bc7b681e3b6ac5d2694985f8f51d05e (patch) | |
tree | 1905820d1841738b666267be0255f437fa52edb9 /libcrystfel/src | |
parent | 18d00d8f6f82faf17067425b0f6ca6e271f18c7c (diff) |
Fix number of (integrated) reflections in stream
Diffstat (limited to 'libcrystfel/src')
-rw-r--r-- | libcrystfel/src/stream.c | 19 |
1 files changed, 18 insertions, 1 deletions
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)); |