HOWTO Analyze a FDC Flatness Scan

From GlueXWiki
Revision as of 21:24, 25 June 2009 by Veilleux (Talk | contribs) (Quick Start)

Jump to: navigation, search

Old Discussion

Old - Analyze a FDC Flatness Scan

Quick Start

Note: The following instructions run macros that should automatically be run at the end of every scan. Check if the output files already exist in the /home/laser/FLATNESS/flatness_data/images/XXX directory before going to the trouble of running these "by hand".


  1. To get started you need a scan data file.
    These have names like "plane004 000deg 2008_11_06 09_26_26.txt" These are generally found in the ~laser/FLATNESS/flatness_data directory on the Linux computer kept in EEL126 next to the FDC laser scanner. Note that this computer can be accessed remotely via ssh or scp with the username and password that are posted in EEL126, or by copying the data files to a USB drive. [1].
  2. Run the snake_mktree program giving the data file as the only argument.
    e.g. snake_mktree "plane004 000deg 2008_11_06 09_26_26.txt"
    Note here that the double quotes(") surrounding the file name are needed since the filename contains spaces. The program should create a ROOT file with the same name as the input file, only with a ".root" suffix.
  3. Run the ROOT macros fdc_mean.C and fdc_rms.C on the resulting root file.
    These are kept in the directory ~laser/FLATNESS/macros. They either be copied to the working directory or have the path prepended when actually running them with root. These macros are kept under version control and can be accessed directly from the Hall-D svn repository if needed using the URL:
    https://halldsvn.jlab.org/repos/trunk/home/davidl/FDC_laser/macros
    Generally, the copies of these macros kept on the halldsc1.jlab.org computer in EEL126 will be used so you will not need to access the repository.
    -
    Examples of running the root macros
    root -q -b 'fdc_mean.C("plane004 000deg 2008_11_06 09_26_26.root")'
    root -q -b 'fdc_rms.C("plane004 000deg 2008_11_06 09_26_26.root")'
    -
    Notice the single quotes around the 'fdc_rms.C("plane004 000deg 2008_11_06 09_26_26.root")' . These are because the shell will try interpreting the parenthesis while we really want them to be passed as part of the argument. These should create the files fdc_mean.gif and fdc_rms.gif respectively. Note that this will overwrite any files already existing in the current directory with these name without asking.
  4. Rename the image files and copy (if needed) to an external drive.

Interpreting the Scan Data

Example of the mean value of a cathode plane from scan "plane004 000deg 2008_11_06 09_26_26"
Example of the mean value of the granite slab from scan "plane999 999deg 2008_11_06 08_51_09"


The scans are done with a high density of points in X (about 1.4 mm between points) and a low density in Y (1 inch between points). The plots generated take the mean and RMS of all points in a 1 inch section of a single horizontal scan. They therefore do not actually represent an area but rather, a line across that area.

The mounting rails for the laser itself are not perfectly straight. This is evidenced by a noticeable and similar "wave" in both the cathode scan and a scan of the granite slab itself. The image on the right shows the means of a scan of a cathode plane while the image on the left shows the same thing, but for the granite slab itself.

Example of the mean value of a cathode plane from scan "plane004 000deg 2008_11_06 09_26_26"
Example of the mean value of the granite slab from scan "plane999 999deg 2008_11_06 08_51_09"

The RMS values for the cathode and granite scans are shown here on the right and left respectively. These correspond to the same bins used for the plots above of the means. In the cathode scan on the right, the 2 tape lines are easily seen while on the left, several drill holes in the granite slab show up as red spots. The color scales go from 0 to 100 microns so blue colors have an RMS of around 30 microns or less. Green is in the 50-60 micron range while red is in the 100 or more micron range.

Cathode (red) and granite (black) scans from scan "plane004 000deg 2008_11_06 09_26_26" and "plane999 999deg 2008_11_06 08_51_09" respectively

The animation on the right shows another view of these two scans on the same plot to further illustrate the similarity in the "wave" indicating it is the scanner and not the scannee that is the source.



One interesting thing to note is the imperfections in both the mean and the rms of the scan of the granite slab above. These correspond to drilled holes and divots in the slab's surface as shown in the 2 plots below. The image on the left is a photo of the granite slab and the one on the right is the same, but with the mean plot from the scan data overlayed.

20081120 granite slab.jpg 20081120 granite plot overlay.jpg

First order correction to the data

The two plots below show a scan of the granite slab after some effort was made to better align the system physically. A scan of the granite slab before the adjustment can be seen above. (Or you can click here.) As can be seen in the scans, prior to the adjustment, there was an approximately 700 micron drop from the left edge of the active area to the right. After the adjustment, the drop was only 500 microns.

The plot on the left is of the depth measurements with no correction and the plot on the right has a linear correction of 500 microns per 97cm. While structure can still be seen in the corrected plot, only 3 colors from the color ramp are present indicating about a 150 micron maximum variation over the active area.

Example of the mean value of the granite slab from scan "plane999 999deg 2008_12_02 13_29_13"
Example of the corrected mean value of the granite slab from scan "plane999 000deg 2008_12_02 13_29_13"

The two plots below are of the RMS values of 1 inch bins corresponding to the two plots above. Again, the uncorrected data is plotted on the left while the (linearly) corrected data is plotted on the right. A small improvement can be seen in the light blue band at around x=20cm. The change here is between 1 and 2 colors on the color ramp indicating an improvement of between 5 and 10 microns.

Example of the rms value of the granite slab from scan "plane999 999deg 2008_12_02 13_29_13"
Example of the corrected rms value of the granite slab from scan "plane999 000deg 2008_12_02 13_29_13"

Note that the RMS of a 1 inch cell with a constant slope of the cathode plane is given by: (500microns/97cm * 2.54cm)/sqrt(12) = 3.8 microns. Second order or higher corrections to the depth measurements are expected to be no larger than the first order linear correction and should therefore not affect the overall flatness spec. reported with this system by more than, say, 10 microns.

Location of the code

The definitive location of the source code for all of the laser scanner system is kept in the Hall-D subversion repository in the following directory:

https://halldsvn.jlab.org/repos/trunk/home/davidl/FDC_laser

A working copy, however, will necessarily be kept on the FDC laser scanner computer in the ~laser/FLATNESS/src' directory.



Footnotes

  1. To copy to a USB drive, just plug the drive into the back of the computer and wait for the system to automount the disk. It will appear on the desktop where it can be accessed through the user interface. The disk itself will be mounted at a point inside the /media directory (e.g. /media/USB1). Once the relevant copies are made, make sure to unmount the disk before removing it. This can be done by right-clicking on the drive on the Desktop and selecting "unmount".


Back to Forward Drift Chamber Page