def postprocess(simulation_dir, params):
    '\n    Run post-processing.\n\n    @param simulation_dir: the simulation directory\n    @param params: the post-processing parameters\n    @return: the post-processing log content\n    @raise TypeError: if any input parameter is not of required type\n    @raise ValueError: if any input parameter is None/empty, or any field of PostprocessingParameters is not\n                        of valid value\n    @raise ServiceError: if error occurs during launching the post-processing\n    '
    signature = (__name__ + '.postprocess()')
    helper.log_entrance(_LOGGER, signature, {'simulation_dir': simulation_dir, 'params': params})
    helper.check_not_none_nor_empty(simulation_dir, 'simulation_dir')
    helper.check_is_directory(simulation_dir, 'simulation_dir')
    helper.check_type_value(params, 'params', PostprocessingParameters, False)
    helper.check_type_value(params.irf, 'params.irf', list, False)
    for irf_item in params.irf:
        helper.check_not_none_nor_empty(irf_item, 'irf_item')
    helper.check_not_none_nor_empty(params.show_pressure, 'params.show_pressure')
    helper.check_type_value(params.kochin_function, 'params.kochin_function', list, False)
    for kochin_function_item in params.kochin_function:
        helper.check_not_none_nor_empty(kochin_function_item, 'kochin_function_item')
    helper.check_type_value(params.free_surface_elevation, 'params.free_surface_elevation', list, False)
    for elevation_item in params.free_surface_elevation:
        helper.check_not_none_nor_empty(elevation_item, 'elevation_item')
    try:
        with h5py.File(os.path.join(simulation_dir, 'db.hdf5'), 'a') as hdf5_data:
            utility.write_postprocessing_section(params, hdf5_data)
        postprocessing_log_path = os.path.join(simulation_dir, 'postprocessing_log.txt')
        custom_config = {'HDF5_FILE': os.path.join(simulation_dir, 'db.hdf5'), 'NEMOH_CALCULATIONS_FILE': None, 'NEMOH_INPUT_FILE': None, 'MESH_TEC_FILE': os.path.join(simulation_dir, 'mesh', 'mesh.tec'), 'FK_FORCE_TEC_FILE': os.path.join(simulation_dir, 'results', 'fkforce.tec'), 'RADIATION_COEFFICIENTS_TEC_FILE': os.path.join(simulation_dir, 'results', 'radiationcoefficients.tec'), 'DIFFRACTION_FORCE_TEC_FILE': os.path.join(simulation_dir, 'results', 'diffractionforce.tec'), 'EXCITATION_FORCE_TEC_FILE': os.path.join(simulation_dir, 'results', 'excitationforce.tec'), 'IRF_TEC_FILE': os.path.join(simulation_dir, 'results', 'irf.tec'), 'WAVE_FIELD_TEC_FILE': os.path.join(simulation_dir, 'results', 'WaveField.tec'), 'GREEN_TABULATION_NUMX': 328, 'GREEN_TABULATION_NUMZ': 46, 'GREEN_TABULATION_SIMPSON_NPOINTS': 251, 'USE_ODE_INFLUENCE_COEFFICIENTS': False, 'USE_HIGHER_ORDER': False, 'NUM_PANEL_HIGHER_ORDER': 1, 'B_SPLINE_ORDER': 1, 'USE_DIPOLES_IMPLEMENTATION': False, 'THIN_PANELS': [(- 1)], 'COMPUTE_DRIFT_FORCES': False, 'COMPUTE_YAW_MOMENT': False, 'REMOVE_IRREGULAR_FREQUENCIES': False}
        _LOGGER.debug('Start postProcessor function.')
        run_thread(postprocessor.postprocess, (custom_config,), postprocessing_log_path)
        _LOGGER.debug('End postProcessor in subprocess.')
        with open(postprocessing_log_path, 'r') as log_file:
            ret = log_file.read()
            helper.log_exit(_LOGGER, signature, [ret])
            return ret
    except Exception as e:
        helper.log_exception(_LOGGER, signature, e)
        raise ServiceError(('Error occurs when running postprocess. Caused by:\n' + unicode(str(e))))
Run post-processing.

@param simulation_dir: the simulation directory
@param params: the post-processing parameters
@return: the post-processing log content
@raise TypeError: if any input parameter is not of required type
@raise ValueError: if any input parameter is None/empty, or any field of PostprocessingParameters is not
                    of valid value
@raise ServiceError: if error occurs during launching the post-processing
def postprocess(simulation_dir, params):
    '\n    Run post-processing.\n\n    @param simulation_dir: the simulation directory\n    @param params: the post-processing parameters\n    @return: the post-processing log content\n    @raise TypeError: if any input parameter is not of required type\n    @raise ValueError: if any input parameter is None/empty, or any field of PostprocessingParameters is not\n                        of valid value\n    @raise ServiceError: if error occurs during launching the post-processing\n    '
    signature = (__name__ + '.postprocess()')
    helper.log_entrance(_LOGGER, signature, {'simulation_dir': simulation_dir, 'params': params})
    helper.check_not_none_nor_empty(simulation_dir, 'simulation_dir')
    helper.check_is_directory(simulation_dir, 'simulation_dir')
    helper.check_type_value(params, 'params', PostprocessingParameters, False)
    helper.check_type_value(params.irf, 'params.irf', list, False)
    for irf_item in params.irf:
        helper.check_not_none_nor_empty(irf_item, 'irf_item')
    helper.check_not_none_nor_empty(params.show_pressure, 'params.show_pressure')
    helper.check_type_value(params.kochin_function, 'params.kochin_function', list, False)
    for kochin_function_item in params.kochin_function:
        helper.check_not_none_nor_empty(kochin_function_item, 'kochin_function_item')
    helper.check_type_value(params.free_surface_elevation, 'params.free_surface_elevation', list, False)
    for elevation_item in params.free_surface_elevation:
        helper.check_not_none_nor_empty(elevation_item, 'elevation_item')
    try:
        with h5py.File(os.path.join(simulation_dir, 'db.hdf5'), 'a') as hdf5_data:
            utility.write_postprocessing_section(params, hdf5_data)
        postprocessing_log_path = os.path.join(simulation_dir, 'postprocessing_log.txt')
        custom_config = {'HDF5_FILE': os.path.join(simulation_dir, 'db.hdf5'), 'NEMOH_CALCULATIONS_FILE': None, 'NEMOH_INPUT_FILE': None, 'MESH_TEC_FILE': os.path.join(simulation_dir, 'mesh', 'mesh.tec'), 'FK_FORCE_TEC_FILE': os.path.join(simulation_dir, 'results', 'fkforce.tec'), 'RADIATION_COEFFICIENTS_TEC_FILE': os.path.join(simulation_dir, 'results', 'radiationcoefficients.tec'), 'DIFFRACTION_FORCE_TEC_FILE': os.path.join(simulation_dir, 'results', 'diffractionforce.tec'), 'EXCITATION_FORCE_TEC_FILE': os.path.join(simulation_dir, 'results', 'excitationforce.tec'), 'IRF_TEC_FILE': os.path.join(simulation_dir, 'results', 'irf.tec'), 'WAVE_FIELD_TEC_FILE': os.path.join(simulation_dir, 'results', 'WaveField.tec'), 'GREEN_TABULATION_NUMX': 328, 'GREEN_TABULATION_NUMZ': 46, 'GREEN_TABULATION_SIMPSON_NPOINTS': 251, 'USE_ODE_INFLUENCE_COEFFICIENTS': False, 'USE_HIGHER_ORDER': False, 'NUM_PANEL_HIGHER_ORDER': 1, 'B_SPLINE_ORDER': 1, 'USE_DIPOLES_IMPLEMENTATION': False, 'THIN_PANELS': [(- 1)], 'COMPUTE_DRIFT_FORCES': False, 'COMPUTE_YAW_MOMENT': False, 'REMOVE_IRREGULAR_FREQUENCIES': False}
        _LOGGER.debug('Start postProcessor function.')
        run_thread(postprocessor.postprocess, (custom_config,), postprocessing_log_path)
        _LOGGER.debug('End postProcessor in subprocess.')
        with open(postprocessing_log_path, 'r') as log_file:
            ret = log_file.read()
            helper.log_exit(_LOGGER, signature, [ret])
            return ret
    except Exception as e:
        helper.log_exception(_LOGGER, signature, e)
        raise ServiceError(('Error occurs when running postprocess. Caused by:\n' + unicode(str(e))))