@staticmethod
def is_bpm_file(filename, fits_dict):
    """ Checks if file is a bad pixel mask using several rules for various naming schemes """
    if fits_dict.get('OBSTYPE') == 'BPM' or fits_dict.get('EXTNAME') == 'BPM':
        return True
    filename = filename.replace('_', '-')
    if filename.startswith('bpm-') or '-bpm-' in filename or filename.endswith(
        '-bpm'):
        return True
    return False
