atcollab / at

Accelerator Toolbox
Apache License 2.0
48 stars 31 forks source link

improve help of non-linear module #559

Closed swhite2401 closed 1 year ago

swhite2401 commented 1 year ago

The PR was initially meant to improve the help of the non-linear module. In addition it fixes a nasty behavior of get_tune_harmonics that was crashing with an obscure ValueError when the tracking was failing. If the tracking fails a nan is returned in this proposal (I hope this does not crash with #556).

More generally, my feeling is that the module 'nonlinear.py' would profit a lot from a good clean-up. Since this is closely linked to harmonic_analysis, that also needs some re-writing as mentioned in #556 , I would like to suggest to plan a complete re-write in a separate PR and keep this one as a temporary fix.

lfarv commented 1 year ago

@swhite2401: I fully agree with your plan. So if this PR does not conflict #556 (it should rather help!), it's good for me.