aboutsummaryrefslogtreecommitdiff
path: root/src/pattern_sim.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2009-12-02 11:34:45 +0100
committerThomas White <taw@physics.org>2009-12-02 11:34:45 +0100
commit14ed5b7569dedf5905deafcb892084ccb2f1f4a3 (patch)
tree9820c5c5526fcb88bcd96333a285534a19f1d88d /src/pattern_sim.c
parent6d8e2e53e444f65930c1b92f32991f062bbfbaf3 (diff)
Add option not to include water background
Diffstat (limited to 'src/pattern_sim.c')
-rw-r--r--src/pattern_sim.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pattern_sim.c b/src/pattern_sim.c
index 5ed68743..065fed72 100644
--- a/src/pattern_sim.c
+++ b/src/pattern_sim.c
@@ -43,6 +43,7 @@ static void show_help(const char *s)
" --no-images Do not output any HDF5 files.\n"
" -r, --random-orientation Use a randomly generated orientation\n"
" (a new orientation will be used for each image).\n"
+" --no-water Do not simulate water background.\n"
);
}
@@ -140,6 +141,7 @@ int main(int argc, char *argv[])
int config_nearbragg = 0;
int config_randomquat = 0;
int config_noimages = 0;
+ int config_nowater = 0;
int number = 1; /* Index for the current image */
int n_images = 1; /* Generate one image by default */
int done = 0;
@@ -152,6 +154,7 @@ int main(int argc, char *argv[])
{"random-orientation", 0, NULL, 'r'},
{"number", 1, NULL, 'n'},
{"no-images", 0, &config_noimages, 1},
+ {"no-water", 0, &config_nowater, 1},
{0, 0, NULL, 0}
};
@@ -227,7 +230,7 @@ int main(int argc, char *argv[])
image.hdr = NULL;
get_diffraction(&image);
- record_image(&image);
+ record_image(&image, !config_nowater);
if ( config_nearbragg ) {
output_intensities(&image);