aboutsummaryrefslogtreecommitdiff
path: root/src/indexamajig.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/indexamajig.c')
-rw-r--r--src/indexamajig.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index e7391bb5..7ce661aa 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -278,6 +278,20 @@ static void process_image(void *pp, int cookie)
}
hdf5_read(hdfile, &image, pargs->static_args.config_satcorr);
+
+ if ( (image.width != image.det->max_fs+1)
+ || (image.height != image.det->max_ss+1) )
+ {
+ ERROR("Image size doesn't match geometry size"
+ " - rejecting image.\n");
+ ERROR("Image size: %i,%i. Geometry size: %i,%i\n",
+ image.width, image.height,
+ image.det->max_fs+1, image.det->max_ss+1);
+ hdfile_close(hdfile);
+ free_detector_geometry(image.det);
+ return;
+ }
+
if ( image.lambda < 0.0 ) {
if ( beam != NULL ) {
ERROR("Using nominal photon enery of %.2f eV\n",