pro d17_he3fit,win,pin,pout,yout,PFIX=pfix,LIMITS=lims,DSEL=dsel,CROSS=cross
LAMP procedure to fit the 3He data to calculate the
polarization decay constants.
NECESSARY INPUT:
win=the workspace with the values of phi.
calculated using aw_he3calibrate
pin=the input parameters:
pin(0) = definition of time t=0 (by 'julday')
pin(1) = initial polarization of the He3 gas (%)
pin(2) = the time constant for decay (hours)
pin(3) = the inefficiency of the polarizer
pin(4) = the pressure of the gas (bar)
pin(5) = the wavelength (Angstrom)
OPTIONAL INPUT
pfix=a 6-element array showing which of pin are fixed and which are free
A value of zero is free, a value of one is fixed
limits=a 2 column by 6 row array with the upper and lower limits
for each parameter. Set values to -1 for no limit
dsel=a 2row array with the same number of columns as data points
This parameter can be set to deselect data points
The top row refers to polarization data, while the bottom refers to the transmission
A value of 0 means that the corresponding data point is DESELECTED
Any other value and the point is SELECTED.
Default is (of course) all data points selected
cross=0 if the 3He is polarized in the SAME direction as the monochromator
=1 if the 3He is polarized OPPOSITE to the monochromator
Default is cross=0
OUTPUT:
pout=the output parameters with errors as a 2 column array:
pout(0) = definition of time t=0 (by 'julday')
pout(1) = initial polarization of the He3 gas (%)
pout(2) = the time constant for decay (hours)
pout(3) = the inefficiency of the polarizer
pout(4) = the pressure of the gas (bar)
pout(5) = the wavelength (Angstrom)
pout(6) = the first flipper efficiency
pout(7) = the second flipper efficiency
yout=the values of phi and trans as a function of time
Example:
d17_he3fit,w2,[julday(8,3,2004,14,15,00),0.6,150,0.013,0.6,5.3],pout,w11, $
PFIX=[0,0,0,1,0,1], $
LIMITS=[[-1,min(x2)],[0.5,0.65],[100,200],[0,0.02],[0.5,0.7],[-1,-1]]