diff options
author | Thomas White <taw@physics.org> | 2012-02-22 11:55:02 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:45 +0100 |
commit | 54b40940899f8a3eae9640dcd76156b1c58aa6b1 (patch) | |
tree | 619cb697229b7d6f127c3a69aa4c4be02c80b63b /libcrystfel/src/mosflm.c | |
parent | 75a5b1a7edf3904f09bf1765fc762c5cc478d1e6 (diff) |
Fix MOSFLM conventions (again)
Diffstat (limited to 'libcrystfel/src/mosflm.c')
-rw-r--r-- | libcrystfel/src/mosflm.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c index 1e88c70d..f415271c 100644 --- a/libcrystfel/src/mosflm.c +++ b/libcrystfel/src/mosflm.c @@ -135,14 +135,15 @@ static int read_newmat(const char *filename, struct image *image) fclose(fh); /* MOSFLM "A" matrix is multiplied by lambda, so fix this */ - c = 1/image->lambda; + c = 1.0/image->lambda; image->candidate_cells[0] = cell_new(); + /* No idea why the cell comes out in this strange coordinate system */ cell_set_reciprocal(image->candidate_cells[0], - asz*c, -asx*c, asy*c, - bsz*c, -bsx*c, bsy*c, - csz*c, -csx*c, csy*c); + asy*c, -asz*c, asx*c, + bsy*c, -bsz*c, bsx*c, + csy*c, -csz*c, csx*c); image->ncells = 1; @@ -155,7 +156,7 @@ static void write_spt(struct image *image, const char *filename) { FILE *fh; int i; - double fclen = 67.8; /* fake camera length in mm */ + double fclen = 67.8e-3; /* fake camera length in m */ int n; fh = fopen(filename, "w"); @@ -187,10 +188,10 @@ static void write_spt(struct image *image, const char *filename) ry = (ys + p->cny) / p->res; x = rx*fclen/p->clen; - y = ry*fclen/p->clen; /* Peak positions in mm */ + y = ry*fclen/p->clen; /* Peak positions in m */ 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); + x*1e3, y*1e3, 0.0, 0.0, 1000.0, 10.0); } |