Skip to content

Commit

Permalink
Added new FFS final triplet quads Q0FF, Q1FF & Q2FF. Removed QFF4. Ne…
Browse files Browse the repository at this point in the history
…w quads locations matched to metrology measurements.
  • Loading branch information
whitegr committed May 17, 2021
1 parent 14d1632 commit d04a5e9
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 42 deletions.
Binary file modified Lucretia/models/FACET2e/FACET2e.mat
Binary file not shown.
2 changes: 1 addition & 1 deletion Lucretia/scripts/FACET2e_lucretia.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
Initial.SigPUncorrel=0.135*0.1e-2;

% Set default Sector 20 optics
match_S20(Initial,"Phase1",1);
match_S20(Initial,"Phase2",1);
T=TwissPlot(1,length(BEAMLINE),Initial,[1 1 0]);

% S-band structure apertures
Expand Down
23 changes: 10 additions & 13 deletions Lucretia/scripts/match_S20.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
% Initial : Lucretia Initial structire from loaded repository model
%
% ConfigurationName :
% "Phase1" - beta* = 50cm for KPP verification
% "Phase2" - beta* = 50cm for KPP verification
% "PWFA_15cm" - PWFA oven IP (PENT), beta*_x,y = 15cm
% "PWFA_50cm" - PWFA oven IP (PENT), beta*_x,y = 50cm
% "PWFA_100cm" - PWFA oven IP (PENT), beta*_x,y = 100cm
Expand Down Expand Up @@ -64,9 +64,8 @@
psno=1:5;
ConfigName = lower(string(ConfigName)) ;
switch ConfigName
case "phase1"
psno=1:4;
ipbeta=[15 15];
case "phase2"
ipbeta=[0.5 0.5];
case "pwfa_15cm"
ipbeta=[0.15 0.15];
case "pwfa_50cm"
Expand Down Expand Up @@ -120,8 +119,8 @@
varargout{1}=I;

% Form power supplies for matching magnet strengths
if ConfigName=="phase1"
qm={'QFF1*' 'QFF2*' 'QFF4*' 'QFF6*'};
if ConfigName=="phase2"
qm={'QFF1*' 'QFF2*' 'Q2FF*' 'Q1FF*' 'Q0FF*'};
else
qm={'QFF1*' 'QFF2*' 'QFF4*' 'QFF5*' 'QFF6*'};
end
Expand All @@ -131,7 +130,7 @@
end
MovePhysicsVarsToPS(1:length(PS));

if ConfigName=="sfqed" || ConfigName~="phase1"
if ConfigName=="sfqed" || ConfigName~="phase2"
for ips=1:length(PS)
PS(ips).Ampl=0; PS(ips).SetPt=0;
for iele=PS(ips).Element
Expand All @@ -155,10 +154,8 @@
M.optimDisplay=odisp;
M.addMatch(ipele,'alpha_x',0,0.0001);
M.addMatch(ipele,'alpha_y',0,0.0001);
% if ConfigName~="phase1"
M.addMatch(ipele,'beta_x',ipbeta(1),0.0001);
M.addMatch(ipele,'beta_y',ipbeta(2),0.0001);
% end
M.addMatch(ipele,'beta_x',ipbeta(1),0.0001);
M.addMatch(ipele,'beta_y',ipbeta(2),0.0001);
M.doMatch();
if strcmp(odisp,'iter')
disp(M);
Expand Down Expand Up @@ -253,7 +250,7 @@
iele=findcells(BEAMLINE,'Name',qm{ips});
fprintf('K%s := %g\n',BEAMLINE{iele(1)}.Name,BEAMLINE{iele(1)}.B/(BEAMLINE{iele(1)}.L*Cb*BEAMLINE{iele(1)}.P));
end
bmax=[uval.*10 440 440];
bmax=[uval.*10 440 440 440];
for ips=1:length(qm)
iele=findcells(BEAMLINE,'Name',qm{ips});
fprintf('BDES %s := %.1f (BMAX = %.1f) \n',BEAMLINE{iele(1)}.Name,10*sum(arrayfun(@(x) BEAMLINE{x}.B,iele)),bmax(ips));
Expand All @@ -267,7 +264,7 @@
end
% Show FFS magnets in format for import into FFS_magnets.xlsx
iv=IVB; % current lookup object
magnames={'QFF1*' 'QFF2*' 'QFF4*' 'QFF6*' 'Q0D' 'Q1D' 'Q2D'};
magnames={'QFF1*' 'QFF2*' 'Q2FF*' 'Q1FF*' 'Q0FF*' 'Q0D' 'Q1D' 'Q2D'};
disp(magnames)
for ips=1:length(magnames)
iele=findcells(BEAMLINE,'Name',magnames{ips});
Expand Down
56 changes: 28 additions & 28 deletions MAD/LI20.xsif
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@

! *** FACET-II Sector 20 ***
! "Phase 2" FFS installation with 0.5m IP beta functions

! ==============================================================================
! FACET e- optics
! ------------------------------------------------------------------------------
! 17-MAY-2021, G. White
! * Removed QFF4, inserted Q0FF, Q1FF & Q2FF
! - z locations measured by metrology: see FACET elog 05/05/2021
! 17-APR-2021, G. White
! * Fixed as-installed Q0D, Q1D, Q2D locations: measurements by Georg
! * Added all current expt table and spectrometer table devices according to
Expand Down Expand Up @@ -442,22 +446,25 @@
LQS := 1.0
AQS := 27.0e-3

KQFF1 := 0.603542
KQFF2 := -0.262506
KQFF4 := 0.313259
KQFF6 := -0.119329
KQ0D := -0.225449
KQ1D := 0.401691
KQ2D := -0.225449
KQFF1 := 0.235988
KQFF2 := -0.269377
KQ2FF := 0.725752
KQ1FF := -1.09179
KQ0FF := 0.4
KQ0D := -0.321363
KQ1D := 0.533683
KQ2D := -0.321363

QFF1 : QUAD, TYPE="0.813Q17.7", L=LQFF1/2, APER=AQFF1, K1=KQFF1
QFF2_1 : QUAD, TYPE="0.813Q17.7", L=LQFF2/2, APER=AQFF2, K1=KQFF2
QFF2_2 : QUAD, TYPE="0.813Q17.7", L=LQFF2/2, APER=AQFF2, K1=KQFF2
QFF2_3 : QUAD, TYPE="0.813Q17.7", L=LQFF2/2, APER=AQFF2, K1=KQFF2
QFF4_1 : QUAD, TYPE="1.625Q27.3", L=LQFF4/2, APER=AQFF4, K1=KQFF4
QFF4_2 : QUAD, TYPE="1.625Q27.3", L=LQFF4/2, APER=AQFF4, K1=KQFF4
DQFF5 : DRIF, L=LQFF5 ! space where removed QFF5 magnet was removed from
QFF6 : QUAD, TYPE="1.625Q27.3", L=LQFF6/2, APER=AQFF6, K1=KQFF6
Q0FF: QUADRUPOLE,K1=KQ0FF,L=0.3571,APERTURE=0.0186,TYPE="1.625Q27.3"
Q1FF: QUADRUPOLE,K1=KQ1FF,L=0.3571,APERTURE=0.0186,TYPE="1.625Q27.3"
Q2FF: QUADRUPOLE,K1=KQ2FF,L=0.3571,APERTURE=0.0186,TYPE="1.625Q27.3"
! Q3FF: QUADRUPOLE,K1=KQ3FF,L=0.3571,APERTURE=0.0186,TYPE="1.625Q27.3"
! Q4FF: QUADRUPOLE,K1=KQ4FF,L=0.3571,APERTURE=0.0186,TYPE="1.625Q27.3"
! Q5FF: QUADRUPOLE,K1=KQ5FF,L=0.2304,APERTURE=0.0083,TYPE="0.813Q17.7"

! spectrometer:
Q0D: QUADRUPOLE,K1=KQ0D,L=0.5,APERTURE=AQS,TYPE="2.13Q38.31"
Expand Down Expand Up @@ -759,11 +766,10 @@
LAIRh : DRIF, L=0.482/COS(ABD)
LAIRi : DRIF, L=1.0106/COS(ABD)
LAIRj : DRIF, L=1.67269/COS(ABD)

DMQ5FF: DRIFT,L=0.0833
DMQ4FF: DRIFT,L=0.2049
DMQ3FF: DRIFT,L=0.176336
DMQ2FF: DRIFT,L=0.2049

D3FF: DRIFT,L=2.966226
D2FF: DRIFT,L=0.86484
D1FF: DRIFT,L=0.8639
DMQ0FF: DRIFT,L=0.204852
DMQ0D: DRIFT,L=0.202439
DMQ1D: DRIFT,L=0.356564
Expand All @@ -787,7 +793,7 @@
LAIRG: DRIFT,L=1.675292936069446

! Experiment table drifts
DEX20_1 : DRIF, L=0.983380841076041
DEX20_1 : DRIF, L=0.072982138228781
DEX20_2 : DRIF, L=0.26
DEX20_3 : DRIF, L=0.1
DEX20_4 : DRIF, L=0.06
Expand Down Expand Up @@ -859,8 +865,9 @@
M11E : MONI, TYPE="R45"
M1FF : MONI, TYPE="R45"
M2FF : MONI, TYPE="R45"
M3FF : MONI, TYPE="R45"
M4FF : MONI, TYPE="R0"
M3FF : MONI
M4FF : MONI
M5FF : MONI
M0EX : MONI, TYPE="R45"
M1EX : MONI, TYPE="R45"
M2EX : MONI, TYPE="R45"
Expand Down Expand Up @@ -1086,9 +1093,6 @@
QFF2_1_full : LINE=(QFF2_1,QFF2_1)
QFF2_2_full : LINE=(QFF2_2,QFF2_2)
QFF2_3_full : LINE=(QFF2_3,QFF2_3)
QFF4_1_full : LINE=(QFF4_1,QFF4_1)
QFF4_2_full : LINE=(QFF4_2,QFF4_2)
QFF6_full : LINE=(QFF6,QFF6)

FF : LINE=(BEGFF20,DFF1,MFFF,&
QFF1_full,DM1QF,M1FF,DFF2CMa,BL20_4,DFF2CMb,&
Expand All @@ -1097,12 +1101,8 @@
QFF2_1_full,DQ2FFM1,M2FF,DQ2FFM2,&
QFF2_2_full,DQ2FF,&
QFF2_3_full,DYC2QF,DYC2FF,YC2FF,DYC2FF,DYC2XC2F,DXC2FF,DXC2PF,USTHz,&
DBMARK67,DFF4P,DSTHz,DYC3PF,DYC3FF,DYC3XC3F,DXC3FF,XC3FF,DXC3FF,DXC3QF,&
QFF4_1_full,DQ4FFM1,M3FF,DQ4FFM2,&
QFF4_2_full,DFF5A,DXC4FF,XC4FF,DXC4FF,DFF5B,&
DQFF5,DFF6A,DYC4FF,YC4FF,DYC4FF,DFF6B,&
QFF6_full,&
ENDFF20)
DBMARK67,DFF4P,DSTHz,DYC3PF,DYC3FF,DYC3XC3F,DXC3FF,XC3FF,D3FF,&
Q2FF,Q2FF,M3FF,D2FF,Q1FF,Q1FF,M4FF,D1FF,Q0FF,Q0FF,M5FF,DMQ0FF,ENDFF20)

EXPT : LINE=(BEGEXPT20,&
DEX20_1,EXTHOLE1,DEX20_2,USOTR,DEX20_3,IQMON20,DEX20_4,BEWIN,DEX20_5,LCUBE,&
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Lattice files for the FACET-II accelerator


CHANGELOG:
* 05/05/2021, G. White: Added Q0FF, Q1FF, Q2FF, removed QFF4, locations according to metrology mesurements
* 04/17/2021, G. White: Fixed LI19 corrector locations, removed 19-8a and updated S20 experiment object locations @ Q0-2D quad locations
* 02/25/2021, G. White & M. Woodley: changes to reflect in-tunnel hardware for INJ, BC11, BC14 & S20 (see MAD xsif files for details)
* 11/05/2020, G. White: Added model-independent data directory for storing e.g. Beam stay clear data
Expand Down

0 comments on commit d04a5e9

Please sign in to comment.