1 | function [BetaX, BetaY, Sx, Sy, Tune] = modelbeta(varargin) |
---|
2 | %MODELBETA - Returns the beta function of the model |
---|
3 | % [BetaX, BetaY, Sx, Sy, Tune] = modelbeta(Family1, DeviceList1, Family2, DeviceList2) |
---|
4 | % [BetaX, BetaY, Sx, Sy, Tune] = modelbeta(Family1, DeviceList1); |
---|
5 | % [BetaX, BetaY, Sx, Sy, Tune] = modelbeta(Family1, Family2) |
---|
6 | % [BetaX, BetaY, Sx, Sy, Tune] = modelbeta('All'); |
---|
7 | % |
---|
8 | % INPUTS |
---|
9 | % 1. Family1 and Family2 are the family names for where to measure the horizontal/vertical beta function. |
---|
10 | % A family name can be a middlelayer family or an AT family. 'All' returns beta at every element in |
---|
11 | % the model plus the end. {Default or []: 'All'} |
---|
12 | % 2. DeviceList1 and DeviceList2 are the device list corresponding to Family1 and Family2 |
---|
13 | % {Default or []: the entire list} |
---|
14 | % |
---|
15 | % OUTPUTS |
---|
16 | % 1. BetaX and BetaY - Horizontal and vertical beta function [meters] |
---|
17 | % 2. Sx and Sy are longitudinal locations in the ring [meters] |
---|
18 | % 3. Tune |
---|
19 | % |
---|
20 | % NOTE |
---|
21 | % 1. Family1 and DeviceList1 can be any family. For instance, if Family1='VCM' |
---|
22 | % and DeviceList1=[], then BetaX is the horizontal beta function at the |
---|
23 | % vertical corrector magnets (similarly for Family2 and DeviceList2). |
---|
24 | % 2. If no output exists, the beta function will be plotted to the screen. |
---|
25 | % 3. Calls modeltwiss |
---|
26 | % |
---|
27 | % See also modeltwiss, modeltune, modeldisp, modelchro |
---|
28 | % |
---|
29 | % Written by Greg Portmann |
---|
30 | |
---|
31 | if nargout == 0 |
---|
32 | modeltwiss('beta', varargin{:}); |
---|
33 | elseif nargout < 5 |
---|
34 | [BetaX, BetaY, Sx, Sy] = modeltwiss('beta', varargin{:}); |
---|
35 | else |
---|
36 | [BetaX, BetaY, Sx, Sy, Tune] = modeltwiss('beta', varargin{:}); |
---|
37 | end |
---|