aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2016-10-18 17:47:28 +0200
committerThomas White <taw@physics.org>2016-10-18 17:49:46 +0200
commite711b80ba12fd1393628cb15a838281566195b2c (patch)
tree0274468d42bc444fed540f031e9036a1bef142ca
parent92aaa33d870c10fc832247e2aa02de535072f992 (diff)
Fix up last commit
-rw-r--r--libcrystfel/src/taketwo.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libcrystfel/src/taketwo.c b/libcrystfel/src/taketwo.c
index 1411b8a7..21686cd1 100644
--- a/libcrystfel/src/taketwo.c
+++ b/libcrystfel/src/taketwo.c
@@ -266,6 +266,16 @@ static gsl_vector *rvec_to_gsl(struct rvec v)
}
+struct rvec gsl_to_rvec(gsl_vector *a)
+{
+ struct rvec v;
+ v.u = gsl_vector_get(a, 0);
+ v.v = gsl_vector_get(a, 1);
+ v.w = gsl_vector_get(a, 2);
+ return v;
+}
+
+
/* Code me in gsl_matrix language to copy the contents of the function
* in cppxfel (IndexingSolution::createSolution). This function is quite
* intensive on the number crunching side so simple angle checks are used
@@ -292,7 +302,7 @@ static int generate_rot_mat(struct rvec obs1, struct rvec obs2,
/* Now we twirl around the firstAxisUnit until the rotated observed
* vector matches the second simulated vector as closely as possible. */
- secondTwizzleMatrix = closest_rotmat(obs2vr, cell2, cell1);
+ secondTwizzleMatrix = closest_rot_mat(gsl_to_rvec(obs2vr), cell2, cell1);
return 1;
}