From a5289c2bbfdc7a04fc3f44b0cead930a2740394b Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 16 Oct 2009 11:59:45 +0200 Subject: Make the maximum excitation error a parameter to get_reflections --- src/relrod.c | 3 +-- src/relrod.h | 2 +- src/sim-main.c | 6 +++++- 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 [...]\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); -- cgit v1.2.3