aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcrystfel/src/stream.c8
-rw-r--r--libcrystfel/src/stream.h5
-rw-r--r--src/gui_project.c3
3 files changed, 12 insertions, 4 deletions
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c
index 25066314..08f0e332 100644
--- a/libcrystfel/src/stream.c
+++ b/libcrystfel/src/stream.c
@@ -990,9 +990,11 @@ struct image *stream_read_chunk(Stream *st, StreamFlags srf)
if ( strcmp(line, STREAM_CHUNK_END_MARKER) == 0 ) {
if ( have_filename && have_ev ) {
/* Success */
- create_detgeom(image, st->dtempl);
- image_set_zero_data(image, st->dtempl);
- image_set_zero_mask(image, st->dtempl);
+ if ( srf & STREAM_DATA_DETGEOM ) {
+ create_detgeom(image, st->dtempl);
+ image_set_zero_data(image, st->dtempl);
+ image_set_zero_mask(image, st->dtempl);
+ }
/* FIXME: Maybe arbitrary spectrum from file (?) */
image->spectrum = spectrum_generate_gaussian(image->lambda,
image->bw);
diff --git a/libcrystfel/src/stream.h b/libcrystfel/src/stream.h
index 5eadf69b..3d57c7b6 100644
--- a/libcrystfel/src/stream.h
+++ b/libcrystfel/src/stream.h
@@ -75,6 +75,11 @@ typedef enum {
/** Read the peak search results */
STREAM_PEAKS = 4,
+ /** Reconstruct the detgeom structure,
+ * and create (blank) data/mask arrays.
+ * (NB this is (currently) a slow operation) */
+ STREAM_DATA_DETGEOM = 8,
+
} StreamFlags;
#ifdef __cplusplus
diff --git a/src/gui_project.c b/src/gui_project.c
index 38e800ba..0c7d5502 100644
--- a/src/gui_project.c
+++ b/src/gui_project.c
@@ -865,7 +865,8 @@ struct image *find_result(struct crystfelproject *proj,
}
image = stream_read_chunk(st, STREAM_REFLECTIONS
- | STREAM_PEAKS);
+ | STREAM_PEAKS
+ | STREAM_DATA_DETGEOM);
stream_close(st);
return image;