Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Vasudevan, Rama K
pycroscopy
Commits
129f6aea
Commit
129f6aea
authored
Dec 20, 2020
by
ssomnath
Browse files
Added fix for singular spec dim
parent
02743372
Changes
1
Hide whitespace changes
Inline
Side-by-side
pycroscopy/processing/svd_utils.py
View file @
129f6aea
...
...
@@ -139,6 +139,12 @@ class SVD(Process):
if
not
success
:
raise
ValueError
(
'Could not reshape U to N-Dimensional dataset! Error:'
+
success
)
# When the source dataset has a singular valued spectroscopic dimension
# stack_real_to_target causes V to lose all its dimensions
if
self
.
__v
.
ndim
==
0
:
# However, we want V to be 2D:
self
.
__v
=
np
.
atleast_2d
(
self
.
__v
)
v_mat
,
success
=
reshape_to_n_dims
(
self
.
__v
,
h5_pos
=
np
.
expand_dims
(
np
.
arange
(
self
.
__u
.
shape
[
1
]),
axis
=
1
),
h5_spec
=
self
.
h5_main
.
h5_spec_inds
)
if
not
success
:
...
...
Write
Preview
Markdown
is supported
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