def jac_shape(n_ant, n_chan, n_dir):
    """Calculate the jacobian matrix shape based
    on the given data dimensions."""

    return (n_chan * n_ant * (n_ant - 1),
                2 * n_chan * n_dir * n_ant)