aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/stream.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2012-10-21 18:11:15 -0700
committerThomas White <taw@physics.org>2012-10-21 21:28:24 -0700
commit6fecf05e83c13901e86fb84456536d9062a0fc4e (patch)
treeb9b1a34f39c030ae6c05230a6d1365194a49d9be /libcrystfel/src/stream.c
parent897f86654afe36f57b7000a25c4489e1e534eede (diff)
indexamajig: Record number of saturated reflections in stream
Diffstat (limited to 'libcrystfel/src/stream.c')
-rw-r--r--libcrystfel/src/stream.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c
index 6627e7ea..b8ff9238 100644
--- a/libcrystfel/src/stream.c
+++ b/libcrystfel/src/stream.c
@@ -261,6 +261,9 @@ void write_chunk(FILE *ofh, struct image *i, struct hdfile *hdfile, int f)
i->diffracting_resolution/1e9,
1e9 / i->diffracting_resolution);
+ fprintf(ofh, "num_saturated_reflections"
+ " = %lli\n", i->n_saturated);
+
}
if ( i->det != NULL ) {
@@ -343,6 +346,7 @@ int read_chunk(FILE *fh, struct image *image)
image->features = NULL;
image->reflections = NULL;
image->indexed_cell = NULL;
+ image->n_saturated = 0;
do {
@@ -417,6 +421,10 @@ int read_chunk(FILE *fh, struct image *image)
have_ev = 1;
}
+ if ( strncmp(line, "num_saturated_reflections = ", 28) == 0 ) {
+ image->n_saturated = atoi(line+28);
+ }
+
if ( strcmp(line, PEAK_LIST_START_MARKER) == 0 ) {
if ( read_peaks(fh, image) ) {
ERROR("Failed while reading peaks\n");