example of using atundulator to add an
0001 %example of using atundulator to add an 0002 r=esrf; 0003 IDlen=1.6; 0004 U35elem = atundulator(IDlen,35,'B0andEnergy',[0.4 6.04e9]); 0005 0006 %esrf_U35 = add_ID(r,U35elem); 0007 0008 ringID={U35elem{:},r{:}}; 0009 %ringID=ringID{:}; 0010 0011 driftInd=findcells(ringID,'FamName','SDHI'); 0012 ringID{driftInd(1)}.Length=ringID{driftInd(1)}.Length-IDlen/2; 0013 ringID{driftInd(end)}.Length=ringID{driftInd(end)}.Length-IDlen/2; 0014 0015 0016 %compute optics with and without kick map 0017 [p0,t0]=atlinopt(r,0,1); 0018 [pU35,tU35]=atlinopt(ringID,0,1); 0019 0020 %write out tune change due to undulator 0021 t0-tU35