function d17_he3corr,win,params,tol=tol
LAMP function to correct polarization analysis data taken with the He3 filter
NECESSARY VARIABLES:
win=workspace with the data, must have the four polarization states as
[[I00],[I01],[I10],[I11]]
params=the fitted parameters to phi and trans
This can be a 1 or 2D array,
the second row in a 2D array is the error on the parameter
params[0]=initial time for filter (t0)
params[1]=initial polarization of 3He gas (P0He)
params[2]=decay time of cell (t1)
params[3]=polarizer inefficiency (p1)
params[4]=gas pressure ([3He])
params[5]=wavelength (lambda)
params[6]=first flipper efficiency (f1)
params[7]=second flipper efficiency (f2)
Cell thickness is fixed at 10 cm
OPTIONAL VARIABLES:
tol=the tolerance in the time for the measurement in seconds.
The correction requires a time of measurement for the 4 flipper states
This is taken as the average time of measurement.
There will be some variation on the calculated average, normally +/- a second or two
If you have problem, tol=2 should cover this and allow a proper correction to be made
If the data falls outside this tolerance, an error message will be sent
The default tolerance is 1e-7 seconds.
e.g. w5=d17_he3corr(w4,p,tol=2)