Centering Beam in Debuncher Quads -- Reverse Proton Studies

A) Setup
	1) Will need 2-3 people to make sure things go at a reasonable pace 
	   and have quality control
	2) Will want to set Debunhcer BPMs to average longer --  
	   D:BPMFI# from 1000 to 8000
	3) Will want to run two instances of Debuncher BPM display application
	   one showing raw orbit and the other in difference mode 
	4) Establish reverse protons
	5) Measure admittances
	6) Bunch beam at h=4 for h=1 frequency 590018Hz.
	7) Refresh beam as needed 
	   (use FTP pbar #47; D:BPMAD2 threshold of -70dBm)

B) Test using single quad to iron out procedure (especially signs)
	1) Save BPM orbit; set difference mode display to use this orbit
	2) Induce significant offset at Q504
		a) Establish P60<DEB10><37> for fallback
		b) Instance One of P169, move 2mm IN for Bump 121
		c) Instance Two of P169, move 4mm UP for Bump 316
		d) Leave open both instances of P169
	3) Record new "reference orbit A"
	4) Change D:Q504RF to maximum value; watch orbit distortion
	5) Wait 30 seconds after shunt arrived at final value and 
	   save BPM orbit "excited orbit B"
	6) Person one sets D:Q504RF back to nominal value, 
	    see if orbit returns to initial reference
	7) Person two using P144 
		a) Read in orbits (B-A) that have been saved
		b) Use "Quad Center" aspect to determine offsets
		c) Enter offsets into text file
		d) For each plane,
			i  ) Read in text file via VIRT "Edit BPM"
			ii ) Put in additonal 0.0 around machine 
			     outside of bump area: 5Q3 to 5Q6
			iii) Select devices in "Edit Trims" 
			     Q503, Q504 and Q506 and "Correct"
			iv ) Save info (hard copy or D5 save)
			v  ) Make suggested changes via third instance of P169
			     doing each motorized quad stand one at a time
	8) Repeat steps 3-6 followed by steps 7a and 7b. 
		a) If offsets are essentially zero, 
		   then signs are correct and move onto step 9.
		b) Offset(s) will then be ~2 large as first pass; wrong sign
			i  ) For the plane(s), have Keith change the
			     reading of text file by P144 to fix the sign
			ii ) Restart updated P144
			iii) Do steps 7c and 7d
			iv ) Redo step 8
	9) Put everything back
		a) Instance One of P169, QUIT and click magenta to return
		b) Instance Two of P169, QUIT and click magenta to return
		c) Check fallback page P60<DEB10><37> has no magenta

C) Collect excited quad orbits and determine orbit offsets from quad centers
	1) Person ONE determines if there is enough BPM signal intensity to 
	   complete a set of measurements for the following devices:
		D:Q101RF	D:Q301RF	D:Q501RF
		D:Q103RF	D:Q303RF	D:Q503RF
		D:Q104RF
				D:Q305RF	D:Q505RF
		D:Q106RF	D:Q306RF	D:Q506RF
		D:Q109RF	D:Q309RF
		D:Q113RF	D:Q313RF	D:Q513RF
		D:Q115RF	D:Q315RF	D:Q515RF
		D:Q119RF	D:Q319RF	D:Q519RF
	2) Person ONE save reference orbit (each time);
	   update difference orbit reference file
	3) Person ONE change D:Q###RF device as much as possible
	4) Person ONE wait 30 seconds after D:Q###RF reaches min/max value
	5) Person ONE save excited orbit
	6) Person ONE communicates to Person TWO the following:
		a) Device changed
		b) (Excited setting) - (nominal setting of device)
		c) Orbit file numbers: reference & excited orbits
	7) Person ONE return D:Q###RF to nominal value
	8) Person ONE wait 30 seconds and go back to step 1
	-----------
	9 ) Person TWO wait for information from Person ONE 
	    to insert into P144
	10) Person TWO read in orbits (B-A) that have been saved
	11) Person TWO use "Quad Center" aspect to determine offsets
	12) Person TWO enter offsets into text file

D) Determine orbit correction and apply
	1) Make a safety copy of off set file
	2) Edit offset file and remove offsets associated with 
	   quads on motorized stands
	3) Put up three fall back pages P60<deb#0><37>
	4) For each plane do the following
		a) Select plane
		b) Read in text file via VIRT "Edit BPM"
		c) Mask out injection/extraction region as needed
		d) Select devices in "Edit Trims" and "Correct"
			i) iterate to minimize number of correctors
		e) Save info (hard copy or D5 save)
		f) Make suggested changes via P169
		   doing each motorized quad stand one at a time
		   and trims from P60 pages

E) Iterate steps C) and D) until offsets are essentially zero

F) Completion 
	1) Make sure to set D:BPMFI# back to 1000
	2) After making sure quad settings are back to nominal values; 
	   cycle Debuncher quads.
	3) Record Orbit
	4) Measure admittances
	5) Use Running Wave to determine apertures
		a) If in straights do tank center (before bumping)
		b) If not, bump
	6) Iterate Running Wave and occasionally measure admittance
	7) When done record orbit
	
G) After returning to stacking
	1) Close injection Oscillations
	2) Redo D/A orbit optimization procedure
	3) Tank center while stacking