Delphin Parser

delphin_6_automation.file_parsing.delphin_parser.cvode_stats_to_dict(path: str) → dict[source]

Converts a Delphin integrator_cvode_stats file into a dict.

Parameters:path – path to folder
Returns:converted tsv dict
delphin_6_automation.file_parsing.delphin_parser.d6o_to_dict(path: str, filename: str, number_of_hours: Optional[int] = None) → Tuple[list, dict][source]

Converts a Delphin results file into a dict.

Parameters:
  • path – path to folder
  • filename – file name with extension
Returns:

converted result dict

delphin_6_automation.file_parsing.delphin_parser.dict_to_cvode_stats_file(file_dict: dict, log_path: str) → bool[source]

Turns a dictionary into a delphin cvode stats file.

Parameters:
  • file_dict – Dictionary holding the information for the cvode stats file
  • log_path – Path to were the cvode stats file should be written
Returns:

True

delphin_6_automation.file_parsing.delphin_parser.dict_to_d6o(result_dict: dict, result_path: str, simulation_start: datetime.datetime, geometry_file_name: str, geometry_file_hash: int) → bool[source]

Turns a dictionary into a delphin result file.

Parameters:
  • result_dict – Dictionary representation of the database entry
  • result_path – Path to were the result file should be written
  • simulation_start – Start time for the simulation
  • geometry_file_name – Name of the geometry file
  • geometry_file_hash – Hash of the geometry file
Returns:

True

delphin_6_automation.file_parsing.delphin_parser.dict_to_g6a(geometry_dict: dict, result_path: str) → bool[source]

Turns a dictionary into a delphin geometry file.

Parameters:
  • geometry_dict – Dictionary holding the information for the geometry file
  • result_path – Path to were the geometry file should be written
Returns:

True

delphin_6_automation.file_parsing.delphin_parser.dict_to_les_stats_file(file_dict: dict, log_path: str) → bool[source]

Turns a dictionary into a delphin les stats file.

Parameters:
  • file_dict – Dictionary holding the information for the les stats file
  • log_path – Path to were the les stats file should be written
Returns:

True

delphin_6_automation.file_parsing.delphin_parser.dict_to_progress_file(file_dict: dict, log_path: str) → bool[source]

Turns a dictionary into a delphin progress file.

Parameters:
  • file_dict – Dictionary holding the information for the progress file
  • log_path – Path to were the progress file should be written
Returns:

True

delphin_6_automation.file_parsing.delphin_parser.dp6_to_dict(path: str) → dict[source]

Converts a Delphin 6 project file to a python dict.

Parameters:path – Path to the Delphin project file
Returns:Dictionary with the project file information
delphin_6_automation.file_parsing.delphin_parser.g6a_to_dict(path: str, filename: str) → dict[source]

Converts a Delphin geometry file into a dict.

Parameters:
  • path – path to folder
  • filename – file name with extension
Returns:

converted geometry dict

delphin_6_automation.file_parsing.delphin_parser.les_stats_to_dict(path: str) → dict[source]

Converts a Delphin LES_direct_stats file into a dict.

Parameters:path – path to folder
Returns:converted les stats dict
delphin_6_automation.file_parsing.delphin_parser.progress_to_dict(path: str) → dict[source]

Converts a Delphin progress file into a dict.

Parameters:path – path to folder
Returns:converted progress dict
delphin_6_automation.file_parsing.delphin_parser.write_log_files(result_obj: delphin_6_automation.database_interactions.db_templates.result_raw_entry.Result, download_path: str) → bool[source]

Turns a result database entry into a delphin log file.

Parameters:
  • result_obj – Database entry
  • download_path – Path to were the log file should be written
Returns:

True