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 | |
---|
1 | function 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 | |
---|
13 | GeV = []; |
---|
14 | |
---|
15 | global THERING |
---|
16 | |
---|
17 | % Look for .Energy |
---|
18 | ATCavityIndex = findcells(THERING, 'Energy'); |
---|
19 | |
---|
20 | if ~isempty(ATCavityIndex) |
---|
21 | GeV = THERING{ATCavityIndex(1)}.Energy / 1e+009; |
---|
22 | end |
---|
23 | |
---|
24 | if isempty(GeV) |
---|
25 | % Note: this will be obsolete in the future |
---|
26 | global GLOBVAL |
---|
27 | GeV = GLOBVAL.E0 / 1e+009; |
---|
28 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.