def is_psf(filename, patterns=['_psf.fits']):
    """
    Check whether a file is a PSF file with a standard name, typically
    '_psf.fits'. This is used for the simulation of sources during the CNN
    training for instance.
    """
    flag = False
    for ptn in patterns:
        if ptn in filename:
            flag = True
            break

    return flag