Skip to content

Optimizing Parameters

Xylar Asay-Davis edited this page Mar 16, 2015 · 1 revision

How to optimize ACCIV's parameters

As we discussed previously, the behavior of ACCIV is controlled by input parameters in the parameters.ascii and defaultParameters.ascii file.

Some of these are control parameters that have to be set differently for each ACCIV pass. These control parameters include: earlierImageIndices, laterImageIndices, advectImages, advectionTimeFlag, inEarlierVelocityFileName, inLaterVelocityFileName, minimumTimeSeparation, and maximumTimeSeparation. Once you have set these correctly for a given pass on a given data set, you probably won’t need to set them again.

However, other major parameters will need to be iteratively changed, depending on the results coming from ACCIV, until a good velocity field is found. Generally, only three parameters will need to be iteratively changed this way: correlationBoxSize, searchRange, and stride.

I call this the "art" of ACCIV because it requires subjective evaluation. You must run ACCIV, examine the results, and then decide how to change the major parameters for the next attempt. Here are some guidelines for how to set the major parameters:

Correlation box size

The box has to be large enough to fit a unique pattern of cloud features. As the search range shrinks in later passes, the correlation box size can also shrink (usually by about half), depending on how much clouds change by mechanisms other than advection. Your answers to Assignment 1 show this trend in the synthetic data. There, because distortion of the brightness pattern is so strong, the reduction in correlation box size was not that large.

Tables 4 and 5 in Asay-Davis et al. (2009) give several examples of how correlation box size changes between passes for different data sets. However, different parameter settings can be used to obtain a “correct” answer, so these are not necessarily the best or only possible parameter choices to make.

If the correlation box size is too small, then there is too much noise in the resulting tie points and scattered velocities. Longer-time correlations always require bigger correlation boxes than shorter time correlations, because the images tend to change in ways that can’t be accounted for by advecting the images.

Search range

This should be slightly larger than the maximum displacement in the data.

To estimate the maximum displacement, find the distance in pixels that a cloud can move between your images separated by the maximum time. So for images that are not being advected, this is (the maximum velocity)/(meters per pixel)*(time interval). But you may not know the maximum velocity in advance. In that case, you can try to identify the maximum displacement in the images by eye.

The most sophistocated method would be to try a large search range, and look at the histogram of displacements after one pass of ACCIV.  If most of the displacements are much smaller than your range, then it’s a good idea to shrink the range to avoid spurious correlations. The displacements can be found in the combinedCorrelationTiePoints.h5 file in the _work/ directory of an ACCIV pass. The units in this file will be determined by the bounds field in each imageNNN.h5 file, so for planetary images the displacements will be in degrees of latitude/longitude. Just divide by resolution in degrees/pixel to get back to displacements in pixel units.

Stride (or correlation box shift)

The stride is the number of pixels by which the correlation box is shifted between each measurement. It is roughly equivalent to the output resolution of the velocity field: if image size is nx * ny, then a run will produce a maximum of about (nx * ny)/stride^2^ independent vectors. In practice the maximum number of vectors is a bit smaller, since you have to be able to fit the correlation box and the search range as well, so there will be missing correlations at the edges.

For speed--and because more vectors just tend to add more noise--it is best to use a large stride to begin with, and then drop to a much smaller number. In the final passes, stride should be close to the effective resolution length (see Asay-Davis et al. 2009, Fig. 9). There is no harm in “oversampling” the final pass by having stride=1 pixel, even if the effective resolution length is larger than 1 pixel.

Smoothing

Asay-Davis et al. (2009) discusses smoothing in some detail. However, ACCIV's smooth-fitting algorithm has been changed completely (twice) since that paper was published. The method now closely follows the paper:

Lee, S., Wolberg, G., & Shin, S. (1997). Scattered data interpolation with multilevel B-splines. IEEE Transactions on Visualization and Computer Graphics, 3(3), 228–244.

The smooth fit involves a single parameter, smoothFitMinControlPointScatteredNeighbors, which can be increased to increase smoothness, and which will be discussed in more detail in Mastering ACCIV.