Difference between revisions of "Beam Setup and Measurement - May 2018"

From Ciswikidb
Jump to navigation Jump to search
 
(39 intermediate revisions by 2 users not shown)
Line 21: Line 21:
 
| '''Kinetic Energy (MeV)'''
 
| '''Kinetic Energy (MeV)'''
 
| '''Calculated dipole setting (G-cm)'''
 
| '''Calculated dipole setting (G-cm)'''
 +
|-
 +
| 5.84
 +
| 5.35
 +
| 8246.344
 
|-
 
|-
 
| 5.74
 
| 5.74
Line 53: Line 57:
 
:#: p 5.64 MeV/c -> 2D line (-30 deg.) BDL -9437.96774120548 G-cm
 
:#: p 5.64 MeV/c -> 2D line (-30 deg.) BDL -9437.96774120548 G-cm
 
:#Note the Hall probe readback and set up parameters on the MDL0L02 dipole and DTM 151 Digital Teslameter screens (put snapshots in logbook) as this is the reference for the other energy changes.
 
:#Note the Hall probe readback and set up parameters on the MDL0L02 dipole and DTM 151 Digital Teslameter screens (put snapshots in logbook) as this is the reference for the other energy changes.
:#Alternately adjust the quarter cavity 2-7 and 2-8 GSETS in small increments (0.01-0.1) until the BPMs in the 5D line are within 5 mm in x.  Getting them both to zero with good signal is difficult to achieve, and it may be necessary to split the difference (have one positive and the other negative).
+
:#Alternately adjust the quarter cavity 2-7 and 2-8 GSETs in small increments (0.01-0.1) until the BPM absolute positions in the 5D line are within 5 mm in x (aim for less than 5 mm if possible; smaller relative differences are better).  Getting them both to zero with good signal is difficult to achieve, and it may be necessary to split the difference (have one positive and the other negative).
:#Check that the quarter cavities are on crest in the 5D line if possible.  If necessary, put beam in the 2D line to check cresting.
+
:#Adjust, if necessary MBH0L01H/V, to get IPM0L02 to zero in x and y absolute positions.  MHB0L02H/V can be used to move the beam on ITV5D00.
:#If the quarter phases changed, with beam in the 5D line, alternately adjust the 2-7 and 2-8 GSETs in small increments to restore the BPM settings.  If changes are large, iterate phasing and adjusting GSETs steps until changes until changes are negligibly small.
+
:#Check that the quarter cavities are on crest in the 5D line if possible; otherwise, put beam in the 2D line to check cresting.
:#Adjust, if necessary MBH0L01H/V, to get IPM0L02 to zero in x and y.
+
:#If the quarter phases changed, with beam in the 5D line, alternately adjust the 2-7 and 2-8 GSETs in small increments to restore the BPM settings found before cresting.  If changes are large, iterate phasing, steering with MBH0L01H/V t zero IPM0L02, and adjusting GSETs steps until changes are negligibly small.
 
:#Note the position of the beam on the 5D viewers (put snapshots in logbook).
 
:#Note the position of the beam on the 5D viewers (put snapshots in logbook).
 +
:#Zero pos
 +
:#Allsave saying momentum set, intended momentum, and BUBBLE.
 +
:#Log allsave number, cavity GSETs and phases, and BPMs.
 +
:#Centering Beam on X-Ray Screen/Radiator
 +
:##If the X-ray screen is available, steer beam to the center.
 +
:##Zero pos.
 +
:##Do an allsave noting the beam is centered on the radiator (plus the momentum setting and BUBBLE).
  
 
:'''Subsequent energy/momentum changes'''
 
:'''Subsequent energy/momentum changes'''
Line 65: Line 76:
 
:#Calculate B<sub>desired Hall probe</sub>=B<sub>previous Hall probe</sub>+&Delta;B<sub>Hall probe</sub>
 
:#Calculate B<sub>desired Hall probe</sub>=B<sub>previous Hall probe</sub>+&Delta;B<sub>Hall probe</sub>
 
:#Set MDL0L02.BDL to setting from table or MDL0L02_calculator.pl and adjust the setting until the Hall probe is at the desired setting.
 
:#Set MDL0L02.BDL to setting from table or MDL0L02_calculator.pl and adjust the setting until the Hall probe is at the desired setting.
:#Cycle the dipole.
+
:#Cycle the dipole twice.
 
:#Log the Hall probe and dipole readbacks (MDL0L02 dipole and DTM 151 Digital Teslameter screens).
 
:#Log the Hall probe and dipole readbacks (MDL0L02 dipole and DTM 151 Digital Teslameter screens).
 
:#Set the 5D line horizontal correctors to zero.
 
:#Set the 5D line horizontal correctors to zero.
Line 71: Line 82:
 
:#:MBH5D00AH
 
:#:MBH5D00AH
 
:#:MBH5D01H
 
:#:MBH5D01H
:#Alternately adjust the quarter cavity 2-7 and 2-8 GSETs in small increments (0.01-0.1) until the BPMs in the 5D line are within 5 mm in x.  Getting them both to zero with good signal is difficult to achieve, and it may be necessary to split the difference (have one positive and the other negative).
+
:#Alternately adjust the quarter cavity 2-7 and 2-8 GSETs in small increments (0.01-0.1) until the BPM absolute positions in the 5D line are within 5 mm in x.  Getting them both to zero with good signal is difficult to achieve, and it may be necessary to split the difference (have one positive and the other negative).  If the energy is "large", consider inserting the viewer ITV5D00 and adjusting the gradients to get beam on the viewer, and then repeat with ITV5D01.  This should get the energy close, and then steering to the BPMs can be used to fine tune the energy/momentum setting.
:#Adjust, if necessary MBH0L01H/V, to get IPM0L02 to zero in x and y.
+
:#Adjust, if necessary MBH0L01H/V, to get IPM0L02 to zero in x and y in absolute positions.  MHB0L02H/V can be used to move the beam on ITV5D00.
:#Scale the quads by the ratio p<sub>new</sub>/p<sub>previous</sub> id beam spot is too diffuse.
+
:#Scale the quads by the ratio p<sub>new</sub>/p<sub>previous</sub> if beam spot is too diffuse.
 
:#:MQJ0L02
 
:#:MQJ0L02
 +
:#:MQJ0L02A
 
:#:MQD5D00
 
:#:MQD5D00
 
:#:MQD5D01
 
:#:MQD5D01
Line 80: Line 92:
 
:#If the quarter phases changed, with beam in the 5D line, alternately adjust the 2-7 and 2-8 GSETs in small increments to restore the BPM settings.  If changes are large, iterate phasing, 0L01 steering to zero IPM0L02, and adjusting GSETs steps until changes are negligibly small.
 
:#If the quarter phases changed, with beam in the 5D line, alternately adjust the 2-7 and 2-8 GSETs in small increments to restore the BPM settings.  If changes are large, iterate phasing, 0L01 steering to zero IPM0L02, and adjusting GSETs steps until changes are negligibly small.
 
:#Beam should be in the same locations on the 5D line viewers.
 
:#Beam should be in the same locations on the 5D line viewers.
:#Log cavity GSETs and phases.
+
:#Zero pos
 +
:#Allsave saying momentum set, intended momentum, and BUBBLE.
 +
:#Log allsave number, cavity GSETs and phases, and BPMs.
 +
:#Centering Beam on X-Ray Screen/Radiator
 +
:##If the X-ray screen is available, steer beam to the center.
 +
:##Zero pos.
 +
:##Do an allsave noting the beam is centered on the radiator (plus the momentum setting and BUBBLE).
  
 
===Measure energy (optionally energy spread and emittance)===
 
===Measure energy (optionally energy spread and emittance)===
  
:'''Set up for energy measurement'''
+
:'''Set up for energy measurement (not necessary after initial quad centering session)'''
 
:#Check centering in MQJ0L02, MQJ0L03A, MQD5D00, and MQD5D01.
 
:#Check centering in MQJ0L02, MQJ0L03A, MQD5D00, and MQD5D01.
 
:#''Skip this step for the Engineering run.''  Set the 0L correctors to zero.
 
:#''Skip this step for the Engineering run.''  Set the 0L correctors to zero.
Line 95: Line 113:
 
::#Set MDL0L02 to zero and degauss using Degauss script accessible from MDL0L02 dipole screen.
 
::#Set MDL0L02 to zero and degauss using Degauss script accessible from MDL0L02 dipole screen.
 
::#If this is not the first energy measurement, restore the MHB0L02AH/V, MHB0L02BH/V, and MBH0L03H/V corrector settings from the initial energy measurement ('''''allsave 18717''''').  These corrector settings are considered to be fixed and must be restored for each undeflected orbit measurement.
 
::#If this is not the first energy measurement, restore the MHB0L02AH/V, MHB0L02BH/V, and MBH0L03H/V corrector settings from the initial energy measurement ('''''allsave 18717''''').  These corrector settings are considered to be fixed and must be restored for each undeflected orbit measurement.
::#Set magnets on 2D and 3D lines to zero and cycle to eliminate additional sources of stray fields.
+
::#Set magnets on 2D and 3D (Mott Measurement Control) lines to zero and cycle to eliminate additional sources of stray fields.
 
::#:MAD3D00H/V
 
::#:MAD3D00H/V
 
::#:MDT3D00
 
::#:MDT3D00
Line 104: Line 122:
 
::#:MQS0L02B
 
::#:MQS0L02B
 
::#:MQJ0L03A
 
::#:MQJ0L03A
::#Adjust MBH0L01H/V and MHB0L02H/V to restore IPM0L02 and IPM0L03 to zero in x and y if necessary.
+
::#Adjust MBH0L01H/V and MHB0L02H/V to restore IPM0L02 and IPM0L03 to zero in x and y absolute positions if necessary.
::#Do an allsave and in the comment box include the assumed momentum and the keywords "undeflected orbit" or "straight ahead orbit" for energy measurement.
+
::#Zero pos.
 +
::#Do an allsave and in the comment box include the assumed momentum and the keywords "undeflected orbit" or "straight ahead orbit" for energy measurement and BUBBLE.
 
::#Record the undeflected orbit conditions in the logbook.
 
::#Record the undeflected orbit conditions in the logbook.
 
::#:Intended or assumed energy/momentum
 
::#:Intended or assumed energy/momentum
 +
::#:Laser/Slit configuration (slit setting, source laser, etc.)
 
::#:allsave number
 
::#:allsave number
 
::#:MDL0L02 screen
 
::#:MDL0L02 screen
Line 115: Line 135:
 
::#:Quarter cavity gradients
 
::#:Quarter cavity gradients
  
::'''Emittance measurement'''
+
::'''Emittance measurement (additional information is further down the page)'''
::#If necessary, with correctors downstream of MDL0L02, steer beam to zero in x and y on IPM0L03.
+
::#If necessary, with correctors downstream of MDL0L02, steer beam to zero in x and y absolute positions on IPM0L03.
 +
::#Use eDT (Alt) (eDT_alternate) to set MQJ0L02 and MQJ0L02A.
 +
::##Select INJ-R as the endpoint in the box labeled Step 1.
 +
::##In the box labeled Step 2, set the Preinjector momentum to the target value.
 +
::##In the box labeled FILTERS on the right, double click on INJ-L.
 +
::##In the box labeled Step 3, click on GO (i.e. Fetch Elements and Design Setpoints for the selected endpoint).
 +
::##Manually set MQJ0L02 and MQJ0L02A to the Design values shown.
 
::#Perform 0L02 quad/0L03 horizontal and vertical scans and analyze results with qsUtility using
 
::#Perform 0L02 quad/0L03 horizontal and vertical scans and analyze results with qsUtility using
::::'''''/a/opsdata/fiefdata/fileio/q/qsUtility/config/F3-0/Bubble/IHA0L03_x_zigzag_p-5.74_2018_05_11.xml'''''
+
::#:'''''/a/opsdata/fiefdata/fileio/q/qsUtility/config/F3-0/Bubble/IHA0L03_x_zigzag_p-5.74_2018_05_11.xml'''''
::::'''''/a/opsdata/fiefdata/fileio/q/qsUtility/config/F3-0/Bubble/IHA0L03_y_zigzag_p-5.74_2018_05_11.xml'''''
+
::#:'''''/a/opsdata/fiefdata/fileio/q/qsUtility/config/F3-0/Bubble/IHA0L03_y_zigzag_p-5.74_2018_05_11.xml'''''
 +
::#:or similar.  Remember to change the momentum from the default 6.279 MeV/c to the intended momentum in the qsUtility GUI!
 +
::#Back out any quad and steering changes.
 +
::#In the analysis, make sure the back propagate box near the bottom of the screen is set to MQJ0L02.
  
::'''Energy spread harp scan'''
+
::'''Energy spread harp scan (additional information is further down the page)'''
::#Put beam in 2D line.
+
::#Put beam in 2D line using the MDL0L02 dipole.  Any steering must be performed with correctors in the 0L line only.
 +
::#Scale the quads by the ratio p<sub>new</sub>/p<sub>previous</sub> or manually adjust them if beam spot is too diffuse.
 
::#Swipe harp.
 
::#Swipe harp.
::#Log harp swipe and 0L quad settings.
+
::#Log harp swipe and harp expert screen along with 0L quad and MDL0L02 dipole settings.
 +
::#Back out any quad and steering changes.
  
 
::'''Deflected (5D line) orbit data collection for energy measurement'''
 
::'''Deflected (5D line) orbit data collection for energy measurement'''
 +
::#Restore MBH0L01H/V and MHB0L02H/V from the undeflected orbit allsave.
 
::#Set steering coils between MDL0L02 and IPM0L03 to zero.
 
::#Set steering coils between MDL0L02 and IPM0L03 to zero.
 
::#:MHB0L02AH/V
 
::#:MHB0L02AH/V
Line 135: Line 167:
 
::#:MBH5D00AH
 
::#:MBH5D00AH
 
::#:MBH5D01H
 
::#:MBH5D01H
::#Iteratively set and cycle MDL0L02 to establish beam in IPM5D00 and IPM5D01 to within 5 mm in x.  Getting them both to zero with good signal is difficult to achieve, and it may be necessary to split the difference (have one positive and the other negative).
+
::#Set MQJ0L02, MQJ0L02A, MQD5D00, and MQD501 to calculated settings.
 +
::#Iteratively set and cycle MDL0L02 to establish beam in IPM5D00 and IPM5D01 to within 5 mm in x absolute position.  Getting them both to zero with good signal is difficult to achieve, and it may be necessary to split the difference (have one positive and the other negative).
 
::#Cycle MDL0L02.
 
::#Cycle MDL0L02.
::#Do an allsave and in the comment box include the assumed momentum and the keywords "deflected orbit" or "5D orbit" for energy measurement.
+
::#Zero pos the orbit.
 +
::#Do an allsave and in the comment box include the assumed momentum and the keywords "deflected orbit" or "5D orbit" for energy measurement and BUBBLE.
 
::#Record the deflected orbit conditions in the logbook.
 
::#Record the deflected orbit conditions in the logbook.
 
::#:Intended or assumed energy/momentum
 
::#:Intended or assumed energy/momentum
 +
::#:Laser/Slit configuration (slit setting, source laser. etc.)
 
::#:allsave number
 
::#:allsave number
 
::#:MDL0L02 screen
 
::#:MDL0L02 screen
Line 146: Line 181:
 
::#:0L and 5D line correctors and quads
 
::#:0L and 5D line correctors and quads
 
::#:Quarter cavity gradients
 
::#:Quarter cavity gradients
 +
::#Centering Beam on X-Ray Screen/Radiator
 +
::##If the X-ray screen is available, steer beam to the center.
 +
::##Zero pos.
 +
::##Do an allsave noting the beam is centered on the radiator (plus the momentum setting and BUBBLE).
  
 
===Quad centering===
 
===Quad centering===
Line 188: Line 227:
 
#Retract the viewer.
 
#Retract the viewer.
 
#Run Tune beam to get a nice signal on the BPMs.
 
#Run Tune beam to get a nice signal on the BPMs.
#Change BPM SOFs and document in logbook.
+
#Change BPM SOFs if they changed and document in logbook whether or not they changed and by how much if they did.
 
##Note present BPM SOFs.
 
##Note present BPM SOFs.
 
##:caget bpm_name.XSOF
 
##:caget bpm_name.XSOF
Line 208: Line 247:
 
###Restore BPM's monitor deadband if changed previously.
 
###Restore BPM's monitor deadband if changed previously.
 
###:caput bpm_name.MDEL original_MDEL_value
 
###:caput bpm_name.MDEL original_MDEL_value
 +
#If this is not the first quad centering session, back out any steering changes.
  
 
= Emittance Measurement =
 
= Emittance Measurement =
Line 239: Line 279:
 
:: Type command '''''sddsprintout -col=ElementName -col=betax -col=etax energyspread.twi'''''
 
:: Type command '''''sddsprintout -col=ElementName -col=betax -col=etax energyspread.twi'''''
 
:: Record value of betax [m] and etax [m] at IHA2D00
 
:: Record value of betax [m] and etax [m] at IHA2D00
:Calculate relative momentum spread (dp/p)
+
:Calculate relative momentum spread (dp/p=sigma_dp (in elegant)) using the geometric emittance not normalized emittance and &sigma;<sub>x</sub> in m.
::
+
:::(dp/p)=&radic;(&sigma;<sub>x</sub><sup>2</sup>+&beta;<sub>x</sub>&epsilon;<sub>x</sub>)
  
 
= Set Beam Size at Radiator =
 
= Set Beam Size at Radiator =
Line 275: Line 315:
 
::Depending on difficulty of solution may take 20-30 min
 
::Depending on difficulty of solution may take 20-30 min
 
::Terminal output will show result of optimization and desired quad values (in units of K1)
 
::Terminal output will show result of optimization and desired quad values (in units of K1)
::You will need to convert from K1 to integrated field B'L (units of Gauss for EPICS .BL field)
+
::You will need to convert from K1 to integrated field B'L (units of Gauss for EPICS .BDL field)
 
::: '''K1 [1/m^2] = 2.998 * B_EPICS [G] / (L [cm] * p [MeV/c])''' ; note that L=15cm for both QJ and QD quads self-consistently  
 
::: '''K1 [1/m^2] = 2.998 * B_EPICS [G] / (L [cm] * p [MeV/c])''' ; note that L=15cm for both QJ and QD quads self-consistently  
 
::Run also generates a new lattice named NEW.lte (where the quad values have been updated)
 
::Run also generates a new lattice named NEW.lte (where the quad values have been updated)

Latest revision as of 13:17, 17 May 2018

Beamline Survey and Elegant Optics Model

September 2015 - Chris Tennant's Model copied here for reference /usr/opsdata/bubble/elegant/Sep2015
May 2018 - Updated to include 2D spectrometer line and new harp IHA5D01 /usr/opsdata/bubble/elegant/May2018
May 2018 Data Transmital media:DT_L1862.pdf

Operating the Cryounit at 4K

From past experience we have done a couple things...

Communicate to the cryo coordinator before turning on SRF
Generate a strip chart of liquid level, JT valve and the two unit gradients
Adjust the gradients in small enough steps (~0.5) to allow recover equilibrium LL (JT will be larger w/ higher gradient)

Energy Setup and Measurement

Set energy

Momentum (MeV/c) Kinetic Energy (MeV) Calculated dipole setting (G-cm)
5.84 5.35 8246.344
5.74 5.25 8105.146
5.64 5.15 7963.949
5.54 5.05 7822.752
5.44 4.95 7681.557
5.34 4.85 7540.363
5.24 4.75 7399.170
First energy/momentum (p=5.74 MeV/c)
  1. Set MDL0L02.BDL according to the setpoint in the table or from the MDL0L02_calculator.pl in /a/opsdata/bubble/energy.
    > /a/opsdata/bubble/energy/MDL0L02_calculator.pl p 5.64
    p 5.64 MeV/c -> 5D line (25 deg.) BDL 7963.94855360974 G-cm
    p 5.64 MeV/c -> 2D line (-30 deg.) BDL -9437.96774120548 G-cm
  2. Note the Hall probe readback and set up parameters on the MDL0L02 dipole and DTM 151 Digital Teslameter screens (put snapshots in logbook) as this is the reference for the other energy changes.
  3. Alternately adjust the quarter cavity 2-7 and 2-8 GSETs in small increments (0.01-0.1) until the BPM absolute positions in the 5D line are within 5 mm in x (aim for less than 5 mm if possible; smaller relative differences are better). Getting them both to zero with good signal is difficult to achieve, and it may be necessary to split the difference (have one positive and the other negative).
  4. Adjust, if necessary MBH0L01H/V, to get IPM0L02 to zero in x and y absolute positions. MHB0L02H/V can be used to move the beam on ITV5D00.
  5. Check that the quarter cavities are on crest in the 5D line if possible; otherwise, put beam in the 2D line to check cresting.
  6. If the quarter phases changed, with beam in the 5D line, alternately adjust the 2-7 and 2-8 GSETs in small increments to restore the BPM settings found before cresting. If changes are large, iterate phasing, steering with MBH0L01H/V t zero IPM0L02, and adjusting GSETs steps until changes are negligibly small.
  7. Note the position of the beam on the 5D viewers (put snapshots in logbook).
  8. Zero pos
  9. Allsave saying momentum set, intended momentum, and BUBBLE.
  10. Log allsave number, cavity GSETs and phases, and BPMs.
  11. Centering Beam on X-Ray Screen/Radiator
    1. If the X-ray screen is available, steer beam to the center.
    2. Zero pos.
    3. Do an allsave noting the beam is centered on the radiator (plus the momentum setting and BUBBLE).
Subsequent energy/momentum changes
If Hall probe readback is not available or continuously available, follow the procedure for setting the first energy/momentum.
  1. Calculate Δp/p=(pdesired-pprevious)/pprevious
  2. Calculate ΔBHall probe=Bprevious Hall probe(Δp/p)
  3. Calculate Bdesired Hall probe=Bprevious Hall probe+ΔBHall probe
  4. Set MDL0L02.BDL to setting from table or MDL0L02_calculator.pl and adjust the setting until the Hall probe is at the desired setting.
  5. Cycle the dipole twice.
  6. Log the Hall probe and dipole readbacks (MDL0L02 dipole and DTM 151 Digital Teslameter screens).
  7. Set the 5D line horizontal correctors to zero.
    MBH5D00H
    MBH5D00AH
    MBH5D01H
  8. Alternately adjust the quarter cavity 2-7 and 2-8 GSETs in small increments (0.01-0.1) until the BPM absolute positions in the 5D line are within 5 mm in x. Getting them both to zero with good signal is difficult to achieve, and it may be necessary to split the difference (have one positive and the other negative). If the energy is "large", consider inserting the viewer ITV5D00 and adjusting the gradients to get beam on the viewer, and then repeat with ITV5D01. This should get the energy close, and then steering to the BPMs can be used to fine tune the energy/momentum setting.
  9. Adjust, if necessary MBH0L01H/V, to get IPM0L02 to zero in x and y in absolute positions. MHB0L02H/V can be used to move the beam on ITV5D00.
  10. Scale the quads by the ratio pnew/pprevious if beam spot is too diffuse.
    MQJ0L02
    MQJ0L02A
    MQD5D00
    MQD5D01
  11. Check that the quarter cavities are on crest in the 5D line if possible. If necessary, put beam in the 2D line to check cresting.
  12. If the quarter phases changed, with beam in the 5D line, alternately adjust the 2-7 and 2-8 GSETs in small increments to restore the BPM settings. If changes are large, iterate phasing, 0L01 steering to zero IPM0L02, and adjusting GSETs steps until changes are negligibly small.
  13. Beam should be in the same locations on the 5D line viewers.
  14. Zero pos
  15. Allsave saying momentum set, intended momentum, and BUBBLE.
  16. Log allsave number, cavity GSETs and phases, and BPMs.
  17. Centering Beam on X-Ray Screen/Radiator
    1. If the X-ray screen is available, steer beam to the center.
    2. Zero pos.
    3. Do an allsave noting the beam is centered on the radiator (plus the momentum setting and BUBBLE).

Measure energy (optionally energy spread and emittance)

Set up for energy measurement (not necessary after initial quad centering session)
  1. Check centering in MQJ0L02, MQJ0L03A, MQD5D00, and MQD5D01.
  2. Skip this step for the Engineering run. Set the 0L correctors to zero.
Measurements
Note MBH0L01H/V, MHB0L02H/V, and the MDL0L02 dipole settings are the only free "knobs" in the energy measurement portions of the procedure. All other magnet settings have fixed values or are set to zero at different steps in the procedure.
Undeflected (straight ahead) orbit data collection for energy measurement
  1. Set MDL0L02 to zero and degauss using Degauss script accessible from MDL0L02 dipole screen.
  2. If this is not the first energy measurement, restore the MHB0L02AH/V, MHB0L02BH/V, and MBH0L03H/V corrector settings from the initial energy measurement (allsave 18717). These corrector settings are considered to be fixed and must be restored for each undeflected orbit measurement.
  3. Set magnets on 2D and 3D (Mott Measurement Control) lines to zero and cycle to eliminate additional sources of stray fields.
    MAD3D00H/V
    MDT3D00
    MDT3D01
  4. Set skew and normal quads between IPM0L02 and IPM0L03 to zero and cycle.
    MQS0L02
    MQJ0L02A
    MQS0L02B
    MQJ0L03A
  5. Adjust MBH0L01H/V and MHB0L02H/V to restore IPM0L02 and IPM0L03 to zero in x and y absolute positions if necessary.
  6. Zero pos.
  7. Do an allsave and in the comment box include the assumed momentum and the keywords "undeflected orbit" or "straight ahead orbit" for energy measurement and BUBBLE.
  8. Record the undeflected orbit conditions in the logbook.
    Intended or assumed energy/momentum
    Laser/Slit configuration (slit setting, source laser, etc.)
    allsave number
    MDL0L02 screen
    DTM 151 Digital Teslameter screen
    0L BPMs
    0L and 5D line correctors and quads
    Quarter cavity gradients
Emittance measurement (additional information is further down the page)
  1. If necessary, with correctors downstream of MDL0L02, steer beam to zero in x and y absolute positions on IPM0L03.
  2. Use eDT (Alt) (eDT_alternate) to set MQJ0L02 and MQJ0L02A.
    1. Select INJ-R as the endpoint in the box labeled Step 1.
    2. In the box labeled Step 2, set the Preinjector momentum to the target value.
    3. In the box labeled FILTERS on the right, double click on INJ-L.
    4. In the box labeled Step 3, click on GO (i.e. Fetch Elements and Design Setpoints for the selected endpoint).
    5. Manually set MQJ0L02 and MQJ0L02A to the Design values shown.
  3. Perform 0L02 quad/0L03 horizontal and vertical scans and analyze results with qsUtility using
    /a/opsdata/fiefdata/fileio/q/qsUtility/config/F3-0/Bubble/IHA0L03_x_zigzag_p-5.74_2018_05_11.xml
    /a/opsdata/fiefdata/fileio/q/qsUtility/config/F3-0/Bubble/IHA0L03_y_zigzag_p-5.74_2018_05_11.xml
    or similar. Remember to change the momentum from the default 6.279 MeV/c to the intended momentum in the qsUtility GUI!
  4. Back out any quad and steering changes.
  5. In the analysis, make sure the back propagate box near the bottom of the screen is set to MQJ0L02.
Energy spread harp scan (additional information is further down the page)
  1. Put beam in 2D line using the MDL0L02 dipole. Any steering must be performed with correctors in the 0L line only.
  2. Scale the quads by the ratio pnew/pprevious or manually adjust them if beam spot is too diffuse.
  3. Swipe harp.
  4. Log harp swipe and harp expert screen along with 0L quad and MDL0L02 dipole settings.
  5. Back out any quad and steering changes.
Deflected (5D line) orbit data collection for energy measurement
  1. Restore MBH0L01H/V and MHB0L02H/V from the undeflected orbit allsave.
  2. Set steering coils between MDL0L02 and IPM0L03 to zero.
    MHB0L02AH/V
    MHB0L02BH/V
    MBH0L03H/V
  3. Set the 5D line horizontal correctors to zero.
    MBH5D00H
    MBH5D00AH
    MBH5D01H
  4. Set MQJ0L02, MQJ0L02A, MQD5D00, and MQD501 to calculated settings.
  5. Iteratively set and cycle MDL0L02 to establish beam in IPM5D00 and IPM5D01 to within 5 mm in x absolute position. Getting them both to zero with good signal is difficult to achieve, and it may be necessary to split the difference (have one positive and the other negative).
  6. Cycle MDL0L02.
  7. Zero pos the orbit.
  8. Do an allsave and in the comment box include the assumed momentum and the keywords "deflected orbit" or "5D orbit" for energy measurement and BUBBLE.
  9. Record the deflected orbit conditions in the logbook.
    Intended or assumed energy/momentum
    Laser/Slit configuration (slit setting, source laser. etc.)
    allsave number
    MDL0L02 screen
    DTM 151 Digital Teslameter screen
    5D BPMs
    0L and 5D line correctors and quads
    Quarter cavity gradients
  10. Centering Beam on X-Ray Screen/Radiator
    1. If the X-ray screen is available, steer beam to the center.
    2. Zero pos.
    3. Do an allsave noting the beam is centered on the radiator (plus the momentum setting and BUBBLE).

Quad centering

Quad BPM Correctors Viewer
MQJ0L02 IPM0L02 MHB0L01AH/V ITV0L03
MQJ0L03A MHB0L02AH/V, MHB0L02BH/V (most effective), MBH0L03H/V (not too useful) IPM0L03 ITV0L04
MQD5D00 MBH5D00H/V IPM5D00 ITV5D01
MQD5D01 MBH5D00AH/V IPM5D01 ITV5D01
  1. Insert viewer.
  2. Use Ditherer to change quad setting.
    1. Set the signal to the quad_name.BDL.
    2. Toggle the "Step Size (%)" button to "Set Step Size (abs)" and set the step to 30-50 G.
    3. Set the "Delay (sec)" to 1.
    4. Push the "Start Dither" button to start dithering the quad BDL.
  3. Adjust the designated correctors to get the beam spot centroid to stay in one location on the viewer and (at most) change size. Correctors downstream of the quad/BPM pair may be used to move beam on the viewer. Note it may be necessary to center in intervening quads between the quad/BPM pair before centering in the targetted quad.
  4. Stop dithering (push "Stop Dither") when the beam centroid stops moving with quad setting changes.
  5. Put the quad on-loop and cycle.
  6. Retract the viewer.
  7. Run Tune beam to get a nice signal on the BPMs.
  8. Change BPM SOFs if they changed and document in logbook whether or not they changed and by how much if they did.
    1. Note present BPM SOFs.
      caget bpm_name.XSOF
      caget bpm_name.YSOF
    2. Set BPM SOFs to zero.
      caput bpm_name.XSOF 0
      caput bpm_name.YSOF 0
    3. Determine new SOFs.
      1. Temporarily change the BPM's monitor deadband to 0 if not already 0.
        caget bpm_name.MDEL
        caput bpm_name.MDEL 0
      2. Get present BPM positions.
        caget bpm_name.XPOS
        caget bpm_name.YPOS
    4. Set new SOFs.
      1. Set SOFs to present BPM positions.
        caput bpm_name.XSOF XPOS_value_rounded_to_2_decimal_places
        caput bpm_name.YSOF YPOS_value_rounded_to_2_decimal_places
      2. Restore BPM's monitor deadband if changed previously.
        caput bpm_name.MDEL original_MDEL_value
  9. If this is not the first quad centering session, back out any steering changes.

Emittance Measurement

Setup beam to FC2
Use qsUtility configuration files to scan MQJ0L02 and/or MQJ0L02A and uses harp IHA0L03 (good scan is near IPM0L03X=Y=0). Files are in

/a/opsdata/fiefdata/fileio/q/qsUtility/config/F3-0/Bubble/ named IHA0L03_[x,y]_zigzag_bubble_2018_05_02_DAY.xml

Be sure to enter the correct momentum in the configuration and/or analysis files
Elegant optics lattice begins at MQJ0L02 (that is, use or propagate optics to that location)

Energy Spread Measurement

Setup beam to 2D spectrometer dump

Upstream quads MQJ0L02 and MQJ0L02A can be any value but their integrated gradient value B'L (.BDL field) must be recorded
Use HarpFitterTool to scan IHA2D00 to measure horizontal beam size

Use Elegant to calculate the horizontal beta (betax) and the horizontal dispersion (etax) at the harp location

Update lattice file
Type command cd /usr/opsdata/bubble/elegant/May2018/lattice
Edit lattice file BubbleChamber.lte
Update K1 values for MQJ0L02/MQJ0L02A (they appear in only one place)
Update energy spread elegant file
Type command cd /usr/opsdata/bubble/elegant/May2018/energy_spread
Edit command file energyspread.ele
Update p_central_mev [MeV/c]
Update beta_x [m] and beta_y [m] with qsUtility values computed at MQJ0L02
Update emit_nx [m-rad] and emit_ny [m-rad] with qsUtility values compated at MQJ0L02
Run Elegant model
Type command cd /usr/opsdata/bubble/elegant/May2018/energy_spread
Type command elegant energyspread.ele
Type command sddsprintout -col=ElementName -col=betax -col=etax energyspread.twi
Record value of betax [m] and etax [m] at IHA2D00
Calculate relative momentum spread (dp/p=sigma_dp (in elegant)) using the geometric emittance not normalized emittance and σx in m.
(dp/p)=√(σx2xεx)

Set Beam Size at Radiator

Pre-requisite measurements

Measured beam momentum in units of MeV/c
Measured normalized emittance and Twiss parameters at MQJ0L02 (e.g. from qsUtility)
Measured relative momentum spread (dp/p) (e.g. 1% is 0.01)

Define Elegant optimization (MQJ0L02, MQJ0L02A, MQD5D00, MQD5D01) to set beam size at radiator IDL5D01

Update elegant optimization file with measured beam parameters
Type command cd /usr/opsdata/bubble/elegant/May2018/beam_size
Edit command file BubbleChamber_FIT.ele
Update measured p_central_mev [MeV/c]
Update measured beta_x [m] and beta_y [m] with qsUtility values computed at MQJ0L02
Update measured emit_nx [m-rad] and emit_ny [m-rad] with qsUtility values compated at MQJ0L02
Update measured relative momentum spread sigma_dp
Update elegant optimization file with desired beam size and horizontal dispersion (there is no vertical dispersion)
Update desired horizontal beam size by choosing a value of RMSX in this line: term="RADIATOR#1.Sx RMSX 1e-5 sene",
Update desired vertical beam size by choosing a value of RMSY in this line: term="RADIATOR#1.Sx RMSY 1e-5 sene",
Solution is normally calculated with zero dispersion at the radiator. IF this is not desired then comment (put ! in first column) following lines:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! COMMENT (!) or UNCOMMENT FOR HORIZONTAL DISPERSION AT RADIATOR [m] (e.g. 0 is zero dispersion)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
&optimization_term
weight=1,
term="RADIATOR#1.etax 0 1e-2 sene",
verbose = 1,
&end

Run Elegant Optimization on a RHEL7 system (like opsl10)

Type command elegant BubbleChamber_FIT.ele
Depending on difficulty of solution may take 20-30 min
Terminal output will show result of optimization and desired quad values (in units of K1)
You will need to convert from K1 to integrated field B'L (units of Gauss for EPICS .BDL field)
K1 [1/m^2] = 2.998 * B_EPICS [G] / (L [cm] * p [MeV/c]) ; note that L=15cm for both QJ and QD quads self-consistently
Run also generates a new lattice named NEW.lte (where the quad values have been updated)

Generate final Elegant output of optimized solution

Edit command file BubbleChamber.ele
Update measured p_central_mev [MeV/c]
Update measured beta_x [m] and beta_y [m] with qsUtility values computed at MQJ0L02
Update measured emit_nx [m-rad] and emit_ny [m-rad] with qsUtility values compated at MQJ0L02
Update measured relative momentum spread sigma_dp
Type command elegant BubbleChamber.ele

Produce plots for comparison to viewer image and harp

To view a 2D plot of the (x,y) distribution at one of the "watch" elements (ITV5D00, ITV5D01, IHA5D01) use correspond suffix e.g.,
sddsplot -col=x,y -graph=dots BubbleChamber.TV5D01
To print the numerical values of beam size at each element,
sddsprintout -col=ElementName -col=s -col=Sx -col=Sy BubbleChamber.sig
To make a scatter plot of RMS beam size,
sddsplot -legend -graphic=line,vary BubbleChamber.sig -columnNames=s,'(Sx,Sy)'
To make a projection plot of a watch file, say, watch.W1 .... first generate a histogram and then plot it, e.g.: (THANKS CHRIS!)
sddshist BubbleChamber.HA5D01 HA5D01-x.hist -dataColumn=x -bins=100 -lowerLimit=-5e-3 -upperLimit=5e-3 -normalize=area
sddsplot -col=x,frequency -graph=lines HA5D01-x.hist
sddshist BubbleChamber.HA5D01 HA5D01-y.hist -dataColumn=y -bins=100 -lowerLimit=-5e-3 -upperLimit=5e-3 -normalize=area
sddsplot -col=y,frequency -graph=lines HA5D01-y.hist
To make a plot of the optics:
sddsplot -legend -graphic=line,vary BubbleChamber.twi -columnNames=s,'(betax,betay)' -yScalesGroup=id=beta -columnNames=s,'(alphax,alphay)' -yScalesGroup=id=alpha -columnNames=s,'(etax,etay)' -yScalesGroup=id=eta