“Stat: HTC Result Results Processing” Module¶
The core module of htc result post-processing
- class panpython.sdk.stat.htc_result_post_processing.PandatHTCResultProcessor(cal_type, parent_path, file_name)[source]¶
Bases:
object
A post-processing class merging all Data from a HTC into a single csv file
- Parameters:
cal_type (str) – Type of HTC calculation
parent_path (str) – Parent path of HTC results
file_name (str) – Table names to be processed
Examples
>>> from panpython.sdk.stat.htc_result_post_processing import PandatHTCResultProcessor >>> >>> htc_result_parent_path = 'source/default' >>> file_name = 'Table/Default.table' >>> dump_path = './output/' >>> file_output = 'merged.csv' >>> >>> m_processor = PandatHTCResultProcessor(parent_path=htc_result_parent_path, ... file_name=file_name, ... cal_type='point') >>> m_processor.save_to_csv(output_path=dump_path, output_file=file_output)
- static get_table_group(cal_type, parent_path)[source]¶
Return a list of table group for post-processing
- Parameters:
cal_type (str) – type of HTC calculation
parent_path (str) – the folder holding sub folders of htc calculations
- Returns:
a list of htc result table group
- Return type:
list
- static htc_condition_dict_creator(cal_type, parent_path, output_path, output_file='htc_condition.json')[source]¶
Create a dictionary of htc conditions. Save the condition to a JSON file. Return the dictionary
- Parameters:
cal_type (str) – type of HTC calculation
parent_path (str) – the folder holding sub folders of htc calculations
output_path (str) – folder of output file
output_file (str, optional) – name of output file
- Returns:
a dictionary of htc conditions using task_id as key
- Return type:
dict