aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/detgeom.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-07-15 17:24:04 +0200
committerThomas White <taw@physics.org>2023-07-28 13:22:05 +0200
commit1543612aab75fcc7166736ec193e3888954d9483 (patch)
treea3dcebef957c55a4db8eb106f826d9e220d9371d /libcrystfel/src/detgeom.c
parent2b219d00948846558804e5977cb060f5e49b5f1a (diff)
Fix parameter refinement units
The *parameters* will be in metres, radians, m^-1 for translation, rotation and cell parameters respectively. The *residuals*, however, are in pixels.
Diffstat (limited to 'libcrystfel/src/detgeom.c')
-rw-r--r--libcrystfel/src/detgeom.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libcrystfel/src/detgeom.c b/libcrystfel/src/detgeom.c
index eaf7c898..e59eb4bd 100644
--- a/libcrystfel/src/detgeom.c
+++ b/libcrystfel/src/detgeom.c
@@ -241,15 +241,15 @@ gsl_matrix **make_panel_minvs(struct detgeom *dg)
struct detgeom_panel *p = &dg->panels[i];
gsl_matrix *M = gsl_matrix_calloc(3, 3);
- gsl_matrix_set(M, 0, 0, p->cnx);
- gsl_matrix_set(M, 0, 1, p->fsx);
- gsl_matrix_set(M, 0, 2, p->ssx);
- gsl_matrix_set(M, 1, 0, p->cny);
- gsl_matrix_set(M, 1, 1, p->fsy);
- gsl_matrix_set(M, 1, 2, p->ssy);
- gsl_matrix_set(M, 2, 0, p->cnz);
- gsl_matrix_set(M, 2, 1, p->fsz);
- gsl_matrix_set(M, 2, 2, p->ssz);
+ gsl_matrix_set(M, 0, 0, p->pixel_pitch*p->cnx);
+ gsl_matrix_set(M, 0, 1, p->pixel_pitch*p->fsx);
+ gsl_matrix_set(M, 0, 2, p->pixel_pitch*p->ssx);
+ gsl_matrix_set(M, 1, 0, p->pixel_pitch*p->cny);
+ gsl_matrix_set(M, 1, 1, p->pixel_pitch*p->fsy);
+ gsl_matrix_set(M, 1, 2, p->pixel_pitch*p->ssy);
+ gsl_matrix_set(M, 2, 0, p->pixel_pitch*p->cnz);
+ gsl_matrix_set(M, 2, 1, p->pixel_pitch*p->fsz);
+ gsl_matrix_set(M, 2, 2, p->pixel_pitch*p->ssz);
Minvs[i] = matrix_invert(M);
if ( Minvs[i] == NULL ) {