Home > lattice > element_creation > atcorrector.m

atcorrector

PURPOSE ^

ATCORRECTOR creates a drift space element with class 'Corrector'

SYNOPSIS ^

function elem=atcorrector(fname,varargin)

DESCRIPTION ^

ATCORRECTOR creates a drift space element with class 'Corrector'

  ATCORRECTOR(FAMNAME,LENGTH,KICK,PASSMETHOD)
    
  FAMNAME        family name
  LENGTH            length [m]
  KICK           [hor. kick vert. kick] [rad]
  PASSMETHOD     tracking function, defaults to 'CorrectorPass'

  ATCORRECTOR(FAMNAME,LENGTH,KICK,PASSMETHOD,'FIELDNAME1',VALUE1,...)
   Each pair {'FIELDNAME',VALUE} is added to the element

  See also ATQUADRUPOLE, ATSEXTUPOLE, ATSBEND, ATRBEND
           ATMULTIPOLE, ATTHINMULTIPOLE, ATMARKER

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function elem=atcorrector(fname,varargin)
0002 %ATCORRECTOR creates a drift space element with class 'Corrector'
0003 %
0004 %  ATCORRECTOR(FAMNAME,LENGTH,KICK,PASSMETHOD)
0005 %
0006 %  FAMNAME        family name
0007 %  LENGTH            length [m]
0008 %  KICK           [hor. kick vert. kick] [rad]
0009 %  PASSMETHOD     tracking function, defaults to 'CorrectorPass'
0010 %
0011 %  ATCORRECTOR(FAMNAME,LENGTH,KICK,PASSMETHOD,'FIELDNAME1',VALUE1,...)
0012 %   Each pair {'FIELDNAME',VALUE} is added to the element
0013 %
0014 %  See also ATQUADRUPOLE, ATSEXTUPOLE, ATSBEND, ATRBEND
0015 %           ATMULTIPOLE, ATTHINMULTIPOLE, ATMARKER
0016 
0017 [rsrc,L,kick,method] = decodeatargs({0,[0 0],'CorrectorPass'},varargin);
0018 [L,rsrc]             = getoption(rsrc,'Length',L);
0019 [kick,rsrc]          = getoption(rsrc,'KickAngle',kick);
0020 [method,rsrc]        = getoption(rsrc,'PassMethod',method);
0021 [cl,rsrc]            = getoption(rsrc,'Class','Corrector');
0022 elem                 = atbaselem(fname,method,'Class',cl,'Length',L,'KickAngle',kick,rsrc{:});
0023 end

Generated on Thu 24-Aug-2017 18:47:33 by m2html © 2005