[4] | 1 | function [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 | |
---|
| 21 | global THERING |
---|
| 22 | |
---|
| 23 | if nargin == 0 |
---|
| 24 | ATIndex = []; |
---|
| 25 | end |
---|
| 26 | |
---|
| 27 | if isempty(ATIndex) |
---|
| 28 | PassMethod = {}; |
---|
| 29 | FamName = {}; |
---|
| 30 | return |
---|
| 31 | end |
---|
| 32 | |
---|
| 33 | if ischar(ATIndex) |
---|
| 34 | if nargin >= 2 |
---|
| 35 | ATIndex = family2atindex(ATIndex, DeviceList); |
---|
| 36 | else |
---|
| 37 | ATIndex = family2atindex(ATIndex); |
---|
| 38 | end |
---|
| 39 | end |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | % Output |
---|
| 43 | PassMethod = getcellstruct(THERING, 'PassMethod', ATIndex); |
---|
| 44 | FamName = getcellstruct(THERING, 'FamName', ATIndex); |
---|
| 45 | |
---|
| 46 | if length(PassMethod) == 1 |
---|
| 47 | PassMethod = PassMethod{1}; |
---|
| 48 | FamName = FamName{1}; |
---|
| 49 | end |
---|