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

gradx/grady units in output Lattice #79

Closed gtiwari30 closed 1 year ago

gtiwari30 commented 1 year ago

Hi Sven, The output values of gradx/grady in Lattice group do not match with input values used for .lat file. Is this because the output gradx/grady is still in scaled units? Thank you

gtiwari30 commented 1 year ago

I find that using (1/a_w)(d*a_w/dx) /k_u in input gives \alpha in SI units in output. So this means input gradx/grady should be scaled to k_u. Does this sound correct? Thanks

svenreiche commented 1 year ago

Yes, the code scales internally the input gradx with ku. It allows for some faster execution. However the relative change of the undulator field with transverse position as the input is more intuitive. I will update the manual to indicate the difference.