def source_detection_task(par):
    """Returns a table of sources in a VphasFrame.

    Parameters
    ----------
    par : dict
        par['frame'] : `VphasFrame` instance
        par['cfg'] : `ConfigParser` instance

    Returns
    -------
    tbl : `astropy.table.Table` object
        Sources detected in par['frame']
    """
    # the psfrad and maxiter parameters were carefully chosen to speed
    # up source detection; psfrad_fwhm should be bigger for good photometry
    conf = par['cfg']['sourcelist']
    threshold = float(conf['threshold_' + par['frame'].band])
    tbl = par['frame'].compute_source_table(
                           threshold=threshold,
                           roundlo=float(conf.get('roundlo', -0.75)),
                           roundhi=float(conf.get('roundhi', 0.75)),
                           psfrad_fwhm=float(conf.get('psfrad_fwhm', 3.)),
                           fitrad_fwhm=float(conf.get('fitrad_fwhm', 1.)),
                           maxiter=int(conf.get('maxiter', 20)),
                           maxnpsf=int(conf.get('maxnpsf', 20)),
                           varorder=int(conf.get('varorder', 0)),
                           mergerad_fwhm=float(conf.get('mergerad_fwhm', 0.)),
                           annulus_fwhm=float(conf.get('annulus_fwhm', 4.)),
                           dannulus_fwhm=float(conf.get('dannulus_fwhm', 2.))
                           )
    return tbl