aboutsummaryrefslogtreecommitdiff
path: root/src/partialator.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-07-10 15:12:23 +0200
committerThomas White <taw@physics.org>2020-07-29 18:53:45 +0200
commit6c3b71214cbce3de1d12c4cd2f12d68a96bccfab (patch)
tree83ec9880718d389f534d3a5a3f6bf7c39ae4b050 /src/partialator.c
parent465f36e8fa43e371142ee6861c56403f13e7d12d (diff)
partialator/process_hkl: Use geometry
Diffstat (limited to 'src/partialator.c')
-rw-r--r--src/partialator.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/partialator.c b/src/partialator.c
index a9930d9e..1f87e6b8 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -945,6 +945,8 @@ int main(int argc, char *argv[])
PartialityModel pmodel = PMODEL_XSPHERE;
int min_measurements = 2;
char *rval;
+ const char *geom_str;
+ DataTemplate *dtempl;
struct polarisation polarisation = {.fraction = 1.0,
.angle = 0.0,
.disable = 0};
@@ -1217,6 +1219,19 @@ int main(int argc, char *argv[])
return 1;
}
+ geom_str = stream_geometry_file(st);
+ if ( geom_str == NULL ) {
+ ERROR("No geometry file\n");
+ stream_close(st);
+ return 1;
+ }
+
+ dtempl = data_template_new_from_string(geom_str);
+ if ( dtempl == NULL ) {
+ stream_close(st);
+ return 1;
+ }
+
if ( outfile == NULL ) {
outfile = strdup("partialator.hkl");
}
@@ -1375,8 +1390,8 @@ int main(int argc, char *argv[])
RefList *as;
int i;
- image = stream_read_chunk(st, NULL, STREAM_REFLECTIONS
- | STREAM_UNITCELL);
+ image = stream_read_chunk(st, dtempl, STREAM_REFLECTIONS
+ | STREAM_UNITCELL);
if ( image == NULL ) break;
if ( isnan(image->div) || isnan(image->bw) ) {