diff options
author | Thomas White <taw@physics.org> | 2019-03-20 15:50:48 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-03-20 15:50:48 +0100 |
commit | b42cd63e27a222ca91a549f5bec30d1e03866de2 (patch) | |
tree | eaec886e085673f73ce83ea5efb0afd0c9b56192 | |
parent | 26524f58f747ba04e91cf12ac390bd737652489a (diff) |
Fix matrix conventions for symmetry operations
-rw-r--r-- | libcrystfel/src/integer_matrix.c | 2 | ||||
-rw-r--r-- | libcrystfel/src/symmetry.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libcrystfel/src/integer_matrix.c b/libcrystfel/src/integer_matrix.c index 90d58b35..7a373cbe 100644 --- a/libcrystfel/src/integer_matrix.c +++ b/libcrystfel/src/integer_matrix.c @@ -209,7 +209,7 @@ signed int *transform_indices(const IntegerMatrix *P, const signed int *hkl) unsigned int i; ans[j] = 0; for ( i=0; i<P->rows; i++ ) { - ans[i] += intmat_get(P, i, j) * hkl[j]; + ans[j] += intmat_get(P, i, j) * hkl[i]; } } diff --git a/libcrystfel/src/symmetry.c b/libcrystfel/src/symmetry.c index 69dada16..cee29d5a 100644 --- a/libcrystfel/src/symmetry.c +++ b/libcrystfel/src/symmetry.c @@ -1722,7 +1722,7 @@ static void add_chars(char *t, const char *s, int max_len) } -char *get_matrix_name(const IntegerMatrix *m, int row) +char *get_matrix_name(const IntegerMatrix *m, int col) { char *text; const int max_len = 9; @@ -1736,7 +1736,7 @@ char *get_matrix_name(const IntegerMatrix *m, int row) signed int v; - v = intmat_get(m, row, i); + v = intmat_get(m, i, col); if ( v == 0 ) continue; |