Closed jeu8 closed 1 year ago
@jeu8 Problem is that kz = 0 and this makes the vector potential (which PTC uses for the tracking) infinite (see section 24.22 of the Bmad manual). I will work on putting in code to catch this and generate an error message. The simple workaround is to make kz finite (anything greater than 1e-100).
I have tried this fix, but if kz is very small I get the same error. I have to make it ~1 to not have an error, but this is too large to approximate a constant gradient over my 4m wiggler. Do you see this as well?
@jeu8 If I lower the amplitude from 2.4 to 0.2 everything is fine.
I changed the file to reflect what was found out in the meeting. I have the amplitude set to the value it needs for the proper focusing, 1/sqrt(2)*2.4. this still gives an error
I am adding a gradient term to a wiggler using cartesian decomposition. No matter the size of this term I get an error about particle loss. Setting the term to 0 also gives the error. Only including the main wiggler term works.
File is at /nfs/acc/temp/jeu8/test
The file includes a working wiggler and a wiggler with the gradient term