The EPIC Algorithm
Derivation of the EPIC imaging equation, its equivalence to visibility-based imaging, gridding, autocorrelation removal, and computational cost.
From visibility gridding to electric-field gridding
In the optimal map-making, or software-holography, formalism (Morales & Matejek 2009; Morales 2011), each visibility is gridded onto the plane with the holographic beam . In the aperture plane this kernel is the cross-correlation of the two aperture illuminations, and the image is
Substituting , the sum over antenna pairs factorizes into the correlation of two gridded electric-field distributions:
By the convolution theorem, correlation in the aperture plane corresponds to pixel-wise multiplication in the image plane. This yields the EPIC imaging equation (Morales 2011; Thyagarajan et al. 2017, eq. 13; Krishnan et al. 2023):
For each F-engine time sample and frequency channel, the algorithm therefore consists of four operations:
- Gridding. The complex voltage of each antenna is placed on a regular aperture grid at position and convolved with the gridding kernel .
- Spatial Fourier transform. A two-dimensional inverse FFT of the grid yields the instantaneous electric-field image .
- Multiplication. Pixel-wise products of the electric-field images are formed.
- Averaging. The products are accumulated over the integration time.
For two orthogonal polarizations, the pixel-wise (Hadamard) products of the two electric-field images form the coherency matrix of each pixel:
Pseudo-Stokes parameters follow, e.g. and . The sign conventions depend on the orientation of the feeds.
Order of operations
In FX correlation the sequence is multiplication, averaging and then imaging. In EPIC it is imaging, multiplication and then averaging. The gridded electric field is a stochastic quantity with zero mean, so averaging cannot precede multiplication. Every channelized time sample must therefore be gridded and transformed: one transform every 40 µs per channel at LWA-SV. The cost of EPIC is consequently set by the Nyquist rate of the channelized data and is independent of the output cadence (Thyagarajan et al. 2017).
Autocorrelation removal
The squared sum contains, besides the cross terms , the self terms . These are the antenna autocorrelations , gridded with at zero spacing. They contribute the bulk of the total power and add a smooth pedestal to the image.
They are removed by the following procedure:
- The per-antenna autocorrelations, , and , are accumulated alongside the images.
- The accumulated autocorrelations are gridded at the grid center with the same kernels.
- The resulting grid is Fourier transformed.
- The transform is subtracted from the accumulated image.
The procedure costs one additional transform per integration. In epic++ (from version 0.8) it is performed within the imaging kernel.
Gridding kernels and grid correction
The gridding kernel determines the primary-beam weighting applied to each antenna. With antenna-specific kernels EPIC correctly images telescopes composed of non-identical antennas. Thyagarajan et al. (2017) showed that assuming identical kernels for non-identical antennas biases flux estimates by more than .
The kernel must also satisfy two practical requirements:
- It must suppress aliasing of emission from beyond the image boundary.
- It must remain compact, because the cost of gridding scales with the kernel area.
The kernel used in epic++ has the following properties:
- Kernel function. A zeroth-order prolate spheroidal wave function, the standard anti-aliasing kernel for convolutional gridding.
- Scaling. The kernel is scaled to the effective aperture of an LWA dipole, (LWA Memo 65).
- Support. Typically cells.
- Normalization. The kernel is integrated over each grid cell and normalized to unit sum for each antenna, which conserves flux.
The image-plane taper imposed by the kernel is removed by multiplying the image by , where is the antenna-averaged kernel.
Grid geometry
For an transform, the image-plane pixel scale and the aperture-plane cell size (in wavelengths) are related by . In epic++ the cell size is derived from the requested angular resolution at zenith, :
A cell size below ensures that the image spans , so the full hemisphere is imaged without aliasing of the horizon. The conventional LWA all-sky pixel scale is (Memo 012).
Antenna positions are expressed in wavelengths, . Each channel therefore has its own set of grid positions and kernel weights. The pixel scale in is fixed by and is common to all channels.
The coplanar approximation
The derivation assumes that all antennas lie in a common plane and neglects the term, . LWA-SV is nearly coplanar, and epic++ applies a per-antenna phase corresponding to the height of each stand. Over the full hemisphere, residual wide-field errors nevertheless reach approximately 10% within the beam (Kent et al. 2020).
Two corrections have been investigated:
- w-projection. The correction is incorporated into the per-antenna gridding kernels.
- Direct Fourier transform. The FFT is replaced by a direct Fourier transform, implemented as a dense matrix multiplication (Kent et al. 2020). This is exact, at a cost of .
Computational cost
Per channel, per polarization product and per F-engine time sample, the costs of EPIC and FX correlation are approximately (Thyagarajan et al. 2017)
The symbols are:
- , the number of cells in the gridding kernel;
- , the number of grid cells (the factor of four accounts for zero-padding);
- , a constant characterizing the FFT.
Imaging the full antenna field of view requires a cell size comparable to the antenna size, so . The cost of EPIC is therefore governed by the area of the aperture in units of the antenna area, not by the number of antennas. For a densely filled aperture, , and EPIC scales as .
Thyagarajan et al. (2017) applied this model to a range of radio telescopes:
| Favored architecture | Telescopes |
|---|---|
| EPIC | HERA-331, HERA-6769, CHIME, HIRAX, SKA1-Low stations, expanded LWA configurations |
| FX | MWA, LOFAR, small HERA configurations |
| Near break-even | LWA1, LWA-SV |
The output data rates differ more strongly than the arithmetic:
At LWA-SV the arithmetic costs of the two approaches are comparable. Short integration times favor EPIC, because the volume of the image output is independent of , and images at every time sample are intrinsic to the method.
On GPUs, an implementation of EPIC as separate gridding, transform and multiplication kernels is limited by memory bandwidth (Kent et al. 2019; Memo 009). FX correlation, by contrast, is limited by arithmetic throughput. The fused implementation described in GPU Kernel addresses this limitation.
Comparison of architectures
| FX correlator | EPIC | |
|---|---|---|
| Correlation | All antenna pairs | Pixel-wise multiplication after FFT |
| Cost per sample | ||
| Output per integration | visibilities | pixels |
| Time averaging | After multiplication | After multiplication; every sample is imaged |
| Calibration | Applied to visibilities, possibly offline | Applied to voltages before gridding |
| Antenna layout | Arbitrary | Arbitrary; most efficient for filled apertures |
| Optimal regime | Sparse antenna layouts, long integrations | Densely packed large- apertures, short integrations |