aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/detector.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-06-02 13:53:28 -0700
committerThomas White <taw@physics.org>2013-06-02 13:53:28 -0700
commit8a44164cfd5013687a0eb5cb10dc39c44db399c0 (patch)
tree5a6c35a3d3e93d5d7d19c83e29e34ff61c31c95f /libcrystfel/src/detector.c
parentbf06abfb01d009d604c9f734e4d77ad0bf9b2eba (diff)
Refine rigid group positions and orientations
Diffstat (limited to 'libcrystfel/src/detector.c')
-rw-r--r--libcrystfel/src/detector.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libcrystfel/src/detector.c b/libcrystfel/src/detector.c
index a30d3ccf..2fdd63f1 100644
--- a/libcrystfel/src/detector.c
+++ b/libcrystfel/src/detector.c
@@ -1168,6 +1168,19 @@ struct detector *simple_geometry(const struct image *image)
}
+void twod_mapping(double fs, double ss, double *px, double *py,
+ struct panel *p)
+{
+ double xs, ys;
+
+ xs = fs*p->fsx + ss*p->ssx;
+ ys = fs*p->fsy + ss*p->ssy;
+
+ *px = xs + p->cnx;
+ *py = ys + p->cny;
+}
+
+
int reverse_2d_mapping(double x, double y, double *pfs, double *pss,
struct detector *det)
{