*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit ff76bad2 authored by Patrick Kappl's avatar Patrick Kappl
Browse files

Add data from INI file as attributes to output file

parent d8c20522
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,19 @@ jackknife.write_results_to_file()
# Add some useful metadata to the output file
try:
with h5py.File(jackknife.output_file_name, "r+") as output_file:
output_file[".config"].attrs.create("qmc.nmeas", abinitio_dga.n_meas)
config = output_file[".config"].attrs
config.create("qmc.nmeas", abinitio_dga.n_meas)
config.create("adga_root_directory",
np.string_(general["adga_root_directory"]))
config.create("adga_config_file",
np.string_(general["adga_config_file"]))
config.create("two_particle_file",
np.string_(general["two_particle_file"]))
config.create("n_processes", int(general["n_processes"]))
config.create("calculate_self_energy",
bool(strtobool(general["calculate_self_energy"])))
config.create("calculate_susceptibility",
bool(strtobool(general["calculate_susceptibility"])))
except Exception as e:
print("-- Something went wrong when adding metadata to the output file")
print(e)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment