def remesh_gi(data, ai, npt=None, q_h_range=None, q_v_range=None, method='splitbbox', mask=None):
    """
    Redraw the Grazing-Incidence image in (qp, qz) coordinates using pyGIX

    Parameters:
    -----------
    :param data: 2D image in pixel
    :type data: numpy 2D array of float
    :param ai: pyGIX transform operator
    :type ai: pyGIXTransform operator
    :param npt: number of point for the binning
    :type npt: int
    :param q_h_range: Starting and ending point for the q_horizontal range
    :type q_h_range: Tuple(float, float), optional
    :param q_v_range: Starting and ending point for the q_vertical range
    :type q_v_range: Tuple(float, float), optional
    :param method: Method fot the remeshing
    :type method: String: 'splitbbox', ...
    :param mask: Mask of the 2D raw image
    :type mask: numpy 2D array of boolean
    """

    img, q_par, q_ver = ai.transform_reciprocal(data,
                                                npt=npt,
                                                ip_range=q_h_range,
                                                op_range=q_v_range,
                                                method=method,
                                                unit='A',
                                                mask=mask)

    return img, q_par, q_ver