Resonant absorption imaging is a common technique for detecting the two-dimensional column density of ultracold atom systems. In many cases, the system s thickness along the imaging direction greatly exceeds the imaging system s depth of field, making the identification of the optimally focused configuration difficult. Here we describe a systematic technique for bringing Bose-Einstein condensates (BEC) and other cold-atom systems into an optimal focus even when the ratio of the thickness to the depth of field is large: a factor of 8 in this demonstration with a BEC. This technique relies on defocus-induced artifacts in the Fourier-transformed density-density correlation function (the power spectral density, PSD). The spatial frequency at which these artifacts first appear in the PSD is maximized on focus; the focusing process therefore both identifies and maximizes the range of spatial frequencies over which the PSD is uncontaminated by finite-thickness effects. (C) 2014 Author(s). All article content, except where otherwise noted, is licensed under a Creative Commons Attribution 3.0 Unported License.