Replies: 4 comments
-
Hi @xuanhaoz , I'm not sure what you mean by "1 x NHarm entries", I can't find any in "atwiggler.m". Maybe the default value for By which is 6x1? In that case, the represented field has only one harmonic. gwig.c just contains some functions, in order to look deeper check the GWigSymplecticPass.c mexfunction (for Matlab), all the entries that do something are listed there. Regarding extracting the field, in my experience it is the other way around. I typically start with the ID geometric model defined in Mathematica (Radia) and there I would generate the Kick map and/or a set of 2D field map that I use to fit the harmonics for atwiggler. In that step I make sure that the difference between the field from the model and the reconstructed field agrees well enough. For complex magnetic fields I use many tenths of harmonics. That makes this path method not suited for heavy tracking simulations, for that the kick map method is my preferred choice. Since I don't have the model field directly available in at (at least not in Matlab, in Python there is also a Radia version but I have not used it) I never thought about reconstructing the field there, but I think we could do that if there is enough interest and/or the others agree. @lfarv , @swhite2401, someone else? Hope it helps, Zeus |
Beta Was this translation helpful? Give feedback.
-
Hi @xuanhaoz You are right, the first entry in the 6x1 column describing each harmonic is not used. I don't know what was the intention behind, but for now you can ignore it. I also agree that field expansion should be clearly expressed in the documentation, I'll prepare something for that. And finally, the field expansion computed in the C function |
Beta Was this translation helpful? Give feedback.
-
Ah! now I get it, yes the first row are just the harmonic numbers, I thought you were referring to another "entry" variable sorry. |
Beta Was this translation helpful? Give feedback.
-
Hi @ZeusMarti @lfarv Thank you both for the quick responses and clarifying this! Unfortunately, I don't have a kick-map of the wiggler on hand, so I'm thinking of adding a half-period atwiggler element at each end of the main wiggler element and match the taper with other harmonics. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Dear All,
When using GWigSymplecticPass method to define a wiggler field, the harmonics are described by a 6 x NHarm matrix. What do the 1 x NHarm entries represent? It's not clear from the documentation and I couldn't find explicit references to it in the gwig.c file either.
And since both Bmax and Lw are defined in the arguments to atwiggler, are the values in 1xNharm entries used in the pass method?
Finally, is there a way to extract and test the field created with atwiggler against the explicit model that I've created in order to fit my field profile data?
Many thanks!
Frank
Beta Was this translation helpful? Give feedback.
All reactions