From 9f9722f2fc2c24fa0d4df4cb9f1f788acb2cd0c8 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 22 Sep 2023 16:51:53 +0200 Subject: Don't complain about missing 'all' group until it's actually needed --- libcrystfel/src/crystfel-mille.c | 7 ++++++- libcrystfel/src/datatemplate.c | 3 --- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'libcrystfel/src') diff --git a/libcrystfel/src/crystfel-mille.c b/libcrystfel/src/crystfel-mille.c index 1f19d3dc..0fca6f30 100644 --- a/libcrystfel/src/crystfel-mille.c +++ b/libcrystfel/src/crystfel-mille.c @@ -152,7 +152,12 @@ void write_mille(Mille *mille, int n, UnitCell *cell, int i; /* No groups -> no refinement */ - if ( image->detgeom->top_group == NULL ) return; + if ( image->detgeom->top_group == NULL ) { + ERROR("Cannot write calibration data (--mille) because " + "geometry does not contain hierarchy information " + "(group 'all' not found)\n"); + return; + } /* Local parameters */ const enum gparam rvl[] = diff --git a/libcrystfel/src/datatemplate.c b/libcrystfel/src/datatemplate.c index 36c0a422..4a6ced88 100644 --- a/libcrystfel/src/datatemplate.c +++ b/libcrystfel/src/datatemplate.c @@ -2031,9 +2031,6 @@ struct detgeom *create_detgeom(struct image *image, detgeom->top_group = walk_group(dtempl, find_group(dtempl, "all"), detgeom, 0, 100); if ( detgeom->top_group != NULL ) { detgeom->top_group->parent = NULL; - } else { - ERROR("Warning: Top-level panel group ('all') not found. " - "Geometry refinement will not be possible.\n"); } return detgeom; -- cgit v1.2.3