aboutsummaryrefslogtreecommitdiff
path: root/src/process_hkl.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-08-19 12:27:18 +0200
committerThomas White <taw@physics.org>2020-08-19 12:27:18 +0200
commitd94e9bfa02bc1ee2f0e14132ea9f5f9d2689c757 (patch)
treed85d4eae0e89fd9e8759cc09efc63dbfa4f9f037 /src/process_hkl.c
parentd2015e147044765de4a6ba4ae96c3e2699124a72 (diff)
Make Stream responsible for its own DataTemplate
It makes no sense for a different DataTemplate to be used for every frame in a stream. And this way makes everything much easier for users ot the API.
Diffstat (limited to 'src/process_hkl.c')
-rw-r--r--src/process_hkl.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/src/process_hkl.c b/src/process_hkl.c
index 352bea4a..812903a2 100644
--- a/src/process_hkl.c
+++ b/src/process_hkl.c
@@ -397,7 +397,7 @@ static void display_progress(int n_images, int n_crystals, int n_crystals_used)
}
-static int merge_all(Stream *st, DataTemplate *dtempl,
+static int merge_all(Stream *st,
RefList *model, RefList *reference,
const SymOpList *sym,
double **hist_vals, signed int hist_h,
@@ -431,7 +431,7 @@ static int merge_all(Stream *st, DataTemplate *dtempl,
int i;
/* Get data from next chunk */
- image = stream_read_chunk(st, dtempl,
+ image = stream_read_chunk(st,
STREAM_REFLECTIONS
| STREAM_UNITCELL);
if ( image == NULL ) break;
@@ -517,8 +517,6 @@ int main(int argc, char *argv[])
int hist_i;
int space_for_hist = 0;
char *histo_params = NULL;
- const char *geom_str;
- DataTemplate *dtempl;
struct polarisation polarisation = {.fraction = 1.0,
.angle = 0.0,
.disable = 0};
@@ -730,19 +728,6 @@ int main(int argc, char *argv[])
return 1;
}
- geom_str = stream_geometry_file(st);
- if ( geom_str == NULL ) {
- ERROR("No geometry file found in stream\n");
- stream_close(st);
- return 1;
- }
-
- dtempl = data_template_new_from_string(geom_str);
- if ( dtempl == NULL ) {
- stream_close(st);
- return 1;
- }
-
model = reflist_new();
if ( histo != NULL ) {
@@ -799,7 +784,7 @@ int main(int argc, char *argv[])
if ( config_scale ) twopass = 1;
hist_i = 0;
- r = merge_all(st, dtempl, model, NULL, sym,
+ r = merge_all(st, model, NULL, sym,
&hist_vals, hist_h, hist_k, hist_l,
&hist_i, polarisation, min_measurements, min_snr,
max_adu, start_after, stop_after, min_res, push_res,
@@ -834,7 +819,7 @@ int main(int argc, char *argv[])
hist_i = 0;
}
- r = merge_all(st, dtempl, model, reference, sym, &hist_vals,
+ r = merge_all(st, model, reference, sym, &hist_vals,
hist_h, hist_k, hist_l, &hist_i,
polarisation, min_measurements, min_snr,
max_adu, start_after, stop_after, min_res,