aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-01-20 17:20:10 +0100
committerThomas White <taw@physics.org>2014-01-20 17:20:10 +0100
commit8e2f2f44f46c18f7bd621a2ef9a3d0aa813d76d9 (patch)
tree80f8b99b1d37ac8357aeb3298838fb995403e300 /tests
parent2304299259c55be3726929f5537ad2eed3155086 (diff)
pattern_sim: Overhaul and add SASE spectrum simulation
Diffstat (limited to 'tests')
-rw-r--r--tests/gpu_sim_check.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/gpu_sim_check.c b/tests/gpu_sim_check.c
index 5c45ea02..c183a2a2 100644
--- a/tests/gpu_sim_check.c
+++ b/tests/gpu_sim_check.c
@@ -142,14 +142,21 @@ int main(int argc, char *argv[])
beam = calloc(1, sizeof(struct beam_params));
beam->fluence = 1.0e15; /* Does nothing */
beam->beam_radius = 1.0e-6;
- beam->photon_energy = 9000.0;
- beam->bandwidth = 0.1 / 100.0;
+ beam->photon_energy = 6000.0;
+ beam->bandwidth = 1.0 / 100.0;
beam->divergence = 0.0;
cpu_image.beam = beam;
gpu_image.beam = beam;
cpu_image.lambda = ph_en_to_lambda(eV_to_J(beam->photon_energy));
gpu_image.lambda = ph_en_to_lambda(eV_to_J(beam->photon_energy));
+ cpu_image.bw = beam->bandwidth;
+ gpu_image.bw = beam->bandwidth;
+
+ cpu_image.nsamples = 10;
+ gpu_image.nsamples = 10;
+ cpu_image.spectrum = generate_tophat(&cpu_image);
+ gpu_image.spectrum = generate_tophat(&gpu_image);
start = get_hires_seconds();
get_diffraction_gpu(gctx, &gpu_image, 8, 8, 8, cell);