diff options
author | Thomas White <taw@physics.org> | 2014-09-22 18:06:07 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-09-22 18:06:07 +0200 |
commit | 0a5a04cc90619a1973c91489c71585ce127df045 (patch) | |
tree | c1903fc77534cd97840330b914b98b7b1187bce0 /src/diffraction.c | |
parent | 142e1ad4e0fad73d223c67a842dfb9728a3bf34c (diff) |
Beam file removal, part I
Diffstat (limited to 'src/diffraction.c')
-rw-r--r-- | src/diffraction.c | 12 |
1 files changed, 8 insertions, 4 deletions
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; |