aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakanori Nakane <nakane.t@gmail.com>2014-07-03 14:12:54 +0100
committerThomas White <taw@physics.org>2014-08-12 17:36:35 +0200
commit1f38369aecb17730b723865ab0cab537ea40d252 (patch)
tree677d2301bb3d041768b920385f1954e1f335f2bc
parent5b6749b20e1fe14f994df0eb3a8096d69a72326a (diff)
Read number of peaks from stream
-rw-r--r--libcrystfel/src/stream.c7
1 files changed, 6 insertions, 1 deletions
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 <taw@physics.org>
* 2011 Richard Kirian
* 2011 Andrew Aquila
+ * 2014 Takanori Nakane <nakane.t@gmail.com>
*
* 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 ) {