aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/spectrum.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libcrystfel/src/spectrum.c b/libcrystfel/src/spectrum.c
index 5cb5c47d..a1b1c899 100644
--- a/libcrystfel/src/spectrum.c
+++ b/libcrystfel/src/spectrum.c
@@ -535,9 +535,9 @@ Spectrum *spectrum_generate_sase(double wavelength, double bandwidth,
if ( s == NULL ) return NULL;
for ( i=0; i<15; i++ ) {
- g[0].kcen = 1.0/wavelength + (gsl_rng_uniform_pos(rng)-0.5) * bandwidth/wavelength;
- g[0].sigma = spike_width/wavelength;
- g[0].height = 1;
+ g[i].kcen = 1.0/wavelength + (gsl_rng_uniform_pos(rng)-0.5) * bandwidth/wavelength;
+ g[i].sigma = spike_width/wavelength;
+ g[i].height = gsl_rng_uniform(rng);
}
spectrum_set_gaussians(s, g, 15);