aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-05-24 12:07:09 +0200
committerThomas White <taw@physics.org>2013-05-27 17:33:15 +0200
commit6910e4ef415ea627d95e99ded041725d16874eb7 (patch)
tree8ffda58413a3071c55e16e95294a21cf8d7f9c8f
parentb990cd2c63a68433ed780f1f3400601bec759c5b (diff)
Assign rigid group for panels which don't have one
-rw-r--r--libcrystfel/src/detector.c7
-rw-r--r--libcrystfel/src/detector.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/libcrystfel/src/detector.c b/libcrystfel/src/detector.c
index 09f33d5d..f7ff135e 100644
--- a/libcrystfel/src/detector.c
+++ b/libcrystfel/src/detector.c
@@ -984,7 +984,7 @@ out:
det->max_fs = max_fs;
det->max_ss = max_ss;
- /* Calculate matrix inverse */
+ /* Calculate matrix inverses and other stuff */
for ( i=0; i<det->n_panels; i++ ) {
struct panel *p;
@@ -1006,8 +1006,11 @@ out:
p->w = p->max_fs - p->min_fs + 1;
p->h = p->max_ss - p->min_ss + 1;
- }
+ if ( p->rigid_group == NULL ) {
+ p->rigid_group = find_or_add_rg(det, p->name);
+ }
+ }
find_min_max_d(det);
diff --git a/libcrystfel/src/detector.h b/libcrystfel/src/detector.h
index c8d36396..0f9be817 100644
--- a/libcrystfel/src/detector.h
+++ b/libcrystfel/src/detector.h
@@ -62,7 +62,7 @@ struct panel
double res; /* Resolution in pixels per metre */
char badrow; /* 'x' or 'y' */
int no_index; /* Don't index peaks in this panel if non-zero */
- char *rigid_group; /* Rigid group, or -1 for none */
+ char *rigid_group; /* Rigid group name */
double adu_per_eV; /* Number of ADU per eV */
double max_adu; /* Treat pixel as unreliable if higher than this */