aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/mosflm.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2012-01-26 17:57:26 -0800
committerThomas White <taw@physics.org>2012-02-22 15:27:44 +0100
commit9fa6b17a3ead6d98e73f8f3253f12ebf80a96e77 (patch)
treed8bae5a87fbf9a89d7d70e3a03a73e2c5c9db280 /libcrystfel/src/mosflm.c
parent21fcadcc66092b48f59acf1037ebae31538fb094 (diff)
Simplify MOSFLM peak stuff
Diffstat (limited to 'libcrystfel/src/mosflm.c')
-rw-r--r--libcrystfel/src/mosflm.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c
index 624d07d5..1e88c70d 100644
--- a/libcrystfel/src/mosflm.c
+++ b/libcrystfel/src/mosflm.c
@@ -156,8 +156,6 @@ static void write_spt(struct image *image, const char *filename)
FILE *fh;
int i;
double fclen = 67.8; /* fake camera length in mm */
- double fpix = 0.075; /* fake pixel size in mm */
- double pix;
int n;
fh = fopen(filename, "w");
@@ -166,7 +164,7 @@ static void write_spt(struct image *image, const char *filename)
return;
}
- fprintf(fh, "%10d %10d %10.8f %10.6f %10.6f\n", 1, 1, fpix, 1.0, 0.0);
+ fprintf(fh, "%10d %10d %10.8f %10.6f %10.6f\n", 1, 1, 0.0, 1.0, 0.0);
fprintf(fh, "%10d %10d\n", 1, 1);
fprintf(fh, "%10.5f %10.5f\n", 0.0, 0.0);
@@ -183,15 +181,13 @@ static void write_spt(struct image *image, const char *filename)
p = find_panel(image->det, f->fs, f->ss);
if ( p == NULL ) continue;
- pix = 1000.0/p->res; /* pixel size in mm */
-
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;
- ry = ys + p->cny;
+ rx = (xs + p->cnx) / p->res;
+ ry = (ys + p->cny) / p->res;
- x = rx*pix*fclen/p->clen/1000.0;
- y = ry*pix*fclen/p->clen/1000.0;
+ x = rx*fclen/p->clen;
+ y = ry*fclen/p->clen; /* Peak positions in mm */
fprintf(fh, "%10.2f %10.2f %10.2f %10.2f %10.2f %10.2f\n",
x, y, 0.0, 0.0, 1000.0, 10.0);