Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
XRD
darfix
Commits
ee69ce7e
Commit
ee69ce7e
authored
Feb 07, 2020
by
Julia Garriga Ferrer
Browse files
[io][utils] Fix some typos
parent
dd004c11
Changes
1
Hide whitespace changes
Inline
Side-by-side
darfix/io/utils.py
View file @
ee69ce7e
...
...
@@ -33,6 +33,8 @@ import h5py
from
datetime
import
datetime
import
numpy
from
silx.io.dictdump
import
dicttoh5
_logger
=
logging
.
getLogger
(
__file__
)
...
...
@@ -71,7 +73,7 @@ def advancement_display(iteration, total, prefix='', suffix='', decimals=1, leng
def
write_process
(
h5_file
,
entry
,
dimensions
,
W
,
data
,
processing_order
,
data_path
=
'/'
,
overwrite
=
True
):
data_path
=
'/'
,
overwrite
=
True
):
"""
Write a stack of components and its parameters into .h5
...
...
@@ -92,7 +94,7 @@ def write_process(h5_file, entry, dimensions, W, data, processing_order,
def
get_interpretation
(
my_data
):
"""Return hdf5 attribute for this type of data"""
if
isinstance
(
my_data
,
numpy
.
ndarray
):
if
my_data
.
ndim
is
1
:
if
my_data
.
ndim
==
1
:
return
'spectrum'
elif
my_data
.
ndim
in
(
2
,
3
):
return
'image'
...
...
@@ -154,4 +156,4 @@ def write_process(h5_file, entry, dimensions, W, data, processing_order,
nx_data
[
"components"
]
=
h5f
[
source_addr
]
for
key
,
value
in
dimensions
.
items
():
save_key
(
nx_parameters_path
,
key_path
=
key
,
value
=
value
)
\ No newline at end of file
save_key
(
nx_parameters_path
,
key_path
=
key
,
value
=
value
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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