“Parser: HTC Condition Parser” Module

A parser of HTC arguments

class panpython.sdk.parser.htc_condition_parser.JsonParser(json_file)[source]

Bases: object

A JSON parser of HTC arguments

Parameters

json_file (str) – full path of JSON file

Examples

>>> from panpython.sdk.parser.htc_condition_parser import JsonParser
>>> parser: JsonParser = JsonParser('htc_condition.JSON')
>>> task_map: dict = parser.task_map
property task_map

Dict[str, Dict[str, Union[int, float]]]: the map storing all conditions of the simulation, with task_id as the key

property task_type

str: The type of HTC calculation, for example, piont, line, precipitation, …

property units

Dict[str, str]: the units of variables in the HTC condition

write_PanHTC_interface(htc_file)[source]

Write an conf. file which can be used by HTC in Pandat GUI

Parameters

htc_file (str) – full path of the PanHTC file

write_statistics_log(stat_file)[source]

Write an log file of statistics of this HTC

Parameters

stat_file (str) – full path of the statistics log file

write_task_map(map_file)[source]

Write task map (task_id->task_condition) file on disk

Parameters

map_file (str) – full path of output file

write_thermal_history(th_file)[source]

Write thermal history file on disk

Parameters

th_file (str) – full path of output file