RONCHIFIT

Operator Instructions Source code

Purpose: Ronchifit is used determine the orientation of each calibrated ronchi image and generate an ASCII output table of the results.

How does it work?

The steps performed by Ronchifit on each input ronchi image are outlined below:

  1. Using a 2-D cubic convolution interpolator [1] go along vectors from one edge of the ronchi image, through the center, to the opposite edge, along the direction k, where k is in degrees, measured counter-clockwise from the positive x-axis. Do this for 0 <= k <= 180 degrees.

  2. When the vector is perpendicular to the ronchi ridges, the spacing between adjacent ridges is ~10 pixels. When the vector is parallel to the ridges one sees a constant (technically an infinite period). Slices through one ronchi image at several different angle are shown here:

    (Sample cuts through ronchi image at different angles.)

  3. The code actually produces three, interleaved, slices along each direction i.e.:

    slice 1 uses pixels 1, 4, 7, ....
    slice 2 uses pixels 2, 5, 8, ....
    slice 3 uses pixels 3, 6, 9, ....

    This provides adequate sampling for the smallest expected period (10 degrees) and significant over-sampling as the vector gets closer to being aligned with the ronchi ridges and the period approaches infinity.

  4. Each slice is forced to have a zero mean, and a cosine-bell apodization is applied over the outer 20% on both ends.

  5. The Fourier transform of each slice is computed.

  6. Then cross-spectra (of slices 1&2, 1&3, 2&3) are generated and averaged.

  7. The location of the of the peak is determined by first finding the where the maximum occurs and then refining this value using a 3-point parabolic interpolator. This gives the period for 1 vector.

  8. This process is repeated for every vector.

  9. When all of the vectors are processed we have a measure of the period for every angle. The location of the peak provides the an initial estimate for the direction along the ronchi ridges.

  10. (Measured Period vs. Angle for a single Ronchi.)

    Using this approach alone allows one to measure the angle to ~0.05 degree. We need significantly better accuracy than that.

  11. If we take the measured period as a function of angle, take it's inverse and rescale it to have unit amplitude, we find that the resultant curve can be modeled very well by the function:


    This plot compares the measured function to the above model: Modeling 1/Period vs. Angle

  12. The model is "slid" across the scaled 1/Period function, using small steps in theta. At each step the code computes the sum of the square of the differences between the measured curve and the modeled function. When this hits a minimum, the estimated angle is updated and the same process is repeated using smaller steps and a narrower range around the latest estimate. This is repeated three times, each time reducing the search zone and decreasing the step size. The estimated error on each final measurement is on the order of 0.001 degrees.

  13. The results of the calculations are recorded in arrays as the input ronchi images are processed.

  14. Once all of the images have been processed, the linear trend (how the camera would have been turning if the camera rotator had perfectly circular gears) is subtracted off.

  15. Now the code estimates the amplitudes of expected periods using [2], determines their significance using [3] and sorts the expected periods according to significance.

  16. Finally, the results are written to an ACSII table. The file should adhere to the following naming convention:

    ssrchyymmdd, where ss is the 2-character site abreviaion, rch is the 3-character code for "ronchi history file", yy is the 2-digit year, mm is the 2-digit month, and dd is the 2-digit day of when the ronchi data set was recorded.
    A sample "rch" file can be viewed here:

  17. (Sample ronchi history file (udrch021215))



Last updated by Cliff Toner on Friday, August 14, 2005, 11:40