source: MML/trunk/machine/SOLEIL/StorageRing/insertions/InVac_CalculateCorrCur.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: 752 bytes
Line 
1function Result=InVac_CalculateCorrCur(UndName,OrbitStructFullName, RefStName)
2
3
4   
5    BPMToSkip = -1;
6    global CHE
7    global CHS
8    global CVE
9    global CVS
10    [mCorRespX, mCorRespZ] = InVac_CalcCorRespMatr(UndName, 0, ['/home/operateur/GrpGMI/' UndName]);
11
12    %[mCorRespX, mCorRespZ] = idCalcCorRespMatr('HU640_DESIRS', 0, '/home/operateur/GrpGMI/HU640_DESIRS/CORRECTEURS_ACTIFS');
13    StMeas=load(OrbitStructFullName);
14    X=StMeas.X;
15    Z=StMeas.Z;
16    RefStMeas=load(RefStName);
17    XR=RefStMeas.X;
18    ZR=RefStMeas.Z;
19    ResV=-idLeastSqLinFit(mCorRespZ, Z-ZR, BPMToSkip);
20    CVE=ResV(1);
21    CVS=ResV(2);
22    ResV=-idLeastSqLinFit(mCorRespX, X-XR, BPMToSkip);
23    CHE=ResV(1);
24    CHS= ResV(2);
25   
26    Result=[CHE, CHS, CVE, CVS];
Note: See TracBrowser for help on using the repository browser.