Commit 92c8e54d authored by Thomas White's avatar Thomas White
Browse files

Check that geometry size matches image size

parent 1bad219c
......@@ -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",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment