aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2024-04-26 14:08:26 +0200
committerThomas White <taw@physics.org>2024-04-26 14:27:46 +0200
commit79bda19687e425818888ce17cc6e2239744ee640 (patch)
treefe30a9cd77690661b0324f32cb836bc8b3b2195c
parent2325b391a2193d7729a9cb188b66e08588484cce (diff)
crystfel_geometry(5): Mention that group definitions must come after panels
Also mention this when complaining about the geometry file. Fixes: https://github.com/taw10/crystfel/issues/10
-rw-r--r--doc/man/crystfel_geometry.5.md3
-rw-r--r--libcrystfel/src/datatemplate.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/doc/man/crystfel_geometry.5.md b/doc/man/crystfel_geometry.5.md
index ecaf60bf..affe7ba8 100644
--- a/doc/man/crystfel_geometry.5.md
+++ b/doc/man/crystfel_geometry.5.md
@@ -534,6 +534,9 @@ above.
The highest-level group should always be called **all**.
+The group definitions must come **after** the panel definitions. A good way
+to go is to put all the group definitions at the very end of the geometry file.
+
If the detector consists of only one panel, CrystFEL will automatically create
the **all** group containing it.
diff --git a/libcrystfel/src/datatemplate.c b/libcrystfel/src/datatemplate.c
index df0ad343..643da2ea 100644
--- a/libcrystfel/src/datatemplate.c
+++ b/libcrystfel/src/datatemplate.c
@@ -132,6 +132,8 @@ static int parse_group(const char *name, DataTemplate *dt, const char *val)
gt->children[i] = find_group(dt, members[i]);
if ( gt->children[i] == NULL ) {
ERROR("Unknown panel group '%s'\n", members[i]);
+ ERROR("Make sure the hierarchy groups definitions are AFTER the "
+ "panel definitions in the geometry file.\n");
fail = 1;
}
}