From 8ead809d4fb09047e7c146d405dbc0e97103ec3c Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 5 Jun 2010 20:02:22 +0200 Subject: pattern_sim: Implement phased gradients --- src/pattern_sim.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/pattern_sim.c') diff --git a/src/pattern_sim.c b/src/pattern_sim.c index 8c7a7e4b..c89da879 100644 --- a/src/pattern_sim.c +++ b/src/pattern_sim.c @@ -167,6 +167,7 @@ int main(int argc, char *argv[]) double *powder; char *intfile = NULL; double *intensities; + double *phases; int config_simdetails = 0; int config_nearbragg = 0; int config_randomquat = 0; @@ -286,9 +287,11 @@ int main(int argc, char *argv[]) STATUS("I'll simulate a flat intensity distribution.\n"); intensities = NULL; counts = NULL; + phases = NULL; } else { counts = new_list_count(); - intensities = read_reflections(intfile, counts); + phases = new_list_phase(); + intensities = read_reflections(intfile, counts, phases); free(intfile); } @@ -379,7 +382,7 @@ int main(int argc, char *argv[]) get_diffraction_gpu(gctx, &image, na, nb, nc, cell); } else { get_diffraction(&image, na, nb, nc, intensities, counts, - cell, !config_nowater, grad); + phases, cell, !config_nowater, grad); } if ( image.data == NULL ) { ERROR("Diffraction calculation failed.\n"); -- cgit v1.2.3