!+ ! matching of long straight section !- ON LOG; ON RAD FLUC COD RFSW RADCOD; FFS USE RING; cell; calc; ! {nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi; ! FIT; ! NX nx0 8; ! set the offmomentum tunes for 5 points ! NY ny0 8; ! in -DP < dp/p0 < DP ! DP=0.03; ! set the bandwidth |dp/p0|max = DP = 0.01 !! S* 0; ! S* minmax 35; ! FREE S*; ! GO; ! FITP 1; nx[dp_]:=(DP0=dp;FFS["CALC"];Twiss["NX","***"]/2/Pi); ny[dp_]:=(DP0=dp;FFS["CALC"];Twiss["NY","***"]/2/Pi); Plot[nx[dp], {dp, -0.04, 0.04}]; Plot[ny[dp], {dp, -0.04, 0.04}]; TYPE S*; ! print out all elements fix s*; out 12 draw bx & by & ex q* end; disp MARKR; SAVE; ! cell calc ; ! chromaticity; stop; stop;