The outboard exit slit has a linear relationship between
EXS_O motor steps
and the slit opening in
microns
of
| (3.9) |
% motor_scan exs_o shutter_outboard 17750 18050 5If the file you created is /mnt/x1a/x1a_13jan2002_0002.csv, then do the following in IDL:
IDL> read_csv,'/mnt/x1a/x1a_13jan2002_0002.csv',items IDL> svec = size(items) IDL> n = svec[2] IDL> steps = reform(items[0,*],n) IDL> volts = reform(items[1,*],n) IDL> plot,steps,volts,xtickformat='(i5)',xtitle='EXS_O',ytitle='ADC0 volts'In the plot that this produces (see e.g., Fig. 3.26), you want to identify the region where the signal is declining linearly as the EXS_O step position increases. Let's say that this is the region below 17850 steps. You want to do a least squares fit to the data in this region to find
IDL> range=where(steps lt 17850) IDL> fit=poly_fit(steps(range),volts(range),1) IDL> vfit=fit(0)+fit(1)*steps IDL> oplot,steps,vfit,linestyle=1 IDL> a0=-fit(0)/fit(1) IDL> print,'The slit is closed at a0=',a0You now have the value of
Holger Fleckenstein 2008-07-08