From 6309221fcc3c573cdb20a7c953b8964fb85f78c5 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 7 Apr 2016 17:36:57 +0200 Subject: No more slab-relative coordinates in libcrystfel --- libcrystfel/src/mosflm.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'libcrystfel/src/mosflm.c') diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c index 8a546630..f1a1e8ae 100644 --- a/libcrystfel/src/mosflm.c +++ b/libcrystfel/src/mosflm.c @@ -3,13 +3,13 @@ * * Invoke the DPS auto-indexing algorithm through MOSFLM * - * Copyright © 2012-2014 Deutsches Elektronen-Synchrotron DESY, + * Copyright © 2012-2016 Deutsches Elektronen-Synchrotron DESY, * a research centre of the Helmholtz Association. * Copyright © 2012 Richard Kirian * * Authors: * 2010 Richard Kirian - * 2010-2014 Thomas White + * 2010-2016 Thomas White * 2014 Takanori Nakane * * This file is part of CrystFEL. @@ -373,22 +373,18 @@ static void write_spt(struct image *image, const char *filename) for ( i=0; ifeatures, i); if ( f == NULL ) continue; - p = find_panel(image->det, f->fs, f->ss); - if ( p == NULL ) continue; + xs = f->fs*f->p->fsx + f->ss*f->p->ssx; + ys = f->fs*f->p->fsy + f->ss*f->p->ssy; + rx = (xs + f->p->cnx) / f->p->res; + ry = (ys + f->p->cny) / f->p->res; - xs = (f->fs-p->min_fs)*p->fsx + (f->ss-p->min_ss)*p->ssx; - ys = (f->fs-p->min_fs)*p->fsy + (f->ss-p->min_ss)*p->ssy; - rx = (xs + p->cnx) / p->res; - ry = (ys + p->cny) / p->res; - - x = -rx*fclen/p->clen; - y = ry*fclen/p->clen; /* Peak positions in m */ + x = -rx*fclen/f->p->clen; + y = ry*fclen/f->p->clen; /* Peak positions in m */ fprintf(fh, "%10.2f %10.2f %10.2f %10.2f %10.2f %10.2f\n", x*1e3, y*1e3, 0.0, 0.0, 1000.0, 10.0); -- cgit v1.2.3