Changeset 5 in MML for trunk/at/atphysics/fitchrom2.m


Ignore:
Timestamp:
Dec 18, 2013, 12:39:15 PM (10 years ago)
Author:
zhangj
Message:

ThomX MML version on the LAL server @ 17/12/2013

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore set to
      chromMML.txt
  • trunk/at/atphysics/fitchrom2.m

    r4 r5  
    1 function varargout =  fitchrom2(newchrom, sextfam1, sextfam2, varargin)
     1function [FinalS1,FinalS2] =  fitchrom2(newchrom, sextfam1, sextfam2, varargin)
     2%function varargout =  fitchrom2(newchrom, sextfam1, sextfam2, varargin)
    23%FITCHROM2 fits chromaticity  of THERING using 2 sextupole families
    34%  FITCHROM2(NEWCHROM,SEXTUPOLEFAMILY1,SEXTUPOLEFAMILY2)
     
    2324%  MARCH 25, 2005 - Take into account thin sextupoles
    2425%                 - Display Flag
     26%
     27%
     28%   Modified by Jianfeng Zhang 30/09/2013 @ LAL
     29%   Display the sextupole strengths after correction.
     30%
     31
    2532
    2633DisplayFlag = 1;
     
    107114end
    108115
     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 
    109121%% Display how good is the fit
    110122if DisplayFlag
     
    112124    [tune xi] = tunechrom(THERING,0,'chrom');
    113125    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));
    114129end
Note: See TracChangeset for help on using the changeset viewer.