aboutsummaryrefslogtreecommitdiff
path: root/src/pattern_sim.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-02-22 10:24:35 +0100
committerThomas White <taw@physics.org>2010-02-22 10:25:02 +0100
commit3132451eb2a3c88202078177f84c9c8fc96372fe (patch)
tree08104e9c2df2c3a8fe98a1f97dd358fd5fc22535 /src/pattern_sim.c
parentcc0db0054d76474e55393c05806f715a0e2f6d08 (diff)
Tidy some things up:
s convention detector geometry comments, help messages
Diffstat (limited to 'src/pattern_sim.c')
-rw-r--r--src/pattern_sim.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/src/pattern_sim.c b/src/pattern_sim.c
index 56826ed9..26b863cf 100644
--- a/src/pattern_sim.c
+++ b/src/pattern_sim.c
@@ -1,5 +1,7 @@
/*
- * main.c
+ * pattern_sim.c
+ *
+ * Simulate diffraction patterns from small crystals
*
* (c) 2006-2010 Thomas White <taw@physics.org>
*
@@ -227,27 +229,7 @@ int main(int argc, char *argv[])
image.lambda = ph_en_to_lambda(eV_to_J(2.0e3)); /* Wavelength */
image.molecule = load_molecule();
- /* Set up detector configuration */
- image.det.n_panels = 2;
- image.det.panels = malloc(2*sizeof(struct panel));
- /* Upper panel */
- image.det.panels[0].min_x = 0;
- image.det.panels[0].max_x = 1023;
- image.det.panels[0].min_y = 512;
- image.det.panels[0].max_y = 1023;
- image.det.panels[0].cx = 491.9;
- image.det.panels[0].cy = 440.7;
- image.det.panels[0].clen = 67.0e-3;
- image.det.panels[0].res = 13333.3; /* 75 micron pixel size */
- /* Lower panel */
- image.det.panels[1].min_x = 0;
- image.det.panels[1].max_x = 1023;
- image.det.panels[1].min_y = 0;
- image.det.panels[1].max_y = 511;
- image.det.panels[1].cx = 492.0;
- image.det.panels[1].cy = 779.7;
- image.det.panels[1].clen = 75.0e-3;
- image.det.panels[1].res = 13333.3; /* 75 micron pixel size */
+ #include "geometry-lcls.tmp"
powder = calloc(image.width*image.height, sizeof(*powder));