diff options
author | Thomas White <taw@physics.org> | 2020-12-07 16:11:45 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-12-07 16:11:45 +0100 |
commit | e7cf3911104fb525159b937660a3c3b9f6d31ba7 (patch) | |
tree | 95a7c1387d4f62750c54f98765169e73bbc788c8 /libcrystfel/src/indexers/taketwo.c | |
parent | 72f857fbd0c29ba4954f5602ecc43574e581776a (diff) |
Get rid of ImageFeature->rx,ry,rz
These needed to be kept up to date with a call to map_all_peaks every
time anything changed - wavelength, detector position etc. Not doing so
has already led to bugs in another branch, and probably already causes
problems on this branch.
This patch eliminates the rx,ry,rz completely. Anyone who needs
reciprocal space coordinates for a peak is now responsible for calling
detgeom_transform_coords themselves.
Diffstat (limited to 'libcrystfel/src/indexers/taketwo.c')
-rw-r--r-- | libcrystfel/src/indexers/taketwo.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libcrystfel/src/indexers/taketwo.c b/libcrystfel/src/indexers/taketwo.c index 4243adcb..18845ce5 100644 --- a/libcrystfel/src/indexers/taketwo.c +++ b/libcrystfel/src/indexers/taketwo.c @@ -2157,11 +2157,18 @@ int taketwo_index(struct image *image, void *priv) rlps = malloc((image_feature_count(image->features)+1)*sizeof(struct rvec)); for ( i=0; i<image_feature_count(image->features); i++ ) { + + double r[3]; struct imagefeature *pk = image_get_feature(image->features, i); if ( pk == NULL ) continue; - rlps[n_rlps].u = pk->rx; - rlps[n_rlps].v = pk->ry; - rlps[n_rlps].w = pk->rz; + + detgeom_transform_coords(&image->detgeom->panels[pk->pn], + pk->fs, pk->ss, image->lambda, + r); + + rlps[n_rlps].u = r[0]; + rlps[n_rlps].v = r[1]; + rlps[n_rlps].w = r[2]; n_rlps++; } rlps[n_rlps].u = 0.0; |