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

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

Initial import--MML version from SOLEIL@2013

File size: 1.1 KB
Line 
1function [PassMethod, ATIndex, FamName] = getpassmethod(ATIndex, DeviceList)
2%GETPASSMETHOD - Gets the PassMethod field
3%  [PassMethod, ATIndex, FamName] = getpassmethod(Family, DeviceList)
4%  [PassMethod, ATIndex, FamName] = getpassmethod(ATIndex)
5%  [PassMethod, ATIndex, FamName] = getpassmethod(FamName)
6%
7%  INPUTS
8%  1. Family, ATIndex, FamName
9%  2. DeviceList (optional if using a Family name)
10%
11%  OUTPUTS
12%  1. PassMethod - AT PassMethod field.  String or cell array if more than one.
13%  2. ATIndex - AT index in THERING
14%  3. FamName - AT family name
15%
16%  See also setpassmethod setradiation getcavity setcavity
17%
18%  Written by Greg Portmann
19
20
21global THERING
22
23if nargin == 0
24    ATIndex = [];
25end
26
27if isempty(ATIndex)
28    PassMethod = {};
29    FamName = {};
30    return
31end
32
33if ischar(ATIndex)
34    if nargin >= 2
35        ATIndex = family2atindex(ATIndex, DeviceList);
36    else
37        ATIndex = family2atindex(ATIndex);
38    end
39end
40
41
42% Output
43PassMethod = getcellstruct(THERING, 'PassMethod', ATIndex);
44FamName    = getcellstruct(THERING, 'FamName',    ATIndex);
45
46if length(PassMethod) == 1
47    PassMethod = PassMethod{1};
48    FamName    = FamName{1};
49end
Note: See TracBrowser for help on using the repository browser.