Skip to content

Calculating Uncertainties

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

How uncertainties are computed in ACCIV

One of the major strengths of ACCIV is that it provides a way to empirically estimate the uncertainties in the velocity extraction. Other velocity extraction methods do not have an empirical uncertainty estimate. ACCIV computes two types of velocity uncertainties and one uncertainty estimate for the location of a velocity vector. These are the correlation velocity uncertainty and the correlation location uncertainty described in Sec. 3.1 of Asay-Davis et al. (2009), and the one-sigma velocity uncertainty in Sec. 3.6 of the same paper.

The one-sigma velocity uncertainty

This is the root-mean square value of the difference between the scattered velocity vectors and the corresponding (interpolated) value of the smoother velocity fit to a regular grid. It tends to be less accurate than the correlation velocity uncertainty, but can be computed from the data available in a single ACCIV pass. This measure of uncertainty assumes that the velocity on the grid as found a good local mean of the velocity measurements, and computes the uncertainty as the standard deviation around that mean.

The correlation velocity uncertainty and the correlation location uncertainty

The correlation uncertainties can only be computed in passes after the first, where advectImages = true in the parameter file. This is because the correlation uncertainties make use of the "tie points" computed from advected images to determine the remaining error that cannot be accounted for by advection.

Note: The correlation uncertainties computed in a given pass correspond to the uncertainties in the velocity field used to perform the advection. This means that the correlation uncertainties computed in pass2 tell us about the uncertainty in the velocities from pass1, and likewise pass3 tells us about the correlation uncertainties in the velocity from pass2

Here is a detailed description of the correlation uncertainties from Sec. 3.1 of Asay-Davis et al. (2009):

Consider the uncertainty of a temporally steady velocity field v(x,y), extracted from a pair of images taken at times t,,1,, and t,,2,,. Here, the velocity could have been derived by any method, including a manual method. Use any numerically accurate method to advect the pixels of the first image at time t,,1,, forward to time t,,2,,. The numerical advection is done by integrating the pixel intensity I(x,y,t) forward from time t,,1,, to time t,,2,, using the advection equation dI/dt = v.grad(I). With sufficiently small step size, the errors due to numerical advection can be made insignificant with respect to the velocity uncertainties. If the velocity field v were exact, then the numerically-advected image would correlate perfectly with the pixels in the image at time t,,2,,. If the velocity has errors, then the features of the advected image at time t,,2,, are offset from those of the true image at time t,,2,,. We can use any automated velocity retrieval algorithm to find--not velocities--but the offsets between the advected and true images at time t,,2,,. For each correlation, we define this offset as the local correlation location uncertainty. (In practice, the offset can be measured at any time between t,,1,, and t,,2,,; we typically measure the local correlation location uncertainty midway between these two times.) If the separation time between two images is not too small, the correlation location uncertainty is a good measure of the uncertainty in the location of a dynamical feature, such as velocity peak (see Section 4). However, in the limit that the time separation between images goes to zero, the correlation location uncertainty goes to zero, and for separation times less than 2 h, the systematic errors are greater than the correlation location uncertainty, so the latter uncertainty is not a useful measure. We define the local correlation velocity uncertainty to be the correlation location uncertainty divided by the separation time between the images. (The correlation velocity uncertainty does not go to zero as the separation time between images goes to zero.) The correlation velocity uncertainty is a good measure for all image separation times of the uncertainty in the velocity due to all of the sources of random errors in the location and the magnitude of a velocity vector, including errors due to navigation, image resolution, changing lighting conditions, clouds at different elevations, and misidentified correlations (Section 4).

The correlation velocity uncertainty and correlation location uncertainty are found in the fields correlationVelocityResiduals and correlationLocationResiduals, with their standard deviations stored in rmsCorrelationVelocityUncertainty and rmsCorrelationLocationUncertainty in the file _work/combinedCorrelationTiePoints.h5 if advectImages = true in the parameter file for this pass (i.e. passes after the first pass). Conceptually, how ACCIV computes the correlation velocity uncertainty and correlation location uncertainty is fairly simple. Displacements, in the form of tie point coordinates (x1, y1) and (x2, y2), are divided by timesteps ∆t. Because these are the tie points of correlations between the advected images, not the raw images, the resulting velocities represent velocity corrections, not vectors from the actual velocity field. After a few passes, we can just take these correction velocities to be a measure of the uncertainties in the velocity field. As noted above, to find the uncertainty in the velocity field of pass3, you would take the values from the file pass4/work/combinedCorrelationTiePoints.h5.

Here is the structure of the combinedCorrelationTiePoints.h5 file:

acciv/tests/syntheticTest/day1/pass2/_work> h5ls combinedCorrelationTiePoints.h5 
correlationCoefficients  Dataset {60988}
correlationLocationResiduals Dataset {60988}
correlationVelocityResiduals Dataset {60988}
deltaTs                  Dataset {6}
lowerIndexDeltaT         Dataset {6}
rmsCorrelationLocationUncertainty Dataset {1}
rmsCorrelationVelocityUncertainty Dataset {1}
upperIndexDeltaT         Dataset {6}
x1                       Dataset {60988}
x2                       Dataset {60988}
y1                       Dataset {60988}
y2                       Dataset {60988}

In this case the correlations are based on 6 image pairs, and “deltaTs” gives the time difference between the image pairs. There are 60,988 tie points found, derived from all 6 image pairs.

To find out what ∆t corresponds to a given tie point, it is easiest to construct a new ∆t array with 60,988 elements, one for each tie point. This is how it’s done in IDL:

dT = dblarr(n_data)
for i=0,n_elements(deltaTs)-1 do 
dT[lowerIndexDeltaT[i]:upperIndexDeltaT[i]] = deltaTs[i]

In Asay-Davis et al. (2009), and in rmsCorrelationVelocityUncertainty and rmsCorrelationLocationUncertainty the correlation uncertainties reported for a dataset was a single number, the standard deviation of all the correlation uncertainties calculated as described above. Alternately, the uncertainties at each point, correlationVelocityResiduals or correlationLocationResiduals, could be shown as a scatter plot, histogram, or gridded onto a map.