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:
682 bytes
|
Line | |
---|
1 | %CAVITYOFF turns Cavities OFF |
---|
2 | % Sets PassMethod to DriftPass or IdentityPass depending |
---|
3 | % on the value of 'Length' field |
---|
4 | % |
---|
5 | % See also CAVITYON, RADIATIONON, RADIATIONOFF |
---|
6 | |
---|
7 | if isempty(whos('global','THERING')) |
---|
8 | error('Global variable THERING could not be found'); |
---|
9 | end |
---|
10 | localcavindex = findcells(THERING,'Frequency'); |
---|
11 | |
---|
12 | if isempty(localcavindex) |
---|
13 | disp('No cavities were found in the lattice'); |
---|
14 | end |
---|
15 | |
---|
16 | |
---|
17 | for ii = localcavindex |
---|
18 | if THERING{ii}.Length == 0; |
---|
19 | THERING{ii}.PassMethod = 'IdentityPass'; |
---|
20 | else |
---|
21 | THERING{ii}.PassMethod = 'DriftPass'; |
---|
22 | end |
---|
23 | end |
---|
24 | |
---|
25 | disp(strcat('Cavities located at index [',num2str(localcavindex), '] were turned OFF')) |
---|
26 | clear ii localcavindex |
---|
Note: See
TracBrowser
for help on using the repository browser.