def centroid(im, gyx, method='weighted'):
    """Method to centroid on a target used different methods

    Parameters
    ----------
    im : array, mandatory
        image
    gyx : tuple, mandatory
        initial guess coordinates (y, x)
    method : str, optional, default: `weighted`, choices: [`weighted`,
        `peak`, `comet`]
        method to use for finding centroid

    Returns
    -------
    tuple, (y,x) image coordinates

    Examples
    --------
    >>> from astropy.io import fits
    >>> from sbpy.imageanalysis import centroid # doctest: +SKIP
    >>> hdu = fits.open('test.fits') # doctest: +SKIP
    >>> cyx = centroid(hdu[0].data, (21, 45)) # doctest: +SKIP

    not yet implemented

    """
