MultipoleT Curvature model
Well, I pushed Titus's code. I did some cleanup and checked a few things over, I note that with non-zero radius of curvature
(a) the processing time is too long. There is some recursive derivative lookup that seems to be not well-optimised, but I suspect it will take a bit of browsing through the maths to understand what he was trying to do. (b) the field values come out very large when radius of curvature is large. Presumably the code should tend to the straight magnet limit, indicating a bug somewhere.
I will need some time to address these issues - but between data taking and other work I can't give a firm date when I can get into this. I would estimate that I need a good week of work (say two-three weeks in real time) to have some confidence in the code. E.g. it has taken about a week of coding time plus lots of tracking studies for me to gain confidence in the spiral sector FFAG magnet model.
On the plus side, the straight magnet routines seem okay.