source: MML/trunk/mml/at/getenergymodel.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: 496 bytes
Line 
1function GeV = getenergymodel
2%GETENERGYMODEL - Returns the model energy in GeV
3% GeV = getenergymodel
4%
5% OUTPUTS
6% 1. GeV - Energy in GeV
7%
8% See Also getenergy
9
10%
11%  Written by Gregory J. Portmann
12
13GeV = [];
14
15global THERING
16
17% Look for .Energy
18ATCavityIndex = findcells(THERING, 'Energy');
19
20if ~isempty(ATCavityIndex)
21    GeV = THERING{ATCavityIndex(1)}.Energy / 1e+009;
22end
23
24if isempty(GeV)
25    % Note: this will be obsolete in the future
26    global GLOBVAL
27    GeV = GLOBVAL.E0 / 1e+009;
28end
Note: See TracBrowser for help on using the repository browser.