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

From Ciswikidb
Jump to navigation Jump to search
Line 15: Line 15:
  
 
===Set energy===
 
===Set energy===
:...
+
:First energy/momentum (p=5.74 MeV/c)
 +
:#Set MDL0L02.BDL according to the setpoint in the table or from the MDL0L02_calculator.pl in /a/opsdata/bubble/energy.
  
 
===Measure energy===
 
===Measure energy===

Revision as of 00:44, 12 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

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.

Measure energy

...

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.
    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

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)

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 .BL 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