aboutsummaryrefslogtreecommitdiff
path: root/src/templates.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates.c')
-rw-r--r--src/templates.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/templates.c b/src/templates.c
index 37188145..ed557afa 100644
--- a/src/templates.c
+++ b/src/templates.c
@@ -70,9 +70,10 @@ IndexingPrivate *generate_templates(UnitCell *cell, const char *filename,
ERROR("Couldn't select path\n");
return NULL;
}
- hdf5_read(hdfile, &image, 0, nominal_photon_energy);
+ hdf5_read(hdfile, &image, 0);
hdfile_close(hdfile);
image.det = det;
+ if ( image.lambda < 0.0 ) image.lambda = nominal_photon_energy;
priv = calloc(1, sizeof(struct _indexingprivate_template));
priv->base.indm = INDEXING_TEMPLATE;