import re


def ref_files(fname):
    """
    Which files to curate for REF with the given FITS image filename
    """
    regex = "(.*Skymapper_.*)_(wcs|mask).fits"
    match = re.search(regex, fname)
    if match is None:
        return [ ]
    rootfname = match.group(1)
    return [rootfname + ext for ext in
            ('_wcs.fits.gz', '_wcs.fits.stars', '_mask.fits.gz')]