% spectro_lens_mag_meas.m
%
% 9/30/04 measurements of the Princeton/Cornell target lens and
% dipole-pair spectrometer magnets....
%
%
% Lens first set pg 142 of notebook:
Lens_I=6; %amps
Stage_Z=[0.00 -0.1 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9...
    1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1...
    2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.4...
    3.5 3.6 3.64];
% 
Lens_onaxis=[8.83 7.00 8.7 11.15 14.42 18.71 24.33 31.52 40.55...
    51.76 64.87 79.89 96.07 112.47 128.10 142.05 153.60...
    162.47 168.75 172.59 174.21 173.70 171.03 166.06 158.64...
    148.56 135.93 121.14 104.92 88.43 72.64 58.36 46.10...
    35.95 27.77 21.35 16.44 12.64 9.84 8.93];
%
%
plot(Stage_Z*2.54,Lens_onaxis/Lens_I,'.')
xlabel('Longitudinal Probe Position (cm)')
ylabel('Axial Field (G/A)')
title('9/30/04 Target Lens On-Axis Axial Field')
%
%
Stage_X=[0.084 0.184 0.284 0.384 0.484 0.584 0.084...
    -0.016 -0.116 -0.216 -0.316 -0.416 -0.516 0.084];
%
Lens_offaxis=[174.27 175.10 177.00 179.80 183.30 187.19...
    174.32 174.37 175.46 177.56 180.55 184.12 188.19 174.23];
%
plot(Stage_X*2.54,Lens_offaxis/Lens_I,'.')
xlabel('Transverse Probe Position (cm)')
ylabel('Axial Field (G/A)')
title('9/30/04 Target Lens Off-Axis Axial Field')
axis([-1.5 1.5 0 50])
%
%
Spec_I=19.95;
Stage_Z_Sp_1=0.00:0.1:4.2;
Dipole_1_1=-[91.55 98.02 105.15 112.15 119.10 126.50...
    132.90 139.70 146.30 152.70 157.70 164.45 169.85...
    174.75 178.10 179.20 183.15 186.70 189.70 192.30...
    194.40 196.25 197.65 198.70 199.55 200.15 200.50...
    200.65 200.65 200.55 200.30 199.95 199.50 199.00...
    198.45 197.80 197.10 196.40 195.65 194.80 194.0 193.10...
    192.25];
%
Stage_Z_Sp_2=0.00:0.1:4.0;
Stage_Z_Sp_2=Stage_Z_Sp_2+3.5;
Dipole_1_2=-[197.7 196.95 196.20 195.4 194.55 193.70 192.75...
    191.85 190.85 189.90 188.90 187.90 186.85 185.75...
    184.70 183.55 182.40 181.15 179.95 178.70 177.40...
    176.05 174.65 173.20 171.70 170.10 168.50 166.80...
    164.95 163.05 161.00 158.85 156.60 154.25 151.75...
    149.10 146.30 143.35 140.25 137.00 133.60];
%
%
Stage_Z_Sp_3=0.0:0.1:4.1;
Dipole_2_1=[139.05 145.00 150.90 156.70 162.20 167.45...
    172.35 176.90 181.05 184.75 188.05 190.95 193.35...
    195.40 197.15 198.50 199.60 200.40 201.00 201.35...
    201.65 201.70 201.65 201.45 201.20 200.80 200.35...
    199.85 199.30 198.65 197.95 197.25 196.50 195.70...
    194.90 194.05 193.20 192.30 191.30 190.35 189.35...
    188.35];
plot(Stage_Z_Sp_1*2.54,Dipole_1_1/Spec_I,'.',Stage_Z_Sp_2*2.54,Dipole_1_2/Spec_I,'.')
xlabel('Longitudinal Probe Position (cm)')
ylabel('Vertical Field (G/A)')
title('9/30/04 Spectrometer First Dipole On-Axis Vertical Field')
%
%
plot(Stage_Z_Sp_3*2.54,Dipole_2_1/Spec_I,'.')
xlabel('Longitudinal Probe Position (cm)')
ylabel('Vertical Field (G/A)')
title('9/30/04 Spectrometer Second Dipole On-Axis Vertical Field')
%
%
Stage_X_400=[0.00 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9...
    1.0 1.2 1.4 1.6 1.8 2.0 2.25 2.50 2.75 3.0 3.25...
    3.50 3.60 3.00 2.50 2.0 1.5 1.0 0.5 0.0 -0.1 0.0];
Dipole_2_X_4=[189.3 190.55 191.80 192.90 194.10 195.25...
    196.3 197.35 198.45 199.50 200.55 202.55 204.45...
    206.25 207.90 209.30 210.80 211.70 211.75 210.70...
    207.85 202.85 199.95 210.55 211.75 209.45 205.50...
    200.70 195.35 189.50 188.30 189.30];
Stage_X_210=[0.0 0.25 0.50 0.75 1.00 1.25 1.50 1.75 2.00...
    2.25 2.50 2.75 3.00 3.25 3.50 3.60 3.00 2.50 2.00...
    1.50 1.00 0.50 0.00];
Dipole_2_X_2=[201.7 205.60 209.55 213.50 217.55 221.65...
    225.75 229.80 233.65 237.35 240.65 243.25 244.55...
    243.80 240.00 237.20 244.55 240.85 233.95 226.05...
    217.90 209.85 201.95];
plot(Stage_X_400*2.54,Dipole_2_X_4/Spec_I,'.',Stage_X_210*2.54,Dipole_2_X_2/Spec_I,'.')
xlabel('Transverse Probe Position (cm)')
ylabel('Vertical Field (G/A)')
title('9/30/04 Second Spectrometer Dipole Off-Axis Vertical Field')

