def is_fits_file (s) :
	"""
	Tests filenames for .fits or .fit suffix.
	If the string contains a '*' then it is assumed to be a pattern.
	"""
	forms = ['.fits','.fit','.fits.gz','.fit.gz']
	if isinstance(s,str) :
		if '*' in s : return False
		ss = s.lower()
		for f in forms :
			if ss.endswith(f) : return True
	else :
		for x in s :
			ss = x.lower()
			if '*' in ss : return False
			for f in forms :
				if ss.endswith(f) : return True
	return False