source: MML/trunk/mml/getnumberofsectors.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: 429 bytes
Line 
1function N = getnumberofsectors
2%GETNUMBEROFSECTORS - Number of sectors in the lattice
3%  N = getnumberofsectors
4
5%
6% Written By Gregory J. Portmann
7
8% Get the sectors from the device list.
9% Guess at a few family names.
10
11List = family2dev(gethcmfamily);
12if isempty(List)
13    List = family2dev(gethbpmfamily);
14end
15if isempty(List)
16    List = family2dev('BEND');
17end
18
19
20if isempty(List)
21    N = 1;
22else
23    N = max(List(:,1));
24end
Note: See TracBrowser for help on using the repository browser.