Skip to content

Commit

Permalink
AT_2_Elegant changes N_KICKS to N_SLICES; adds RingParam (#762)
Browse files Browse the repository at this point in the history
changes N_KICKS to N_SLICES; adds RingParam
  • Loading branch information
oscarxblanco committed May 16, 2024
1 parent 714c2e6 commit ef82172
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions atmat/lattice/Converters/AT2Elegant/AT_2_Elegant.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function AT_2_Elegant(AT_ring,linename)
' DY= ' num2str(-1*el.('T1')(3),form) ', &\n' ] ;
end
di= [di ...
' N_KICKS= 40 \n'...
' N_SLICES= 40 \n'...
];
elelat=[elelat di '\n']; %#ok<*AGROW>

Expand All @@ -73,7 +73,7 @@ function AT_2_Elegant(AT_ring,linename)
' DY= ' num2str(-1*el.('T1')(3),form) ', &\n' ] ;
end
qp= [qp ...
' N_KICKS= 40 \n'...
' N_SLICES= 40 \n'...
];

elelat=[elelat qp '\n'];
Expand All @@ -91,7 +91,7 @@ function AT_2_Elegant(AT_ring,linename)
if(isfield(el,'Tilt'))
sx = [ sx ' TILT= ' num2str(el.('Tilt')) ', &\n' ];
end
sx = [ sx ' N_KICKS= 40 \n'];
sx = [ sx ' N_SLICES= 40 \n'];

elelat=[elelat sx '\n'];
case 'Octupole' % octupole
Expand All @@ -107,7 +107,7 @@ function AT_2_Elegant(AT_ring,linename)
if(isfield(el,'Tilt'))
sx = [ sx ' TILT= ' num2str(el.('Tilt')) ', &\n' ];
end
sx = [ sx ' N_KICKS= 40 \n'];
sx = [ sx ' N_SLICES= 40 \n'];

elelat=[elelat sx '\n'];
case 'Multipole'
Expand All @@ -129,13 +129,13 @@ function AT_2_Elegant(AT_ring,linename)
if(isfield(el,'Tilt'))
mp = [ mp ' TILT= ' num2str(el.('Tilt')) ', &\n' ];
end
mp = [ mp ' N_KICKS= 40 \n'];
mp = [ mp ' N_SLICES= 40 \n'];

elelat=[elelat mp '\n'];
case 'Monitor' % bpm
pu=[el.('FamName') ' : MONI, L= ' num2str(el.('Length'),form) ' \n'];
elelat=[elelat pu '\n'];
case 'Marker'% marker
case {'Marker','RingParam'}% Marker, or, RingParam
mrk=[el.('FamName') ' :MARK' ' \n'...
];
elelat=[elelat mrk '\n'];
Expand Down

0 comments on commit ef82172

Please sign in to comment.