0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 if ~evalin('base','exist(''THERING'')') || ~evalin('base','~isempty(whos(''global'',''THERING''))')
0015 error('Global variable THERING could not be found');
0016 end
0017
0018 localindex = findcells(THERING,'PassMethod','StrMPoleSymplectic4Pass');
0019 THERING = setcellstruct(THERING,'PassMethod',localindex, 'StrMPoleSymplectic4RadPass');
0020 totalswitched = length(localindex);
0021
0022 localindex = findcells(THERING,'PassMethod','BndMPoleSymplectic4Pass');
0023 THERING = setcellstruct(THERING,'PassMethod',localindex, 'BndMPoleSymplectic4RadPass');
0024 totalswitched = totalswitched + length(localindex);
0025
0026 localindex = findcells(THERING,'PassMethod','BndMPoleSymplectic4E2Pass');
0027 THERING = setcellstruct(THERING,'PassMethod',localindex, 'BndMPoleSymplectic4E2RadPass');
0028 totalswitched = totalswitched + length(localindex);
0029
0030 disp(['PassMethod was changed to include radiation in ',num2str(totalswitched), ' elements'])
0031 clear localindex