source: MML/trunk/mml/at/radiationoff.m @ 4

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

Initial import--MML version from SOLEIL@2013

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