Commit ebab6b5f authored by Henri Payno's avatar Henri Payno
Browse files

[io] update dicttonx to latest API

parent a261fd59
......@@ -484,7 +484,7 @@ def write_xas_proc(
if plot.silx_style is not None:
nexus_dict["@SILX_style"] = json.dumps(plot.silx_style)
dicttonx(nexus_dict, h5_file, mode="a", h5path=plot_path, existing="overwrite")
dicttonx(nexus_dict, h5_file, mode="a", h5path=plot_path, update_mode="replace")
# save plots
for i_plot, plot in enumerate(plots):
......@@ -498,7 +498,9 @@ def write_xas_proc(
"@NX_class": "NXdata",
"@default": "plot_0",
}
dicttonx(nexus_dict, h5_file, mode="a", h5path=plots_path, existing="overwrite")
dicttonx(
nexus_dict, h5_file, mode="a", h5path=plots_path, update_mode="replace"
)
if process.getConfiguration() is not None:
h5_path = "/".join((nx_process_path, "configuration"))
......@@ -566,11 +568,11 @@ def write_xas(
}
if overwrite:
mode = "w"
existing = "overwrite"
update_mode = "replace"
else:
mode = "a"
existing = "add"
dicttonx(nx_dict, h5_file, h5path=h5path, mode=mode, existing=existing)
update_mode = "add"
dicttonx(nx_dict, h5_file, h5path=h5path, mode=mode, update_mode=update_mode)
def write_spectrum_saving_pt(h5_file, entry, obj, overwrite=True):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment