next up previous [pdf]

Next: Linear interpolation Up: FAMILIAR OPERATORS Previous: Nearest-neighbor coordinates

Data-push binning

A most basic data modeling operation is to copy a number from an $(x,y)$-location on a map to a 1-D survey data track $d(s)$, where $s$ is a coordinate running along a survey track. This copying proceeds for all $s$. The track could be along either a straight, curved, or arbitrary line. Let the coordinate $s$ take on integral values. Along with the elements $d(s)$ are the coordinates $(x(s),y(s))$ where on the map the data value $d(s)$ would be recorded.

Code for the operator is shown in module bin2.

user/gee/bin2.c
    for (id=0; id < nd; id++) {
        i1 = 0.5 + (xy[0][id]-o1)/d1;
	i2 = 0.5 + (xy[1][id]-o2)/d2;
        if (0<=i1 && i1<m1 &&
            0<=i2 && i2<m2) {
	    im = i1+i2*m1;	    
	    if (adj) mm[im] += dd[id];
	    else     dd[id] += mm[im];
	}
    }
To invert this data modeling operation, going from $d(s)$ to $(x(s),y(s))$ requires more than the adjoint operator because each bin ends up with a different number of data values. After the adjoint operation is performed, the inverse operator needs to divide the bin sum by the number of data values that landed in the bin. It is this inversion operator that is generally called ``binning'' (although we will use that name here for the modeling operator). To find the number of data points in a bin, we can simply apply the adjoint of bin2 to pseudo data of all ones. To capture this idea in an equation, let $\bold B$ denote the linear operator in which the bin value is sprayed to the data values. The inverse operation, in which the data values in the bin are summed and divided by the number in the bin, is represented by:
\begin{displaymath}
\bold m \eq {\bf diag}( \bold B\T \bold 1)^{-1} \bold B\T \bold d
\end{displaymath} (15)

Empty bins, of course, leave us a problem because we dare not divide by the zero sum they contain. We address this zero divide issue in Chapter [*]. In Figure 3, the empty bins contain zero values.

galbin
galbin
Figure 3.
Binned depths of the Sea of Galilee.
[pdf] [png] [scons]


next up previous [pdf]

Next: Linear interpolation Up: FAMILIAR OPERATORS Previous: Nearest-neighbor coordinates

2014-09-27