aboutsummaryrefslogtreecommitdiff
path: root/src/pattern_sim.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2010-11-14 15:06:16 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:05 +0100
commit38f7657477e16117655db03b05e3da6a126009d8 (patch)
treee14c046a2d95ae0a47370b99480dbf64593b25f1 /src/pattern_sim.c
parentcd88e09be9af887aae40abf9336ef01d22746553 (diff)
pattern_sim: Add --really-random option
Diffstat (limited to 'src/pattern_sim.c')
-rw-r--r--src/pattern_sim.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pattern_sim.c b/src/pattern_sim.c
index 603fc770..ae2a6943 100644
--- a/src/pattern_sim.c
+++ b/src/pattern_sim.c
@@ -80,6 +80,9 @@ static void show_help(const char *s)
" values into account. This is the\n"
" most accurate method, but the\n"
" slowest.\n"
+" --really-random Use really random numbers for the orientation and\n"
+" crystal size. By default, the same sequence\n"
+" will be used for each new run.\n"
"\n"
"By default, the simulation aims to be as accurate as possible. For greater\n"
"speed, or for testing, you can choose to disable certain things using the\n"
@@ -186,6 +189,7 @@ int main(int argc, char *argv[])
int config_nonoise = 0;
int config_nosfac = 0;
int config_gpu = 0;
+ int config_random = 0;
char *powder_fn = NULL;
char *filename = NULL;
char *grad_str = NULL;
@@ -217,6 +221,7 @@ int main(int argc, char *argv[])
{"output", 1, NULL, 'o'},
{"geometry", 1, NULL, 'g'},
{"beam", 1, NULL, 'b'},
+ {"really-random", 0, &config_random, 1},
{0, 0, NULL, 0}
};
@@ -274,8 +279,7 @@ int main(int argc, char *argv[])
}
- /* FIXME: Make this optional */
- if ( 1 ) {
+ if ( config_random ) {
FILE *fh;
unsigned int seed;
fh = fopen("/dev/urandom", "r");