def compress_snapshot(self, directory='output', directory_out='', snapshot_index=600, analysis_directory='~/analysis', python_executable='python3'):
    '\n        Compress single snapshot (which may be multiple files) in input directory.\n\n        Parameters\n        ----------\n        directory : str : directory of snapshot\n        directory_out : str : directory to write compressed snapshot\n        snapshot_index : int : index of snapshot\n        analysis_directory : str : directory of analysis code\n        '
    executable = '{} {}/manipulate_hdf5/compactify_hdf5.py -L 0'.format(python_executable, analysis_directory)
    snapshot_name_base = 'snap*_{:03d}*'
    if (directory[(- 1)] != '/'):
        directory += '/'
    if (directory_out and (directory_out[(- 1)] != '/')):
        directory_out += '/'
    path_file_names = glob.glob((directory + snapshot_name_base.format(snapshot_index)))
    if len(path_file_names):
        if ('snapdir' in path_file_names[0]):
            path_file_names = glob.glob((path_file_names[0] + '/*'))
        path_file_names.sort()
        for path_file_name in path_file_names:
            if directory_out:
                path_file_name_out = path_file_name.replace(directory, directory_out)
            else:
                path_file_name_out = path_file_name
            executable_i = '{} -o {} {}'.format(executable, path_file_name_out, path_file_name)
            self.say('executing:  {}'.format(executable_i))
            os.system(executable_i)
Compress single snapshot (which may be multiple files) in input directory.

Parameters
----------
directory : str : directory of snapshot
directory_out : str : directory to write compressed snapshot
snapshot_index : int : index of snapshot
analysis_directory : str : directory of analysis code
def compress_snapshot(self, directory='output', directory_out=, snapshot_index=600, analysis_directory='~/analysis', python_executable='python3'):
    '\n        Compress single snapshot (which may be multiple files) in input directory.\n\n        Parameters\n        ----------\n        directory : str : directory of snapshot\n        directory_out : str : directory to write compressed snapshot\n        snapshot_index : int : index of snapshot\n        analysis_directory : str : directory of analysis code\n        '
    executable = '{} {}/manipulate_hdf5/compactify_hdf5.py -L 0'.format(python_executable, analysis_directory)
    snapshot_name_base = 'snap*_{:03d}*'
    if (directory[(- 1)] != '/'):
        directory += '/'
    if (directory_out and (directory_out[(- 1)] != '/')):
        directory_out += '/'
    path_file_names = glob.glob((directory + snapshot_name_base.format(snapshot_index)))
    if len(path_file_names):
        if ('snapdir' in path_file_names[0]):
            path_file_names = glob.glob((path_file_names[0] + '/*'))
        path_file_names.sort()
        for path_file_name in path_file_names:
            if directory_out:
                path_file_name_out = path_file_name.replace(directory, directory_out)
            else:
                path_file_name_out = path_file_name
            executable_i = '{} -o {} {}'.format(executable, path_file_name_out, path_file_name)
            self.say('executing:  {}'.format(executable_i))
            os.system(executable_i)