source: MML/trunk/machine/SOLEIL/StorageRing/insertions/Analyse_Bump_InVac_chams.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: 1.3 KB
Line 
1function Analyse_Bump_InVac_chams(IDName,SESSION,Xmin,Xmax,Step,gap,gapmax,BPMtoskip)
2% Calculate the field Integrals (Ix and Iz) for Horizontal Bumps inside the ID from the orbits previously stored
3% in the folder SESSION. The data in the folder SESSION must be saved in the following format: "BUMP_Xmm_GY.mat"
4% IDName: Name of the ID including the name of the BL
5% SESSION: Folder where the orbit data are saved
6% Xmin, Xmax, Step: extrema values and step of the Bumps in X (mm)
7% gap: gap of the ID
8% gapmax: maximum gap of the ID (Background gap)
9% Example: Analyse_Bump_InVac('U20_SWING','SESSION_22_03_2010',-3,3,1,5.5,30, [49,50])
10
11fprintf ('%s\n','----------------------------------------------')
12fprintf ('%s\n','Entrefer[mm]      Bump[mm]         IX[G.m]         IZ[G.m]')
13for X=Xmin:Step:Xmax
14    FileName=['BUMP_' Num2Str(X) 'mm_G' Num2Str(10*gap)];
15    Bckg=['BUMP_' Num2Str(X) 'mm_G' Num2Str(10*gapmax)];
16    Path=['/home/operateur/GrpGMI/' IDName '/' SESSION];
17    PathAndFileName=[Path '/' FileName];
18    PathAndBckg=[Path '/' Bckg];
19    st =idCalcFldIntFromElecBeamMeasForUndSOLEIL_1(IDName,Path,PathAndFileName,PathAndBckg,'',BPMtoskip,0,0);
20    IntegralX=st.I1X;
21    IntegralZ=st.I1Z;
22
23    fprintf('%8.4f\t %8.4f\t %8.4f\t %8.4f\n',gap,X,IntegralX,IntegralZ);
24end
25fprintf ('%s\n','----------------------------------------------')
26end
Note: See TracBrowser for help on using the repository browser.