next up previous contents
Next: Beam energy measurement Up: Superharp Systems Previous: The superharp interface window

Subsections



Using the Program

This section describes in detail how to use harp_ana_new to execute common commands.

Loading Old Harp Data

Data is loaded by selecting the name of the harp from the Superharp drop-down menu. The program looks in the path scan_data/Experiment/File Name, where Experiment is the experiment number listed in the Experiment entry and File Name is the file name listed in the File Name entry.

Loading New Harp Data

Data collected through Options Scan is automatically converted into a format readable by \fbox{\bf harp\_ana\_new}, so it can been loaded, even in the same session in which it was collected, as if it were old harp data.

Graphing Old Harp Data

Harp data is automatically graphed when loaded (by selecting it from the Superharp drop-down menu). The statistical information for the first graph loaded is also displayed.

Graphing New Harp Data

Connect to cdaqh1 and run \fbox{\bf harp\_ana\_new}. Select \fbox{Options Scan}, and follow the instructions in the MEDM section to scan in new data. After exiting MEDM, the new data should appear. Note that it takes about 10 to 15 seconds for MEDM to load.

Saving Harp Data

Selecting \fbox{File Save} saves and compresses (using gzip) the data for all the harps currently loaded in the directory scan_data/Experiment/File Name, where Experiment is the experiment number listed in the Experiment entry and File Name is the file name listed in the File Name entry. If the directory scan_data/Experiment does not already exist, it is automatically created.

Printing Harp Data

Selecting \fbox{File Print} prints a screen capture to the printer listed in the Printer entry.

Removing Harp Data

Selecting \fbox{File Reset} clears all harp data from the screen and from memory (but doesn't erase the files from disk).

Fourier Transform

It has been demonstrated that the JLab beam has a fundamental 60 Hz motion originating from the power line. In order to have a precise determination of the position of the beam, correction from this beam motion is necessary. For that purpose, a Fourier transform which returns the beam motion harmonics to all orders from the data has been developped.

Selecting \fbox{Calculate Transform} calls the dialog box displayed in Fig 2.9.

Figure 2.9: The Fourier transform interface.
\begin{figure}\psfig{figure=fourier_transform.ps}\end{figure}

The Fourier transform used to isolate the fundamental frequency of the beam is
\begin{displaymath}
\hat f(t)=\int_{-\infty}^\infty f(s)\cos \frac{2 \pi s t}{v} {\rm d}x,
\end{displaymath} (2.1)

where $v\approx 0.248\mu m/s$ is the speed of the encoder. Let $N(x)$ be a continuous interpolation of the harp data, so that $N(x)$ equals the electron count $n_i$ at each of the data points $(x_i, n_i)$ and 0 off the scanning region $(x_{min}, x_{max})$. Then

\begin{displaymath}
\begin{tabular}{rcl}
$\hat N(s)$&$=$&$\int_{-\infty}^\infty ...
..._{max}} c_i n_i(x_i) \cos \frac{2 \pi x_i s}{v}$,
\end{tabular}\end{displaymath} (2.2)

where $\Delta x=x_{i+1}-x_i,$ $i_{max}$ is an arbitrary large constant, and the $c_i$ are the constants given by Simpson's integration method.

By Poisson's summation formula,

\begin{displaymath}
\sum_{n=1, 2,\ldots} \hat f(n\omega) =
\frac{1}{2\omega}\sum_{n=1, 2, \ldots} f\left(\frac{n}{\omega}\right).
\end{displaymath} (2.3)

The algorithm used to isolate the fundamental frequency $\omega_0$ of the beam essentially attempts to maximize the sum (2.3).

Statistics calculations

Mean and FWHM

For each superharp scan, the resulting histogram peak centroids are computed using the equation:


\begin{displaymath}
\begin{tabular}{rcl}
$\overline{x}$&$ = $&$ \frac{\sum \omeg...
...} $\\
&$ = $&$ \frac{\sqrt{\sum n_i}}{n_i} $\ ,
\end{tabular}\end{displaymath} (2.4)

where $n_i$ is the number of counts at the position $x_i$. $\sum n_i$ represents the total number of events in the selected peak. The beam position is then calculated via:
\begin{displaymath}
x_{\rm beam} = \overline{x} - x_{\rm survey} \; ,
\end{displaymath} (2.5)

where $x_{\rm survey}$ corresponds to the location of each wire if the beam was along the ideal path inside the beampipe.

The standard deviation (rms) is calculated from the second moment (variance) of the distribution:

\begin{displaymath}
M_2 = \sigma^2 =
\sqrt{\frac{1}{\sum n_i-1}\frac{\sum \omega_i (x_i-\overline{x})^2}{\sum \omega_i}} \; ,
\end{displaymath} (2.6)

and the full width at half maximum (FWHM) from:
\begin{displaymath}
\sigma = \frac{FWHM}{2\sqrt{2ln2}} \; .
\end{displaymath} (2.7)

Skewness and Kurtosis

Statistical higher moments $M_n$ are also calculated:

\begin{displaymath}
M_n = \frac{\sum \omega_i (x_i-\overline{x})^n}{\sum \omega_i} \; , \; {\rm for \; n>2} \; .
\end{displaymath} (2.8)

Since the term $1/(\sum n_i-1)$ appears in $\sigma=\sqrt{M_2},$ most statistical calculations are also normalized.

The skewness is defined as the measure of the symmetry of a distribution:

\begin{displaymath}
B_1=\frac{M_3}{M_2^\frac{3}{2}} \; .
\end{displaymath} (2.9)

It vanishes for any distribution completely symmetric about its mean (since this forces $M_n$ to vanish for odd $n$), and so vanishes for the normal distribution.

The kurtosis is the measure of a distribution's spread about its mean:

\begin{displaymath}
B_2=\frac{M_4}{M_2^2}-3
\end{displaymath} (2.10)

It also vanishes for a normal distribution, since $M_4=3\sigma^2$ and $M_2=\sigma.$

Graph Comparisons

Using survey data, the program isolates the three peaks of the first graph $H_0$ loaded and plots them in the three lower graph windows. As subsequent graphs $H_i$ are loaded, the offset $\overline{x_{H_i}}-\overline{x_{H_0}}$ is calculated over each of those three regions and displayed in the upper-right corner of the appropriate graph. The offsets have the same order and color as the harp names in the graph legend.

When data from both of a pair of harps (e.g. IHA3C17A and IHA3C17B) are loaded, the angle $\theta$ the beam makes with the horizontal when travelling through the pair is calculated and displayed. As with the offsets, the color of the displayed angle matches the color of graph of the harp pair.


next up previous contents
Next: Beam energy measurement Up: Superharp Systems Previous: The superharp interface window
Hall-C Staff
2002-11-04