source: MML/trunk/mml/golden2sim.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.0 KB
Line 
1function golden2sim(ZeroCMFlag)
2%GOLDEN2SIM - loads online machine configuration to AT configuration
3%  golden2sim(ZeroCMFlag)
4%
5%  ZeroCMFlag = 0 set the machine corrector setting to the simulator
6%               1 zero the correctors in the simulator {Default}
7%
8%  NOTES
9%  1. The RF frequency of the simulator is not changed
10%  2. Use ZeroCMFlag = 1 when you think the corrector magnets on the
11%     online machine are restoring the orbit to the design orbit (or close)
12%
13%  See also machine2sim, sim2machine
14%
15%  Written by Greg Portmann
16
17
18if nargin < 1
19    ZeroCMFlag = 1;
20end
21
22
23% Get from the golden config
24FileName = getfamilydata('OpsData', 'LatticeFile');
25DirectoryName = getfamilydata('Directory', 'OpsData');
26load([DirectoryName FileName]);
27
28
29% Set to the simulator (don't change the simulator RF)
30RFsim = getam('RF','Simulator');
31setmachineconfig(ConfigSetpoint, 'Simulator');
32setsp('RF', RFsim, 'Simulator');
33
34if ZeroCMFlag
35    setsp(gethcmfamily, 0, 'Simulator');
36    setsp(getvcmfamily, 0, 'Simulator');
37end
38
Note: See TracBrowser for help on using the repository browser.