source: MML/trunk/at/atphysics/radiationon.m @ 5

Last change on this file since 5 was 4, checked in by zhangj, 11 years ago

Initial import--MML version from SOLEIL@2013

File size: 941 bytes
Line 
1%RADIATIONON turns classical radiation  ON
2% Switch all magnets currently set to use pass-methods
3% 'BndMPoleSymplectic4Pass' and  'StrMPoleSymplectic4Pass'
4% to their equivalents with classical radiation
5% 'BndMPoleSymplectic4RadPass' and  'StrMPoleSymplectic4RadPass'
6%       
7%   See also RADIATIONOFF, CAVITYON, CAVITYOFF
8
9
10if isempty(whos('global','THERING'))
11   error('Global variable THERING could not be found');
12end
13localindex = findcells(THERING,'PassMethod','StrMPoleSymplectic4Pass');
14THERING = setcellstruct(THERING,'PassMethod',localindex, 'StrMPoleSymplectic4RadPass');
15totalswitched = length(localindex);
16
17localindex = findcells(THERING,'PassMethod','BndMPoleSymplectic4Pass');
18THERING = setcellstruct(THERING,'PassMethod',localindex, 'BndMPoleSymplectic4RadPass');
19totalswitched = totalswitched + length(localindex);
20
21disp(['PassMethod was changed to include radiation in ',num2str(totalswitched),  ' elements'])
22clear localindex
Note: See TracBrowser for help on using the repository browser.