def isSU(filename): """ Checks whether or not the given file is a Seismic Unix (SU) file. :type filename: str :param filename: Seismic Unix file to be checked. :rtype: bool :return: ``True`` if a Seismic Unix file. .. note:: This test is rather shaky because there is no reliable identifier in a Seismic Unix file. """ with open(filename, 'rb') as f: stat = autodetectEndianAndSanityCheckSU(f) if stat is False: return False else: return True