Changeset 5 in MML for trunk/at/atphysics/fitchrom2.m
- Timestamp:
- Dec 18, 2013, 12:39:15 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property
svn:ignore
set to
chromMML.txt
-
Property
svn:ignore
set to
-
trunk/at/atphysics/fitchrom2.m
r4 r5 1 function varargout = fitchrom2(newchrom, sextfam1, sextfam2, varargin) 1 function [FinalS1,FinalS2] = fitchrom2(newchrom, sextfam1, sextfam2, varargin) 2 %function varargout = fitchrom2(newchrom, sextfam1, sextfam2, varargin) 2 3 %FITCHROM2 fits chromaticity of THERING using 2 sextupole families 3 4 % FITCHROM2(NEWCHROM,SEXTUPOLEFAMILY1,SEXTUPOLEFAMILY2) … … 23 24 % MARCH 25, 2005 - Take into account thin sextupoles 24 25 % - Display Flag 26 % 27 % 28 % Modified by Jianfeng Zhang 30/09/2013 @ LAL 29 % Display the sextupole strengths after correction. 30 % 31 25 32 26 33 DisplayFlag = 1; … … 107 114 end 108 115 116 %% Get the final value of the correction sextupole 117 118 FinalS1 = getcellstruct(THERING,'PolynomB',S1I,3); 119 FinalS2 = getcellstruct(THERING,'PolynomB',S2I,3); 120 109 121 %% Display how good is the fit 110 122 if DisplayFlag … … 112 124 [tune xi] = tunechrom(THERING,0,'chrom'); 113 125 fprintf('Reached chromaticities xix=%f xiz=%f\n',xi); 126 127 fprintf('before correction: %s = %f, %s = %f\n', sextfam1,InitialS1(1),sextfam2,InitialS2(1)); 128 fprintf('after correction: %s = %f, %s = %f\n', sextfam1,FinalS1(1),sextfam2,FinalS2(1)); 114 129 end
Note: See TracChangeset
for help on using the changeset viewer.