Home > mml > at > radiationoff.m

radiationoff

PURPOSE ^

RADIATIONOFF - Turns classical radiation off in the model

SYNOPSIS ^

function varargout = radiationoff(varargin)

DESCRIPTION ^

RADIATIONOFF - Turns classical radiation off in the model
  Switch all magnets currently set to use pass-methods
  'BndMPoleSymplectic4RadPass' and  'StrMPoleSymplectic4RadPass'
  to their equivalents without radiation
  'BndMPoleSymplectic4Pass' and  'StrMPoleSymplectic4Pass'
    
   See also RADIATIONON, CAVITYON, CAVITYOFF

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function varargout = radiationoff(varargin)
0002 %RADIATIONOFF - Turns classical radiation off in the model
0003 %  Switch all magnets currently set to use pass-methods
0004 %  'BndMPoleSymplectic4RadPass' and  'StrMPoleSymplectic4RadPass'
0005 %  to their equivalents without radiation
0006 %  'BndMPoleSymplectic4Pass' and  'StrMPoleSymplectic4Pass'
0007 %
0008 %   See also RADIATIONON, CAVITYON, CAVITYOFF
0009 
0010 if ~evalin('base','exist(''THERING'')') | ~evalin('base','isglobal(THERING)');
0011    error('Global variable THERING could not be found');
0012 end
0013 
0014 global THERING
0015 
0016 localindex = findcells(THERING,'PassMethod','StrMPoleSymplectic4RadPass');
0017 THERING = setcellstruct(THERING,'PassMethod',localindex, 'StrMPoleSymplectic4Pass');
0018 totalswitched = length(localindex);
0019 
0020 localindex = findcells(THERING,'PassMethod','BndMPoleSymplectic4RadPass');
0021 THERING = setcellstruct(THERING,'PassMethod',localindex, 'BndMPoleSymplectic4Pass');
0022 totalswitched = totalswitched + length(localindex);
0023 
0024 disp(['PassMethod was changed to NOT include radiation in ',num2str(totalswitched),  ' elements'])     
0025 clear localindex

Generated on Mon 21-May-2007 15:29:18 by m2html © 2003