def METHOD_NAME(self, img, t, mask=None):
    """
    Translate an image by phase shifting its Hartley transform
    Inputs:
        img: HT of image (B x img_dims)
        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)
    img must be 1D unraveled image, symmetric around DC component
    """
    # H'(k) = cos(2*pi*k*t0)H(k) + sin(2*pi*k*t0)H(-k)
    coords = self.freqs2d if mask is None else self.freqs2d[mask]
    img = img.unsqueeze(1)  # Bx1xN
    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 c * img + s * img[:, :, torch.arange(len(coords) - 1, -1, -1)]