diff options
Diffstat (limited to 'libcrystfel/src/indexers/mosflm.c')
-rw-r--r-- | libcrystfel/src/indexers/mosflm.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/libcrystfel/src/indexers/mosflm.c b/libcrystfel/src/indexers/mosflm.c index bacd345f..4c1d2906 100644 --- a/libcrystfel/src/indexers/mosflm.c +++ b/libcrystfel/src/indexers/mosflm.c @@ -357,16 +357,21 @@ static void write_spt(struct image *image, const char *filename) struct imagefeature *f; double ttx, tty, x, y; + double r[3]; f = image_get_feature(image->features, i); if ( f == NULL ) continue; + detgeom_transform_coords(&image->detgeom->panels[f->pn], + f->fs, f->ss, image->lambda, + r); + ttx = angle_between_2d(0.0, 1.0, - f->rx, 1.0/image->lambda + f->rz); + r[0], 1.0/image->lambda + r[2]); tty = angle_between_2d(0.0, 1.0, - f->ry, 1.0/image->lambda + f->rz); - if ( f->rx < 0.0 ) ttx *= -1.0; - if ( f->ry < 0.0 ) tty *= -1.0; + r[1], 1.0/image->lambda + r[2]); + if ( r[0] < 0.0 ) ttx *= -1.0; + if ( r[1] < 0.0 ) tty *= -1.0; x = -tan(ttx)*FAKE_CLEN; y = tan(tty)*FAKE_CLEN; |