svenreiche / Genesis-1.3-Version4

Time-dependent, 3D Code to simulate the amplification process of a Free-electron Laser.
GNU General Public License v3.0
55 stars 27 forks source link

Space in "helical= true" creates a planar undulator #88

Closed isleydys closed 1 year ago

isleydys commented 1 year ago

For a helical undulator we expect the third harmonic radiation output to be zero. However, on the lattice file, when adding a space after helical= true, the simulation interprets it as plantar undulator and there is some third harmonic radiation on the output file different from zero. Now, if we write helical=true with no spacing in between, the simulation does run as a helical undulator, and no third harmonic is seen on the output radiation.

example_bug_helical.zip

svenreiche commented 1 year ago

Thank you for finding this bug. After trimming the whitespace of values strings in the lattice input deck the problem doe snot occur any longer (hopefully). It is commited to the dev branch of the repository.