From 0a5a04cc90619a1973c91489c71585ce127df045 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 22 Sep 2014 18:06:07 +0200 Subject: Beam file removal, part I --- src/diffraction.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/diffraction.c') diff --git a/src/diffraction.c b/src/diffraction.c index 261761a0..1fb63ea3 100644 --- a/src/diffraction.c +++ b/src/diffraction.c @@ -41,7 +41,6 @@ #include "utils.h" #include "cell.h" #include "diffraction.h" -#include "beam-parameters.h" #include "symmetry.h" #include "pattern_sim.h" @@ -566,9 +565,10 @@ struct sample *generate_SASE(struct image *image, gsl_rng *rng) eV_cen = gaussian_noise(rng, ph_lambda_to_eV(image->lambda), jitter_sigma_eV); - /* Convert FWHM to standard deviation. Note that bandwidth is taken to - * be "delta E over E" (E = photon energy), not the bandwidth in terms - * of wavelength, but the difference should be very small */ + /* Convert FWHM to standard deviation. Note that bandwidth is taken + * here to be "delta E over E" (E = photon energy), not the bandwidth in + * terms of wavelength (as it is everywhere else), but the difference + * should be very small */ double sigma = (image->bw*eV_cen) / (2.0*sqrt(2.0*log(2.0))); /* The spectrum will be calculated to a resolution which spreads six @@ -613,6 +613,10 @@ struct sample *generate_twocolour(struct image *image) eV_cen = ph_lambda_to_eV(image->lambda); + /* Convert FWHM to standard deviation. Note that bandwidth is taken + * here to be "delta E over E" (E = photon energy), not the bandwidth in + * terms of wavelength (as it is everywhere else), but the difference + * should be very small */ double halfwidth = eV_cen*image->bw/2.0; /* eV */ eV_cen1 = eV_cen - halfwidth; -- cgit v1.2.3