diff options
author | Thomas White <taw@physics.org> | 2016-10-20 11:20:46 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2016-10-20 11:21:35 +0200 |
commit | 758bb13148341bfb288e550f25eac58df6a010e8 (patch) | |
tree | 0c879e381e6ef914a31f86a52e43a10831d708bd /libcrystfel | |
parent | cea1984e5bbf5636ffc78ec1787f0ac5d1054476 (diff) |
Add the central beam
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/taketwo.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libcrystfel/src/taketwo.c b/libcrystfel/src/taketwo.c index bc27faf7..b9ba4ec6 100644 --- a/libcrystfel/src/taketwo.c +++ b/libcrystfel/src/taketwo.c @@ -868,7 +868,7 @@ int taketwo_index(struct image *image, IndexingPrivate *ipriv) int i; struct taketwo_private *tp = (struct taketwo_private *)ipriv; - rlps = malloc(image_feature_count(image->features)*sizeof(struct rvec)); + rlps = malloc((image_feature_count(image->features)+1)*sizeof(struct rvec)); for ( i=0; i<image_feature_count(image->features); i++ ) { struct imagefeature *pk = image_get_feature(image->features, i); if ( pk == NULL ) continue; @@ -877,6 +877,9 @@ int taketwo_index(struct image *image, IndexingPrivate *ipriv) rlps[n_rlps].w = pk->rz; n_rlps++; } + rlps[n_rlps].u = 0.0; + rlps[n_rlps].v = 0.0; + rlps[n_rlps++].w = 0.0; cell = run_taketwo(tp->cell, rlps, n_rlps); if ( cell == NULL ) return 0; |