1D betatron resonances, Action-Angle Hamiltonian

SetOptions[{Plot,ParametricPlot,ListPlot,ContourPlot},AspectRatio->1,LabelStyle->{FontFamily->"Times New Roman",24},PlotRange->{{-2,2},{-2,2}},ImageSize->{600,600}];

Off[NSolve::ratnz];Manipulate[soln:=NSolve[Ham==(ν-(m/n)) J-(a0/n) ((((J/(2 ν))))^(n/2)) Cos[n γ],J,Reals];
ParametricPlot[Evaluate[{(((((2 J)/ν)))^(.5)) Cos[γ],(((((2 J)/ν)))^(.5)) Sin[γ]}/.soln],{γ,0,2 n π},AxesLabel->{"x","x'/ν"},PlotStyle->Red],{{Ham,0.0005979,"H"},-.01,.01,.0001},{{n,3,"order n"},1,4,1},{{m,1,"harm m"},1,4,1},{{ν,.34,"tune (Subscript[ν, x])"},0,2,.01},
{{a0,.0144,"strength"},-.05,.05,.001},AppearanceElements->All]