aboutsummaryrefslogtreecommitdiff
path: root/src/pattern_sim.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2010-03-27 13:12:51 +0100
committerThomas White <taw@bitwiz.org.uk>2010-03-27 13:12:51 +0100
commitbdd2a7b4a8a5456a023d54be6fd5d6a011314c7e (patch)
tree3d13a13a57e724ed94505b3b919d40e18c095cc6 /src/pattern_sim.c
parenta6e064b18ed513d341d8793acbc485d7bc291827 (diff)
Allow molecule_factor() to tell when it doesn't know the intensity
Diffstat (limited to 'src/pattern_sim.c')
-rw-r--r--src/pattern_sim.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/pattern_sim.c b/src/pattern_sim.c
index 55b92c0e..3fa1155f 100644
--- a/src/pattern_sim.c
+++ b/src/pattern_sim.c
@@ -163,6 +163,7 @@ int main(int argc, char *argv[])
int n_images = 1; /* Generate one image by default */
int done = 0;
UnitCell *cell;
+ unsigned int *counts;
/* Long options */
const struct option longopts[] = {
@@ -232,8 +233,10 @@ int main(int argc, char *argv[])
STATUS("reflection intensities (with --intensities).\n");
STATUS("I'll simulate a flat intensity distribution.\n");
intensities = NULL;
+ counts = NULL;
} else {
- intensities = read_reflections(intfile);
+ counts = new_list_count();
+ intensities = read_reflections(intfile, counts);
free(intfile);
}
@@ -293,8 +296,8 @@ int main(int argc, char *argv[])
}
get_diffraction_gpu(gctx, &image, na, nb, nc, cell);
} else {
- get_diffraction(&image, na, nb, nc, intensities, cell,
- !config_nowater);
+ get_diffraction(&image, na, nb, nc, intensities, counts,
+ cell, !config_nowater);
}
if ( image.data == NULL ) {
ERROR("Diffraction calculation failed.\n");