Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
workflow
ewoksapps
est
Commits
ebab6b5f
Commit
ebab6b5f
authored
Oct 05, 2021
by
Henri Payno
Browse files
[io] update dicttonx to latest API
parent
a261fd59
Changes
1
Show whitespace changes
Inline
Side-by-side
est/io/io.py
View file @
ebab6b5f
...
...
@@ -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
=
"overwrit
e"
)
dicttonx
(
nexus_dict
,
h5_file
,
mode
=
"a"
,
h5path
=
plot_path
,
update_mode
=
"replac
e"
)
# 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
=
"overwrit
e"
update_mode
=
"replac
e"
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
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment