This is my first time using SRW. I would like to simulate the far-field radiation flux for a Wiggler insertion device. Initially, I based my work on Example 6, modifying the parameters of the Undulator to achieve a large K value. However, the simulated flux turned out to be zero. I would like to ask whether SRW provides dedicated functions specifically designed for Wiggler simulations (I have not been able to find any). If such functions exist, could you kindly point me to an example that I could refer to in order to meet my simulation requirements? Below are the parameters of the electron beam and the insertion device that I used.
#***********Undulator
harmB = SRWLMagFldH()
harmB.n = 1
harmB.h_or_v = 'v'
harmB.B = 1.8
und = SRWLMagFldU([harmB])
und.per = 1.392
und.nPer = 1
magFldCnt = SRWLMagFldC([und], array('d', [0]), array('d', [0]), array('d', [0]))
#***********Electron Beam
eBeam = SRWLPartBeam()
eBeam.partStatMom1.gamma = 2.5/0.51099890221e-03
eBeam.Iavg = 0.25
eBeam.partStatMom1.x = 0.
eBeam.partStatMom1.y = 0.
eBeam.partStatMom1.z = 0.
eBeam.partStatMom1.xp = 0
eBeam.partStatMom1.yp = 0
sigEperE = 7e-4
sigX = 1.026e-3
sigXp = 0.175e-3
sigY = 0.957e-3
sigYp = 0.081e-3
eBeam.arStatMom2[0] = sigXsigX
eBeam.arStatMom2[1] = 0
eBeam.arStatMom2[2] = sigXpsigXp
eBeam.arStatMom2[3] = sigYsigY
eBeam.arStatMom2[4] = 0
eBeam.arStatMom2[5] = sigYpsigYp
eBeam.arStatMom2[10] = sigEperE*sigEperE
This is my first time using SRW. I would like to simulate the far-field radiation flux for a Wiggler insertion device. Initially, I based my work on Example 6, modifying the parameters of the Undulator to achieve a large K value. However, the simulated flux turned out to be zero. I would like to ask whether SRW provides dedicated functions specifically designed for Wiggler simulations (I have not been able to find any). If such functions exist, could you kindly point me to an example that I could refer to in order to meet my simulation requirements? Below are the parameters of the electron beam and the insertion device that I used.
#***********Undulator
harmB = SRWLMagFldH()
harmB.n = 1
harmB.h_or_v = 'v'
harmB.B = 1.8
und = SRWLMagFldU([harmB])
und.per = 1.392
und.nPer = 1
magFldCnt = SRWLMagFldC([und], array('d', [0]), array('d', [0]), array('d', [0]))
#***********Electron Beam
eBeam = SRWLPartBeam()
eBeam.partStatMom1.gamma = 2.5/0.51099890221e-03
eBeam.Iavg = 0.25
eBeam.partStatMom1.x = 0.
eBeam.partStatMom1.y = 0.
eBeam.partStatMom1.z = 0.
eBeam.partStatMom1.xp = 0
eBeam.partStatMom1.yp = 0
sigEperE = 7e-4
sigX = 1.026e-3
sigXp = 0.175e-3
sigY = 0.957e-3
sigYp = 0.081e-3
eBeam.arStatMom2[0] = sigXsigX
eBeam.arStatMom2[1] = 0
eBeam.arStatMom2[2] = sigXpsigXp
eBeam.arStatMom2[3] = sigYsigY
eBeam.arStatMom2[4] = 0
eBeam.arStatMom2[5] = sigYpsigYp
eBeam.arStatMom2[10] = sigEperE*sigEperE