aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-05-24 19:47:50 +0200
committerThomas White <taw@physics.org>2019-05-29 10:42:14 +0200
commit69bd3f54c651980d39e2d38694f2032aaca44d16 (patch)
treeccdcc6b4b0a1bd21ac292a610c53e853bcf350af /tests
parent0e1726e01645c110e9935cc8c3e8f35291b2b82d (diff)
Fix SASE simulation
Diffstat (limited to 'tests')
-rw-r--r--tests/spectrum_check.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/spectrum_check.c b/tests/spectrum_check.c
index e910aad3..5ee85dcc 100644
--- a/tests/spectrum_check.c
+++ b/tests/spectrum_check.c
@@ -91,10 +91,23 @@ int main(int argc, char *argv[])
r += check_integral(s, 100);
spectrum_free(s);
- s = spectrum_generate_sase(ph_eV_to_k(9000), 0.01, 0.0005, rng);
+ s = spectrum_generate_sase(ph_eV_to_lambda(9000), 0.01, 0.0001, rng);
+ r += check_integral(s, 100);
plot_spectrum(s);
spectrum_free(s);
+ s = spectrum_generate_gaussian(ph_eV_to_lambda(9000), 0.01);
+ r += check_integral(s, 100);
+ spectrum_free(s);
+
+ s = spectrum_generate_tophat(ph_eV_to_lambda(9000), 0.01);
+ r += check_integral(s, 100);
+ spectrum_free(s);
+
+ s = spectrum_generate_twocolour(ph_eV_to_lambda(9000), 0.001, ph_eV_to_k(100));
+ r += check_integral(s, 100);
+ spectrum_free(s);
+
gsl_rng_free(rng);
return r;