aboutsummaryrefslogtreecommitdiff
path: root/src/indexamajig.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-04-01 14:36:17 +0200
committerThomas White <taw@physics.org>2020-07-29 18:42:57 +0200
commit6f9306896ab99acfbd2fb111449a98bea6dce5e5 (patch)
treefe14bd37c0d45fdf6bac1ee02bcdbd77c4015b5c /src/indexamajig.c
parent84cf3017548386058c2a788a065c7ddbad6f117e (diff)
Add DataTemplate to iargs
Diffstat (limited to 'src/indexamajig.c')
-rw-r--r--src/indexamajig.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index a03955ba..620026ad 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -65,6 +65,7 @@
#include "taketwo.h"
#include "im-sandbox.h"
#include "image.h"
+#include "datatemplate.h"
static void add_geom_beam_stuff_to_field_list(struct imagefile_field_list *copyme,
@@ -861,7 +862,7 @@ int main(int argc, char *argv[])
return 1;
}
- /* Load detector geometry */
+ /* Load detector geometry (old API) */
args.iargs.det = get_detector_geometry_2(args.geom_filename,
args.iargs.beam,
&args.iargs.hdf5_peak_path);
@@ -873,6 +874,14 @@ int main(int argc, char *argv[])
add_geom_beam_stuff_to_field_list(args.iargs.copyme, args.iargs.det,
args.iargs.beam);
+ /* Load data template (new API) */
+ args.iargs.dtempl = data_template_new_from_file(args.geom_filename);
+ if ( args.iargs.dtempl == NULL ) {
+ ERROR("Failed to read detector geometry from '%s'"
+ " (for new API)\n", args.geom_filename);
+ return 1;
+ }
+
/* If no peak path from geometry file, use these (but see later) */
if ( args.iargs.hdf5_peak_path == NULL ) {
if ( args.iargs.peaks == PEAK_HDF5 ) {