  We present the E-field Parallel Imaging Calibration (EPICal) algorithm, which
addresses the need for a fast calibration method for direct imaging radio
astronomy correlators. Direct imaging involves a spatial fast Fourier transform
of antenna signals, alleviating an $\mathcal{O}(N_{\mathrm{ant}}^2)$
computational bottleneck typical in radio correlators, and yielding a more
gentle $\mathcal{O}(N_g \log_2 N_g)$ scaling, where $N_{\mathrm{ant}}$ is the
number of antennas in the array and $N_g$ is the number of grid points in the
imaging analysis. This can save orders of magnitude in computation cost for
next generation arrays consisting of hundreds or thousands of antennas.
However, because antenna signals are mixed in the imaging correlator without
creating visibilities, gain correction must be applied prior to imaging, rather
than on visibilities post-correlation. We develop the EPICal algorithm to form
gain solutions quickly and without ever forming visibilities. This method
scales as the number of antennas, and produces results comparable to those from
visibilities. We use simulations to demonstrate the EPICal technique and study
the noise properties of our gain solutions, showing they are similar to
visibility based solutions in realistic situations. By applying EPICal to two
seconds of Long Wavelength Array data we achieve a 65% dynamic range
improvement compared to uncalibrated images, showing this algorithm is a
promising solution for next generation instruments.
