aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2012-09-06 10:38:12 +0200
committerThomas White <taw@physics.org>2012-10-02 15:02:12 +0200
commit42e1753bcfd692d5aaf6d7551c6e4635f65c683f (patch)
treed6a903de10b93f8e9a1ae482f5b92fc3264311c3 /libcrystfel/src
parentefd2a45e256d3d16d2f93ed24dedb8ecb9ca53ef (diff)
WIP
Diffstat (limited to 'libcrystfel/src')
-rw-r--r--libcrystfel/src/cell-utils.c20
-rw-r--r--libcrystfel/src/cell.c40
2 files changed, 39 insertions, 21 deletions
diff --git a/libcrystfel/src/cell-utils.c b/libcrystfel/src/cell-utils.c
index b5d8f017..f0c6328f 100644
--- a/libcrystfel/src/cell-utils.c
+++ b/libcrystfel/src/cell-utils.c
@@ -263,26 +263,6 @@ int bravais_lattice(UnitCell *cell)
}
-static UnitCellTransformation *tfn_identity()
-{
-}
-
-
-static void *tfn_combine(UnitCellTransformation *t,
- double *na, double *nb, double *nc)
-{
-}
-
-
-static double *v(double a, double b, double c)
-{
- double *vec = malloc(3*sizeof(double));
- if ( vec == NULL ) return NULL;
- vec[0] = a; vec[1] = b; vec[2] = c;
- return vec;
-}
-
-
static UnitCellTransformation *uncentering_transformation(UnitCell *in)
{
UnitCellTransformation *t;
diff --git a/libcrystfel/src/cell.c b/libcrystfel/src/cell.c
index e2617dfc..53b0436d 100644
--- a/libcrystfel/src/cell.c
+++ b/libcrystfel/src/cell.c
@@ -634,7 +634,7 @@ UnitCell *cell_transform(UnitCell *cell, UnitCellTransformation *t)
/**
- * cell_transform:
+ * cell_transform_inverse:
* @cell: A %UnitCell.
* @t: A %UnitCellTransformation.
*
@@ -649,6 +649,44 @@ UnitCell *cell_transform_inverse(UnitCell *cell, UnitCellTransformation *t)
}
+/**
+ * tfn_identity:
+ *
+ * Returns: A %UnitCellTransformation corresponding to an identity operation.
+ *
+ */
+static UnitCellTransformation *tfn_identity()
+{
+}
+
+
+/**
+ * tfn_combine:
+ * @t: A %UnitCellTransformation
+ * @na: Pointer to three doubles representing naa, nab, nac
+ * @nb: Pointer to three doubles representing nba, nbb, nbc
+ * @nc: Pointer to three doubles representing nca, ncb, ncc
+ *
+ * Updates @t such that it represents its previous transformation followed by
+ * a new transformation, corresponding to letting a = naa*a + nab*b + nac*c.
+ * Likewise, a = nba*a + nbb*b + nbc*c and c = nca*a + ncb*b + ncc*c.
+ *
+ */
+static void tfn_combine(UnitCellTransformation *t,
+ double *na, double *nb, double *nc)
+{
+}
+
+
+static double *v(double a, double b, double c)
+{
+ double *vec = malloc(3*sizeof(double));
+ if ( vec == NULL ) return NULL;
+ vec[0] = a; vec[1] = b; vec[2] = c;
+ return vec;
+}
+
+
void cell_transformation_print(UnitCellTransformation *t)
{