Home > atphysics > Radiation > radiationon.m

radiationon

PURPOSE ^

RADIATIONON turns classical radiation ON

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

RADIATIONON turns classical radiation  ON

  Switch all magnets currently set to use pass-methods
  'BndMPoleSymplectic4Pass' and  'StrMPoleSymplectic4Pass'
  to their equivalents with classical radiation
  'BndMPoleSymplectic4RadPass' and  'StrMPoleSymplectic4RadPass'

  NOTES:
    1. Deprecated function, use atradon instead
    
   See also RADIATIONOFF, CAVITYON, CAVITYOFF, ATRADON, ATRADOFF

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %RADIATIONON turns classical radiation  ON
0002 %
0003 %  Switch all magnets currently set to use pass-methods
0004 %  'BndMPoleSymplectic4Pass' and  'StrMPoleSymplectic4Pass'
0005 %  to their equivalents with classical radiation
0006 %  'BndMPoleSymplectic4RadPass' and  'StrMPoleSymplectic4RadPass'
0007 %
0008 %  NOTES:
0009 %    1. Deprecated function, use atradon instead
0010 %
0011 %   See also RADIATIONOFF, CAVITYON, CAVITYOFF, ATRADON, ATRADOFF
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

Generated on Thu 24-Aug-2017 18:47:33 by m2html © 2005