diff options
author | Alexandra Tolstikova <alexandra.tolstikova@desy.de> | 2017-11-22 16:58:10 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-09-10 15:01:29 +0200 |
commit | 5a50a82a9ee0936d67901f43e68ca37455a7814b (patch) | |
tree | 81df87a96485d981257dc9161cd2010e7674f903 /src | |
parent | 17aec9c77e9b75510e43b0fb073df75f66849761 (diff) |
Change image.spectrum to image.spectrum0 to use a different structure for spectrum.
Diffstat (limited to 'src')
-rw-r--r-- | src/diffraction-gpu.c | 10 | ||||
-rw-r--r-- | src/diffraction.c | 8 | ||||
-rw-r--r-- | src/partial_sim.c | 2 | ||||
-rw-r--r-- | src/pattern_sim.c | 10 |
4 files changed, 15 insertions, 15 deletions
diff --git a/src/diffraction-gpu.c b/src/diffraction-gpu.c index b0ed52ea..79b5443d 100644 --- a/src/diffraction-gpu.c +++ b/src/diffraction-gpu.c @@ -342,16 +342,16 @@ int get_diffraction_gpu(struct gpu_context *gctx, struct image *image, for ( i=0; i<image->nsamples; i++ ) { printf("%.3f eV, weight = %.5f\n", - ph_lambda_to_eV(1.0/image->spectrum[i].k), - image->spectrum[i].weight); + ph_lambda_to_eV(1.0/image->spectrum0[i].k), + image->spectrum0[i].weight); - err = do_panels(gctx, image, image->spectrum[i].k, - image->spectrum[i].weight, + err = do_panels(gctx, image, image->spectrum0[i].k, + image->spectrum0[i].weight, &n_inf, &n_neg, &n_nan); if ( err ) return 1; - tot += image->spectrum[i].weight; + tot += image->spectrum0[i].weight; } printf("total weight = %f\n", tot); diff --git a/src/diffraction.c b/src/diffraction.c index 97750f58..4dc21c59 100644 --- a/src/diffraction.c +++ b/src/diffraction.c @@ -772,13 +772,13 @@ void get_diffraction(struct image *image, int na, int nb, int nc, for ( i=0; i<image->nsamples; i++ ) { printf("%.1f eV, weight = %.5f\n", - ph_lambda_to_eV(1.0/image->spectrum[i].k), - image->spectrum[i].weight); + ph_lambda_to_eV(1.0/image->spectrum0[i].k), + image->spectrum0[i].weight); diffraction_at_k(image, intensities, phases, - flags, cell, m, sym, image->spectrum[i].k, + flags, cell, m, sym, image->spectrum0[i].k, ax, ay, az, bx, by, bz, cx, cy, cz, - lut_a, lut_b, lut_c, image->spectrum[i].weight); + lut_a, lut_b, lut_c, image->spectrum0[i].weight); } diff --git a/src/partial_sim.c b/src/partial_sim.c index 218780fd..012b0a59 100644 --- a/src/partial_sim.c +++ b/src/partial_sim.c @@ -844,7 +844,7 @@ int main(int argc, char *argv[]) image.num_peaks = 0; image.num_saturated_peaks = 0; image.spectrum_size = 0; - image.spectrum = NULL; + image.spectrum0 = NULL; image.serial = 0; image.event = NULL; diff --git a/src/pattern_sim.c b/src/pattern_sim.c index d47c4b60..5b25100e 100644 --- a/src/pattern_sim.c +++ b/src/pattern_sim.c @@ -819,7 +819,7 @@ int main(int argc, char *argv[]) powder.det = image.det; powder.beam = NULL; powder.lambda = 0.0; - powder.spectrum = NULL; + powder.spectrum0 = NULL; powder.dp = malloc(image.det->n_panels*sizeof(float *)); if ( powder.dp == NULL ) { ERROR("Failed to allocate powder data\n"); @@ -978,19 +978,19 @@ int main(int argc, char *argv[]) switch ( spectrum_type ) { case SPECTRUM_TOPHAT : - image.spectrum = generate_tophat(&image); + image.spectrum0 = generate_tophat(&image); break; case SPECTRUM_SASE : - image.spectrum = generate_SASE(&image, rng); + image.spectrum0 = generate_SASE(&image, rng); break; case SPECTRUM_TWOCOLOUR : - image.spectrum = generate_twocolour(&image); + image.spectrum0 = generate_twocolour(&image); break; case SPECTRUM_FROMFILE : - image.spectrum = generate_spectrum_fromfile(&image, + image.spectrum0 = generate_spectrum_fromfile(&image, spectrum_fn); break; |