Outboard exit slit calibration

The outboard exit slit has a linear relationship between EXS_O motor steps $s$ and the slit opening in microns $m$ of

\begin{displaymath}
m=A[1](A[0]-s)
\end{displaymath} (3.8)

where $A[1]=0.1$. Alternatively, if you want to find the EXS_O motor position that will give you a desired exit slit opening, it is given by
\begin{displaymath}
s=A[0]-(m/A[1]).
\end{displaymath} (3.9)

To determine an updated value of $A[0]$, one should take a reading of outboard shutter photodiode signal as a function of slit opening. If the signal goes to zero at a step position of about $s=17900$, one can do the following
% motor_scan exs_o shutter_outboard 17750 18050 5
If 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 $A[0]$:
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=',a0
You now have the value of $A[0]$ to use in Eq. 3.8.

Figure 3.26: Outboard exit slit EXS_O calibration.
\includegraphics[width=4.1in]{exs_o_fit}

Holger Fleckenstein 2008-07-08