def test_compression(self, snapshot_indices='all', simulation_directory='.', snapshot_directory='output', compression_level=0):
    '\n        Read headers from all snapshot files in simulation_directory to check whether files have\n        been compressed.\n        '
    header_compression_name = 'compression.level'
    simulation_directory = ut.io.get_path(simulation_directory)
    snapshot_directory = ut.io.get_path(snapshot_directory)
    Read = gizmo_io.ReadClass()
    compression_wrong_snapshots = []
    compression_none_snapshots = []
    if ((snapshot_indices is None) or (snapshot_indices == 'all')):
        (_path_file_names, snapshot_indices) = Read.get_snapshot_file_names_indices((simulation_directory + snapshot_directory))
    elif np.isscalar(snapshot_indices):
        snapshot_indices = [snapshot_indices]
    for snapshot_index in snapshot_indices:
        header = Read.read_header('index', snapshot_index, simulation_directory, verbose=False)
        if (header_compression_name in header):
            if ((compression_level is not None) and (header[header_compression_name] != compression_level)):
                compression_wrong_snapshots.append(snapshot_index)
        else:
            compression_none_snapshots.append(snapshot_index)
    self.say('* tested {} snapshots: {} - {}'.format(len(snapshot_indices), min(snapshot_indices), max(snapshot_indices)))
    self.say('* {} are uncompressed'.format(len(compression_none_snapshots)))
    if len(compression_none_snapshots):
        self.say('{}'.format(compression_none_snapshots))
    self.say('* {} have wrong compression (level != {})'.format(len(compression_wrong_snapshots), compression_level))
    if len(compression_wrong_snapshots):
        self.say('{}'.format(compression_wrong_snapshots))
Read headers from all snapshot files in simulation_directory to check whether files have
been compressed.
def test_compression(self, snapshot_indices='all', simulation_directory='.', snapshot_directory='output', compression_level=0):
    '\n        Read headers from all snapshot files in simulation_directory to check whether files have\n        been compressed.\n        '
    header_compression_name = 'compression.level'
    simulation_directory = ut.io.get_path(simulation_directory)
    snapshot_directory = ut.io.get_path(snapshot_directory)
    Read = gizmo_io.ReadClass()
    compression_wrong_snapshots = []
    compression_none_snapshots = []
    if ((snapshot_indices is None) or (snapshot_indices == 'all')):
        (_path_file_names, snapshot_indices) = Read.get_snapshot_file_names_indices((simulation_directory + snapshot_directory))
    elif np.isscalar(snapshot_indices):
        snapshot_indices = [snapshot_indices]
    for snapshot_index in snapshot_indices:
        header = Read.read_header('index', snapshot_index, simulation_directory, verbose=False)
        if (header_compression_name in header):
            if ((compression_level is not None) and (header[header_compression_name] != compression_level)):
                compression_wrong_snapshots.append(snapshot_index)
        else:
            compression_none_snapshots.append(snapshot_index)
    self.say('* tested {} snapshots: {} - {}'.format(len(snapshot_indices), min(snapshot_indices), max(snapshot_indices)))
    self.say('* {} are uncompressed'.format(len(compression_none_snapshots)))
    if len(compression_none_snapshots):
        self.say('{}'.format(compression_none_snapshots))
    self.say('* {} have wrong compression (level != {})'.format(len(compression_wrong_snapshots), compression_level))
    if len(compression_wrong_snapshots):
        self.say('{}'.format(compression_wrong_snapshots))