aboutsummaryrefslogtreecommitdiff
path: root/src/pattern_sim.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2010-06-05 20:02:22 +0200
committerThomas White <taw@bitwiz.org.uk>2010-06-05 20:02:22 +0200
commit8ead809d4fb09047e7c146d405dbc0e97103ec3c (patch)
treed05b218def2ebffb0460905ca8214ca53735d819 /src/pattern_sim.c
parent509f08dc3216bdb80e04e012e916c019dea31355 (diff)
pattern_sim: Implement phased gradients
Diffstat (limited to 'src/pattern_sim.c')
-rw-r--r--src/pattern_sim.c7
1 files changed, 5 insertions, 2 deletions
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");