aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2009-10-16 11:59:45 +0200
committerThomas White <taw@bitwiz.org.uk>2009-10-16 11:59:45 +0200
commita5289c2bbfdc7a04fc3f44b0cead930a2740394b (patch)
tree892e27db70376944af3c84d0a7fc5b8f5c80de14
parent929d5f3ee40572b1f96553d0e8d978b1ec205b7f (diff)
Make the maximum excitation error a parameter to get_reflections
-rw-r--r--src/relrod.c3
-rw-r--r--src/relrod.h2
-rw-r--r--src/sim-main.c6
3 files changed, 7 insertions, 4 deletions
diff --git a/src/relrod.c b/src/relrod.c
index bbb5fb68..0d1b1e63 100644
--- a/src/relrod.c
+++ b/src/relrod.c
@@ -53,10 +53,9 @@ static void mapping_rotate(double x, double y, double z,
}
-void get_reflections(struct image *image, UnitCell *cell)
+void get_reflections(struct image *image, UnitCell *cell, double smax)
{
ImageFeatureList *flist;
- double smax = 0.01e9;
double tilt, omega, wavenumber;
double nx, ny, nz; /* "normal" vector */
double kx, ky, kz; /* Electron wavevector ("normal" times 1/lambda) */
diff --git a/src/relrod.h b/src/relrod.h
index 1dac6057..9bb1762a 100644
--- a/src/relrod.h
+++ b/src/relrod.h
@@ -19,6 +19,6 @@
#include "image.h"
#include "cell.h"
-extern void get_reflections(struct image *image, UnitCell *cell);
+extern void get_reflections(struct image *image, UnitCell *cell, double smax);
#endif /* RELROD_H */
diff --git a/src/sim-main.c b/src/sim-main.c
index 8bc7b7d3..f794cdda 100644
--- a/src/sim-main.c
+++ b/src/sim-main.c
@@ -27,6 +27,10 @@
#include "hdf5-file.h"
+/* Crystal size in metres */
+#define CRYSTAL_SIZE (500.0e-9)
+
+
static void main_show_help(const char *s)
{
printf("Syntax: %s <file1.h5> <file2.h5> [...]\n\n", s);
@@ -80,7 +84,7 @@ int main(int argc, char *argv[])
image_add(list, &image);
/* Calculate reflections */
- get_reflections(&image, cell);
+ get_reflections(&image, cell, 1.0/CRYSTAL_SIZE);
/* Construct the image */
nrefl = image_feature_count(image.rflist);