![This figure illustrates the process of gridding or degridding a single visibility. The $uv$ plane of size $N_{\rm pix}$ is partitioned into boxes size $L$. The box size can be the same size as a $uv$ cell. Each box contains $(p - p_d+1)^2$ Taylor coefficients. To grid or degrid a visibility indexed by $j$, all boxes within $R_j$ of the visibility $uv$ position ($t_j$) are updated (circular blue shaded region). Within each box, $q^2$ Taylor coefficients are updated with no cheating. If cheating is enabled (i.e. $p_d > 0$), then only $q'^2$ of the $(p-p_d+1)^2$ Taylor coefficients (orange shaded region) are updated. $R_j$ has been exaggerated for clarity.[]{data-label="fig:grid"}](fig1-0.eps)

For a detailed description of the algorithm, we refer the reader to S91. For the purposes of explaining our implementation, we outline the algorithm in the following text, using similar notation to S91. This description applies to the one-dimensional case, but S91 describes the relationships to extend it to the multi-dimensional case (using multi-index notation), for which the 2D case is relevant here. Additionally, this description is only valid for real Gaussians. The extension to complex Gaussians will be considered in the next section.

The algorithm proceeds as follows:

1.  Given values 