  We develop an estimator for the correlation function which, in the ensemble
average, returns the shape of the correlation function, even for signals that
have significant correlations on the scale of the survey region. Our estimator
is general and works in any number of dimensions. We develop versions of the
estimator for both diffuse and discrete signals. As an application, we examine
Monte Carlo simulations of X-ray background measurements. These include a
realistic, spatially-inhomogeneous population of spurious detector events. We
discuss applying the estimator to the averaging of correlation functions
evaluated on several small fields, and to other cosmological applications.
