attach rs1.new
xrs1
call public $ez_readfile
fit function "a-b*exp(-(x-xo)/t)" to curve 1 of graph gpo218
 set printer to 'lpt80'
printout table foo noheader on file 'foo'
 set printer to 'lpt132'
printout table longfoo on file 'lfoo'
 % enscript -r -Pprinter lfoo
 # set plotter to 't4010'
 # plot graph foo bottomkey on file 'foo.tek'

          % ps4014 foo.tek | lpr -Pprinter
 /mit/rs1.new/rsfix


fit function "sqrt(c1*(x-x0)**2 +c2)" to curve 1 of gop2f1
plot graph gop2f1 bottomkey on file 'gop2f1.tex
dis[play]
make graph
grapics/plain


gop3f1b
Graph of Low Resonant Frequency Versus Z Current
Z Current (mA)

f1 (kHz)


T
col 0 of optical3
T
col 1 of optical3
circle


D



fit function "c1*abs(x-x0)" to curve 1 of gop3f1b  sumofsq 75.41

set plotter to 't4010' 
plot graph gop3f1b bottomkey on file 'gop3f1b.tek' 
ps4014 gop3f1b.tek | homer
--------------------
gop4xb
Graph of Pulse Height Versus X Current
X Current (mA)

Pulse Height (V)


T
col 0 of optical4
T
col 1 of optical4
circle


D

fit function "sqrt(c1*(x-x0)**2+c2)+c3" to curve 1 of gop4y  sumofsq
.117

plot graph gop4y bottomkey on file 'gop4y.tek'


4/3/90

fit function "sqrt(c1*(x-x0)**2 +c2)" to curve 1 of gop1f1

4/4/90

fit function "c0 + c1/sqrt((x-x0)**2 + c2)" to curve 1 of gop4x
fit function "c0 + c1/sqrt((x-x0)**2 + c2)" to curve 1 of gop4y

plot graph gop4x bottomkey on file '/usr/tmp/gop4x.tek'
plot graph gop4y bottomkey on file '/usr/tmp/gop4y.tek'
ps4014 gop4x.tek | homer
ps4014 gop4y.tek | homer


4/15/90:
Adapted from 4/4/90 (commands)

columns:
0  Iz(mA)
1  sigma_Iz(mA)
2  f_low (kHz)
3 sig_f_low (kHz)
4 gmu_85(MeV/G)
5 sigma_gmu_85 (MeV)
6 1/(5)^2
7 (4)/(5)^2
8 f_hi (kHz)
9 sig_f_hi (kHz)
10 gmu_87
11 sig_gmu_87
12 1/(11)^2
13 (10)/(11)^2

!set col 4 of gmu to 8.944e-16*col 2/abs(-24.24 + col 0)

!set col 5 of gmu to (4.60143363e-19)*sqrt((1.944e3*col 3/(-24.24+col 0))**2
			+ (col 2*5555*0.05/(-24.24+col 0))**2
			+ (1.944e3*col 2*col 1/(-24.24+col 0)**2)**2
			+ (1.944e3*col 2*0.02/(-24.24+col 0)**2)**2)

bad:
!do n = 1 to 15;
sumtop = row n of col 4/ (row n of col 5)**2 + sumtop;
end;

!set col 6 of gmu to 1/((col 5)**2)
!set col 7 of gmu to (col 4/((col 5)**2))


!set col 10 of gmu to 8.944e-16*col 8/abs(-24.24 + col 0)

!set col 11 of gmu to (4.60143363e-19)*sqrt((1.944e3*col 9/(-24.24+col 0))**2
			+ (col 8*5555*0.005/(-24.24+col 0))**2
			+ (1.944e3*col 8*col 1/(-24.24+col 0)**2)**2
			+ (1.944e3*col 8*0.02/(-24.24+col 0)**2)**2)

!set col 12 of gmu to 1/((col 11)**2)
!set col 13 of gmu to col 10 * col 12


!set col 14 of gmu to (1.944e3*col 3/(-24.24+col 0))**2
!set col 15 of gmu to (col 2*5555*0.005/(-24.24+col 0))**2
!set col 16 of gmu to (1.944e3*col 2*col 1/(-24.24+col 0)**2)**2
!set col 17 of gmu to (1.944e3*col 2*0.02/(-24.24+col 0)**2)**2

!set col 18 of gmu to (1.944e3*col 9/(-24.24+col 0))**2
!set col 19 of gmu to (col 8*5555*0.005/(-24.24+col 0))**2
!set col 20 of gmu to (1.944e3*col 8*col 1/(-24.24+col 0)**2)**2
!set col 21 of gmu to (1.944e3*col 8*0.02/(-24.24+col 0)**2)**2


                           PARAMETER TABLE

0    1 PARAM.  2 FINAL      3 STD         4 T VALUE  5 SIG.  6 DEP.
                 VALUES       ERRORS                   LEV.    VALUES
---------------------------------------------------------------------
1    C         2.08571e-15  5.377627e-18      387.8  0.0001         0

Result of (WEIGHTED) FIT is
    3.136153e-15

FIT converged.  This does NOT necessarily imply a good fit.
Final SUM OF SQUARES is 1.578914e-32.
2 iterations used.                            PARAMETER TABLE

0    1 PARAM.  2 FINAL       3 STD         4 T VALUE  5 SIG.  6 DEP.
                 VALUES        ERRORS                   LEV.    VALUES
----------------------------------------------------------------------
1    C         3.136154e-15  9.314157e-18      336.7  0.0001         0
189

Result of FIT is
    1.500577

FIT converged.  This does NOT necessarily imply a good fit.
Final SUM OF SQUARES is 0.000664.
2 iterations used.

                        PARAMETER TABLE

0    1 PARAM.  2 FINAL   3 STD     4 T VALUE  5 SIG.  6 DEP.
                 VALUES    ERRORS               LEV.    VALUES
--------------------------------------------------------------
1    C         1.500577  0.001778      843.8  0.0001         0


plot graph ggmuratio box bottomkey on file '/usr/tmp/a'
plot graph ggmu2 box bottomkey on file '/usr/tmp/b'
plot graph ggmu3 box bottomkey on file '/usr/tmp/c'

printout gmu colwidth 25 on file "/usr/tmp/gmu" 

4/25/90
R = 0.35 m
I = 24 mA
mu = 4pi e-3 Gm/A

C = 1.862650e-5
a^2 = 0.1225

plain
del bfield
make graph bfield

1.862650e-4/((x**2+0.1225)**(1.5))+1.862650e-4/(((x-0.35)**2+0.1225)**1.5)
+1.862650e-5/(((x-0.02)**2+0.1225)**(1.5))+1.862650e-4/(((x-0.37)**2+0.1225)**1.5)

graphics
dis bfield




columns:
0  Iz(mA)
1  sigma_Iz(mA)
2  f_low (kHz)
3 sig_f_low (kHz)
4 B low
5 gmu_85(MeV/G)
6 sigma_gmu_85 (MeV)
7 1/(5)^2
8 (4)/(5)^2
9 f_hi (kHz)
10 sig_f_hi (kHz)
11 gmu_87
12 sig_gmu_87
13 1/(11)^2
14 (10)/(11)^2

!set col 4 of gmu to 4.1375e-21*1e3*col 2/abs(180*0.012566371*(0.283)**2*1e-3*(-24.24 + col 0)/((0.175)**2+(0.283)**2)**1.5)

!set col 5 of gmu to (4.60143363e-19)*sqrt((1.944e3*col 3/(-24.24+col 0))**2
			+ (col 2*5555*0.05/(-24.24+col 0))**2
			+ (1.944e3*col 2*col 1/(-24.24+col 0)**2)**2
			+ (1.944e3*col 2*0.02/(-24.24+col 0)**2)**2)

bad:
!do n = 1 to 15;
sumtop = row n of col 4/ (row n of col 5)**2 + sumtop;
end;

!set col 6 of gmu to 1/((col 5)**2)
!set col 7 of gmu to (col 4/((col 5)**2))

!set col 10 of gmu to 4.1375e-21*1e3*col 8/abs(180*0.012566371*(0.283)**2*1e-3*(-24.24 + col 0)/((0.175)**2+(0.283)**2)**1.5)

!set col 11 of gmu to (4.60143363e-19)*sqrt((1.944e3*col 9/(-24.24+col 0))**2
			+ (col 8*5555*0.005/(-24.24+col 0))**2
			+ (1.944e3*col 8*col 1/(-24.24+col 0)**2)**2
			+ (1.944e3*col 8*0.02/(-24.24+col 0)**2)**2)

!set col 12 of gmu to 1/((col 11)**2)
!set col 13 of gmu to col 10 * col 12


!set col 14 of gmu to (1.944e3*col 3/(-24.24+col 0))**2
!set col 15 of gmu to (col 2*5555*0.005/(-24.24+col 0))**2
!set col 16 of gmu to (1.944e3*col 2*col 1/(-24.24+col 0)**2)**2
!set col 17 of gmu to (1.944e3*col 2*0.02/(-24.24+col 0)**2)**2

!set col 18 of gmu to (1.944e3*col 9/(-24.24+col 0))**2
!set col 19 of gmu to (col 8*5555*0.005/(-24.24+col 0))**2
!set col 20 of gmu to (1.944e3*col 8*col 1/(-24.24+col 0)**2)**2
!set col 21 of gmu to (1.944e3*col 8*0.02/(-24.24+col 0)**2)**2


!set col 27 of gmu to col 10/col 4

fit function "C" to curve 3 of graph ggmu2a

Result of (WEIGHTED) FIT is
    1.962044e-15

FIT converged.  This does NOT necessarily imply a good fit.
Final SUM OF SQUARES is 4.6576e-33.
2 iterations used.

F3  1R x 6C                                             26-APR-90 0:03 Page 1

                            PARAMETER TABLE

0    1 PARAM.  2 FINAL       3 STD         4 T VALUE  5 SIG.  6 DEP.
                 VALUES        ERRORS                   LEV.    VALUES
----------------------------------------------------------------------
1    C         1.961594e-15  5.058227e-18      387.8  0.0001         0

F2  2R x 8C                                             26-APR-90 0:02 Page 1

                               AOV TABLE

0    1 SOURCE    2 SUM OF     3 D.F.  4 MEAN        5 F VALUE
                   SQUARES              SQUARE
----------------------------------------------------------------------
1    REGRESSION      0.00000       0  No D.F.       No regression D.F.
2    RESIDUAL    4.65659e-33      13  3.581993e-34


0    6 SIG.              7 MULT  8 STD DEV
       LEV.                R-SQ    OF REGR
---------------------------------------------
1    No regression D.F.       0  1.892615e-17
2

!set col 4 of gmufit to col 1 - col 2
!set col 5 of gmufit to col 1 + col 2

!set col 9 of gmufit to col 6 - col 7
!set col 10 of gmufit to col 6 + col 7


!set col 3 of gmufit to 1/(col 2 * 1e+15)
!set col 8 of gmufit to 1/(col 7 * 1e+15)
fit function "C" to curve 4 of graph ggmu2a
Result of (WEIGHTED) FIT is
    2.944383e-15

FIT converged.  This does NOT necessarily imply a good fit.
Final SUM OF SQUARES is 8.73527e-33.
2 iterations used.

TABLE:49286  1R x 6C                                    25-APR-90 23:58 Page 1

                            PARAMETER TABLE

0    1 PARAM.  2 FINAL       3 STD         4 T VALUE  5 SIG.  6 DEP.
                 VALUES        ERRORS                   LEV.    VALUES
----------------------------------------------------------------------
1    C         2.944383e-15  6.927914e-18        425  0.0001         0

TABLE:49287  2R x 8C                                    25-APR-90 23:58 Page 1

                               AOV TABLE

0    1 SOURCE    2 SUM OF      3 D.F.  4 MEAN        5 F VALUE
                   SQUARES               SQUARE
-----------------------------------------------------------------------
1    REGRESSION      0.000000       0  No D.F.       No regression D.F.
2    RESIDUAL     8.73527e-33      13  6.719438e-34


0    6 SIG.              7 MULT  8 STD DEV
       LEV.                R-SQ    OF REGR
---------------------------------------------
1    No regression D.F.       0  2.592188e-17

plot graph ggmu2a noheader box bottomkey on file '/usr/tmp/a'
plot graph bfield noheader box bottomkey on file '/usr/tmp/b'


4/26/90
fit function "C" to curve 1 of graph ggmu2b
Result of FIT is
    1.961812e-15

FIT converged.  This does NOT necessarily imply a good fit.
Final SUM OF SQUARES is 4.659207e-33.
2 iterations used.


TABLE:49286  1R x 6C                                    26-APR-90 10:49 Page 1

                            PARAMETER TABLE

0    1 PARAM.  2 FINAL       3 STD         4 T VALUE  5 SIG.  6 DEP.
                 VALUES        ERRORS                   LEV.    VALUES
----------------------------------------------------------------------
1    C         1.961812e-15  5.059648e-18      387.7  0.0001         0

TABLE:49287  2R x 8C                                    26-APR-90 10:50 Page 1

                               AOV TABLE

0    1 SOURCE    2 SUM OF      3 D.F.  4 MEAN        5 F VALUE
                   SQUARES               SQUARE
-----------------------------------------------------------------------
1    REGRESSION      0.000000       0  No D.F.       No regression D.F.
2    RESIDUAL    4.659207e-33      13  3.584006e-34


0    6 SIG.              7 MULT  8 STD DEV
       LEV.                R-SQ    OF REGR
---------------------------------------------
1    No regression D.F.       0  1.893147e-17

*fit function "C" to curve 2 of graph ggmu2b

Result of FIT is
    2.945584e-15

FIT converged.  This does NOT necessarily imply a good fit.
Final SUM OF SQUARES is 1.107476e-32.

TABLE:49286  1R x 6C                                    26-APR-90 10:51 Page 1

                            PARAMETER TABLE

0    1 PARAM.  2 FINAL       3 STD         4 T VALUE  5 SIG.  6 DEP.
                 VALUES        ERRORS                   LEV.    VALUES
----------------------------------------------------------------------
1    C         2.945584e-15  7.800663e-18      377.6  0.0001         0

TABLE:49287  2R x 8C                                    26-APR-90 10:52 Page 1

                               AOV TABLE

0    1 SOURCE    2 SUM OF      3 D.F.  4 MEAN        5 F VALUE
                   SQUARES               SQUARE
-----------------------------------------------------------------------
1    REGRESSION      0.000000       0  No D.F.       No regression D.F.
2    RESIDUAL    1.107476e-32      13  8.519048e-34


0    6 SIG.              7 MULT  8 STD DEV
       LEV.                R-SQ    OF REGR
--------------------------------------------
1    No regression D.F.       0  2.91874e-17


!set col 4 of ggmu2bres to (col 2 - col 1)**2

plot graph ggmu2b box bottomkey noheader on file '/usr/tmp/z'

4/27/90

attach xmath
xmath
plot 90*1.862650e-5/((x**2+0.1225)**(1.5))
+90*1.862650e-5/(((x-0.35)**2+0.1225)**1.5)
+90*1.862650e-5/(((x-0.038)**2+0.1225)**(1.5))
+90*1.862650e-5/(((x-0.388)**2+0.1225)**1.5)

range: x= -.7 to 1.1
       y= -.001 to .115

.112(1) Gauss

