Repository navigation
Define integrated strengths in multipoles - #1001
Conversation
|
@lfarv this is the minimal version of what I started in #970. I would very much prefer that we treat this problem as a whole instead of going for this minimal approach that has very limited added value. |
|
@swhite: Once the Integrated polynoms are set, the rest follows immediately ! I added the properties I also added
|
|
The "integrated" properties ( The "local" properties ( |
|
Hello, |
|
@JeanLucPons: [n for n, v in enumerate(magnet.PolynomB[:magnet.MaxOrder+1]) if v != 0.0]which gives a list of "active" orders. |
|
OK, detecting 0 is not reliable. Would it be possible to have: |
|
Oh, are you talking of the way the magnet is printed ? That's something else. At the moment, properties are normally not printed (K is an exception). |
|
Yes, If property are well printed, then i can find what functions are available a bit as for KickAngle. |
|
To comply with the lattice standard of PALS, the Kn coefficient must follow the MAD/PALS field expansion. This may be puzzling, so I added some documentation on field expansion. Look at this and give me your comments. Apart from that, do you see anything more to be added ? |
|
Thanks for the doc. It is clear. |
|
@JeanLucPons : I do not see clearly what you mean: you can build any combined function magnet, and control any strength in the PolynomB or PolynomA arrays. By lengthening the polynoms, you can reach any high order multipole. So I think that all the information you need is in these 2 attributes. Anyway this can be discussed in another PR, for the time being I would like to focus on the introduction of the integrated multipoles and the additional properties (but keep in mind that these are just views into PolynomA and PolynomB). Is this OK or is there anything more related to that? |
|
I agree. There is no limitation in AT to access the strength you want. |
|
@JeanLucPons : Ah, hardware ! Well, up to now, AT totally ignores hardware, but you are free to add any attribute to elements, concerning anything you like. Additional attributes (other than the ones documented) are totally ignored and harmless. In addition, it would be possible to decide that some attributes become part of AT, even if they are not used, just to freeze their names and avoid name conflicts. |
|
@JeanLucPons : to illustrate what I was writing above, here is an example: There you can see the hardware capabilities. |
|
Thanks |
|
I added the new With this, More exactly, for any magnet: |
|
I have a qestion concerning this It uses a sin() so if you consider the pathlength for the hypotenuse, this should be a sin(). |
|
@JeanLucPons : I noticed that this morning. When applied to a straight magnet, the reference path is a straight line and the slope |
I strongly discourage using So overriding But there are many other ways to answer your question |
|
For instance, a solution which does not need any modification: You can add your own attributes and methods to the Element class. Of course, those which are of general interest can be included in AT itself. |
|
Thanks @lfarv for the many useful additions! On my side it looks ok. |
|
@JeanLucPons, @swhite2401 : Do you approve ? |
|
@lfarv, this is not ok, you have added the k[ns]l properties with a convention that is not consistent with AT. I understand you would like to stick the the PALS convention but it is in my opinion not acceptable to have 2 different convention in the same code, this is just too confusion for the user; either we chance everywhere or we stick to AT convention. I have restore the branch so we can correct this. |
I was indeed wondering about the best option… But I got no feedback. However I understand your concern, so #1010 switches to the AT convention. |
This PR defined 2 new properties of
Multipolesand derivatives:IntegratedPolynomA = Length * PolynomA: skew strengthIntegratedPolynomB = Length * PolynomB: straight strength