aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-08-19 12:30:10 +0200
committerThomas White <taw@physics.org>2020-08-19 12:30:10 +0200
commit1d8f71504ece9da2164d680d52823a865b60faab (patch)
tree80104a634b1be9e087937077521100217d8385a2 /src
parent5f4c120e3c74284e72525d9bb5a9a8da13871968 (diff)
Remove STREAM_UNITCELL and STREAM_CRYSTALS
These flags weren't orthogonal at all, which was turning some routines into spaghetti-code. It's still possible to avoid read/write of peak lists, reflection data or image data. But that's it.
Diffstat (limited to 'src')
-rw-r--r--src/ambigator.c3
-rw-r--r--src/cell_explorer.c2
-rw-r--r--src/crystfel_gui.c4
-rw-r--r--src/indexamajig.c3
-rw-r--r--src/partial_sim.c6
-rw-r--r--src/partialator.c3
-rw-r--r--src/pattern_sim.c3
-rw-r--r--src/process_hkl.c3
-rw-r--r--src/whirligig.c3
9 files changed, 10 insertions, 20 deletions
diff --git a/src/ambigator.c b/src/ambigator.c
index c3afd6c1..c14b1051 100644
--- a/src/ambigator.c
+++ b/src/ambigator.c
@@ -1259,8 +1259,7 @@ int main(int argc, char *argv[])
struct image *image;
int i;
- image = stream_read_chunk(st, STREAM_UNITCELL
- | STREAM_REFLECTIONS);
+ image = stream_read_chunk(st, STREAM_REFLECTIONS);
if ( image == NULL ) break;
image_feature_list_free(image->features);
diff --git a/src/cell_explorer.c b/src/cell_explorer.c
index 84a8aa16..9d4cdeec 100644
--- a/src/cell_explorer.c
+++ b/src/cell_explorer.c
@@ -2002,7 +2002,7 @@ int main(int argc, char *argv[])
struct image *image;
int i;
- image = stream_read_chunk(st, STREAM_UNITCELL);
+ image = stream_read_chunk(st, 0);
if ( image == NULL ) break;
for ( i=0; i<image->n_crystals; i++ ) {
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c
index 7f4f29f0..3d07f35b 100644
--- a/src/crystfel_gui.c
+++ b/src/crystfel_gui.c
@@ -145,10 +145,8 @@ static void update_imageview(struct crystfelproject *proj)
}
image = stream_read_chunk(proj->stream,
- STREAM_UNITCELL
- | STREAM_REFLECTIONS
+ STREAM_REFLECTIONS
| STREAM_PEAKS
- | STREAM_CRYSTALS
| STREAM_IMAGE_DATA);
if ( image == NULL ) {
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 15315952..774a7ffc 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -650,8 +650,7 @@ int main(int argc, char *argv[])
args.iargs.ir_out = -1.0;
args.iargs.use_saturated = 1;
args.iargs.no_revalidate = 0;
- args.iargs.stream_flags = STREAM_PEAKS | STREAM_REFLECTIONS
- | STREAM_CRYSTALS | STREAM_UNITCELL;
+ args.iargs.stream_flags = STREAM_PEAKS | STREAM_REFLECTIONS;
args.iargs.stream_nonhits = 1;
args.iargs.int_diag = INTDIAG_NONE;
args.iargs.min_peaks = 0;
diff --git a/src/partial_sim.c b/src/partial_sim.c
index a0f60e1e..85222dd2 100644
--- a/src/partial_sim.c
+++ b/src/partial_sim.c
@@ -346,7 +346,7 @@ static void *create_job(void *vqargs)
struct image *image;
image = stream_read_chunk(qargs->template_stream,
- STREAM_UNITCELL | STREAM_REFLECTIONS);
+ STREAM_REFLECTIONS);
if ( image == NULL ) {
ERROR("Failed to read template chunk!\n");
return NULL;
@@ -473,9 +473,7 @@ static void finalise_job(void *vqargs, void *vwargs)
int ret;
ret = stream_write_chunk(qargs->stream, wargs->image,
- STREAM_UNITCELL
- | STREAM_REFLECTIONS
- | STREAM_CRYSTALS);
+ STREAM_REFLECTIONS);
if ( ret != 0 ) {
ERROR("WARNING: error writing stream file.\n");
}
diff --git a/src/partialator.c b/src/partialator.c
index 1a28e3f3..40c7c4eb 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -1405,8 +1405,7 @@ int main(int argc, char *argv[])
RefList *as;
int i;
- image = stream_read_chunk(st, STREAM_REFLECTIONS
- | STREAM_UNITCELL);
+ image = stream_read_chunk(st, STREAM_REFLECTIONS);
if ( image == NULL ) break;
if ( isnan(image->div) || isnan(image->bw) ) {
diff --git a/src/pattern_sim.c b/src/pattern_sim.c
index b83677b7..b6988dea 100644
--- a/src/pattern_sim.c
+++ b/src/pattern_sim.c
@@ -1049,8 +1049,7 @@ int main(int argc, char *argv[])
Crystal *cr;
/* Get data from next chunk */
- templ_image = stream_read_chunk(st,
- STREAM_CRYSTALS);
+ templ_image = stream_read_chunk(st, 0);
if ( templ_image == NULL ) break;
if ( templ_image->n_crystals == 0 ) continue;
diff --git a/src/process_hkl.c b/src/process_hkl.c
index 812903a2..440ad3ee 100644
--- a/src/process_hkl.c
+++ b/src/process_hkl.c
@@ -432,8 +432,7 @@ static int merge_all(Stream *st,
/* Get data from next chunk */
image = stream_read_chunk(st,
- STREAM_REFLECTIONS
- | STREAM_UNITCELL);
+ STREAM_REFLECTIONS);
if ( image == NULL ) break;
n_images++;
diff --git a/src/whirligig.c b/src/whirligig.c
index 0d5a2f0d..cac51902 100644
--- a/src/whirligig.c
+++ b/src/whirligig.c
@@ -720,8 +720,7 @@ int main(int argc, char *argv[])
struct image *image;
- image = stream_read_chunk(st, STREAM_REFLECTIONS
- | STREAM_UNITCELL);
+ image = stream_read_chunk(st, STREAM_REFLECTIONS);
if ( image == NULL ) break;