diff options
author | Chun Hong Yoon <chun.hong.yoon@desy.de> | 2014-01-27 14:02:34 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-01-28 15:45:42 +0100 |
commit | 6ee21aaa02a5c11bd1269bff0bc7d23b0d402c1e (patch) | |
tree | ae9fcc8a362bacedda7d3fbd185ff427836cca1d /src/pattern_sim.c | |
parent | 07f1ba5269db94d44278596d827ac26845914b90 (diff) |
Add two colour spectrum
Diffstat (limited to 'src/pattern_sim.c')
-rw-r--r-- | src/pattern_sim.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pattern_sim.c b/src/pattern_sim.c index 08fc75dd..f23be972 100644 --- a/src/pattern_sim.c +++ b/src/pattern_sim.c @@ -451,6 +451,11 @@ int main(int argc, char *argv[]) spectrum_type = SPECTRUM_TOPHAT; } else if ( strcasecmp(spectrum_str, "sase") == 0) { spectrum_type = SPECTRUM_SASE; + } else if ( strcasecmp(spectrum_str, "twocolour") == 0 || + strcasecmp(spectrum_str, "twocolor") == 0 || + strcasecmp(spectrum_str, "twocolours") == 0 || + strcasecmp(spectrum_str, "twocolors") == 0) { + spectrum_type = SPECTRUM_TWOCOLOUR; } else { ERROR("Unrecognised spectrum type '%s'\n", spectrum_str); return 1; @@ -606,6 +611,10 @@ int main(int argc, char *argv[]) image.spectrum = generate_SASE(&image, rng); break; + case SPECTRUM_TWOCOLOUR : + image.spectrum = generate_twocolour(&image); + break; + } /* Ensure no residual information */ |