From 1f38369aecb17730b723865ab0cab537ea40d252 Mon Sep 17 00:00:00 2001 From: Takanori Nakane Date: Thu, 3 Jul 2014 14:12:54 +0100 Subject: Read number of peaks from stream --- libcrystfel/src/stream.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index e7062e25..9dd014df 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -11,6 +11,7 @@ * 2010-2014 Thomas White * 2011 Richard Kirian * 2011 Andrew Aquila + * 2014 Takanori Nakane * * This file is part of CrystFEL. * @@ -699,7 +700,7 @@ int read_chunk_2(Stream *st, struct image *image, StreamReadFlags srf) } do { - + long long num_peaks; float div, bw; rval = fgets(line, 1023, st->fh); @@ -735,6 +736,10 @@ int read_chunk_2(Stream *st, struct image *image, StreamReadFlags srf) image->bw = bw/100.0; } + if ( sscanf(line, "num_peaks = %lld %%", &num_peaks) == 1 ) { + image->num_peaks = num_peaks; + } + if ( strncmp(line, "camera_length_", 14) == 0 ) { if ( image->det != NULL ) { -- cgit v1.2.3