aboutsummaryrefslogtreecommitdiff
path: root/src/indexamajig.c
diff options
context:
space:
mode:
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 ) {