aboutsummaryrefslogtreecommitdiff
path: root/src/pattern_sim.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-02-26 10:58:13 +0100
committerThomas White <taw@physics.org>2010-02-26 13:40:11 +0100
commit86dd71e8640394f4e4f5aa71b2e5f51f5fea4a11 (patch)
treee7039c5d4e9b5477bc1e350e0330d157125d5c9f /src/pattern_sim.c
parentb4664bc2a399463bd4e01f331a153749b3947b8f (diff)
Handle images as floats rather than int16_t
Also, remove bloom - it's not a useful model for what really happens and takes too long (this isn't a detector simulation..)
Diffstat (limited to 'src/pattern_sim.c')
-rw-r--r--src/pattern_sim.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/pattern_sim.c b/src/pattern_sim.c
index dc6ac354..a6a2156b 100644
--- a/src/pattern_sim.c
+++ b/src/pattern_sim.c
@@ -57,9 +57,6 @@ static void show_help(const char *s)
"\n"
" --no-water Do not simulate water background.\n"
" --no-noise Do not calculate Poisson noise.\n"
-" --no-bloom Do not calculate CCD bloom (intensities which are\n"
-" above the recordable range will be clamped to\n"
-" the maximum allowable value).\n"
" --no-sfac Pretend that all structure factors are 1.\n"
);
}
@@ -109,12 +106,7 @@ static void show_details()
"algorithm. When the intensity is sufficiently high that Knuth's algorithm\n"
"would result in machine precision problems, a normal distribution with\n"
"standard deviation sqrt(I) is used instead.\n"
-"\n"
-"Bloom of the CCD is included. Any excess intensity in a particular pixel\n"
-"is divided between the neighbouring pixels. Diagonal neighbours receive\n"
-"half the contribution of adjacent pixels. This process is repeated for\n"
-"every pixel until all pixels are below the saturation value. Note that this\n"
-"process is slow for very saturated images.\n");
+);
}
@@ -164,7 +156,6 @@ int main(int argc, char *argv[])
int config_noimages = 0;
int config_nowater = 0;
int config_nonoise = 0;
- int config_nobloom = 0;
int config_nosfac = 0;
int config_gpu = 0;
int config_powder = 0;
@@ -184,7 +175,6 @@ int main(int argc, char *argv[])
{"no-images", 0, &config_noimages, 1},
{"no-water", 0, &config_nowater, 1},
{"no-noise", 0, &config_nonoise, 1},
- {"no-bloom", 0, &config_nobloom, 1},
{"no-sfac", 0, &config_nosfac, 1},
{"powder", 0, &config_powder, 1},
{0, 0, NULL, 0}
@@ -294,8 +284,7 @@ int main(int argc, char *argv[])
goto skip;
}
- record_image(&image, !config_nowater, !config_nonoise,
- !config_nobloom);
+ record_image(&image, !config_nowater, !config_nonoise);
if ( config_nearbragg ) {
output_intensities(&image, image.molecule->cell);
@@ -329,7 +318,7 @@ int main(int argc, char *argv[])
/* Write the output file */
hdf5_write(filename, image.data,
- image.width, image.height, H5T_NATIVE_INT16);
+ image.width, image.height, H5T_NATIVE_FLOAT);
}