aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-10-17 17:20:23 +0200
committerThomas White <taw@physics.org>2014-10-23 17:02:32 +0200
commit6295abd6cccf2b12dac2f3af03f55fba6a8700aa (patch)
treeeabc6333f83519e0c8385efaf33fcf282f98aa05 /libcrystfel/src
parente05199f2629f16cb4a1681cbc9f6151a799c6d2f (diff)
Read image serial number back
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/stream.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c
index 8d61ba49..3be9dae5 100644
--- a/libcrystfel/src/stream.c
+++ b/libcrystfel/src/stream.c
@@ -919,6 +919,7 @@ int read_chunk_2(Stream *st, struct image *image, StreamReadFlags srf)
do {
long long num_peaks;
+ int ser;
float div, bw;
rval = fgets(line, 1023, st->fh);
@@ -958,6 +959,10 @@ int read_chunk_2(Stream *st, struct image *image, StreamReadFlags srf)
image->num_peaks = num_peaks;
}
+ if ( sscanf(line, "Image serial number: %i", &ser) == 1 ) {
+ image->serial = ser;
+ }
+
if ( strncmp(line, "camera_length_", 14) == 0 ) {
if ( image->det != NULL ) {