1 | function 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 | |
---|
11 | fprintf ('%s\n','----------------------------------------------') |
---|
12 | fprintf ('%s\n','Entrefer[mm] Bump[mm] IX[G.m] IZ[G.m]') |
---|
13 | for 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); |
---|
24 | end |
---|
25 | fprintf ('%s\n','----------------------------------------------') |
---|
26 | end |
---|