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
tomotools
nxtomomill
Commits
7aed6c56
Commit
7aed6c56
authored
Nov 12, 2020
by
Tomas Farago
Browse files
Revert "[add_dark_flat_nx_file] avoid loading the data to get dimensions"
This reverts commit
6c494438
.
parent
49551362
Changes
1
Hide whitespace changes
Inline
Side-by-side
nxtomomill/utils.py
View file @
7aed6c56
...
...
@@ -300,19 +300,10 @@ def add_dark_flat_nx_file(
n_frames_to_insert
=
1
if
isinstance
(
data
,
numpy
.
ndarray
)
and
data
.
ndim
==
3
:
n_frames_to_insert
=
data
.
shape
[
0
]
elif
isinstance
(
data
,
DataUrl
):
with
HDF5File
(
data
.
file_path
(),
mode
=
"r"
)
as
h5s
:
if
data
.
data_path
()
not
in
h5s
:
raise
KeyError
(
"Path given ({}) is not in {}"
.
format
(
data
.
data_path
(),
data
.
file_path
)
)
data_node
=
h5s
[
data
.
data_path
()]
if
data_node
.
ndim
is
3
:
n_frames_to_insert
=
data_node
.
shape
[
0
]
else
:
raise
TypeError
(
"{} as input is not managed"
.
format
(
type
(
data
)))
raw_data
=
get_data
(
data
)
if
raw_data
.
ndim
is
3
:
n_frames_to_insert
=
raw_data
.
shape
[
0
]
if
logger
is
not
None
:
logger
.
info
(
...
...
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