def METHOD_NAME(self, img, t, mask=None):
    """
    Translate an image by phase shifting its Fourier transform
    Inputs:
        img: FT of image (B x img_dims x 2)
        t: shift in pixels (B x T x 2)
        mask: Mask for lattice coords (img_dims x 1)
    Returns:
        Shifted images (B x T x img_dims x 2)
    img_dims can either be 2D or 1D (unraveled image)
    """
    # F'(k) = exp(-2*pi*k*x0)*F(k)
    coords = self.freqs2d if mask is None else self.freqs2d[mask]
    img = img.unsqueeze(1)  # Bx1xNx2
    t = t.unsqueeze(-1)  # BxTx2x1 to be able to do bmm
    tfilt = coords @ t * -2 * np.pi  # BxTxNx1
    tfilt = tfilt.squeeze(-1)  # BxTxN
    c = torch.cos(tfilt)  # BxTxN
    s = torch.sin(tfilt)  # BxTxN
    return torch.stack(
        [img[..., 0] * c - img[..., 1] * s, img[..., 0] * s + img[..., 1] * c], -1
    )