Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
pycroscopy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
39
Issues
39
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vasudevan, Rama K
pycroscopy
Commits
c5e8fae4
Unverified
Commit
c5e8fae4
authored
Dec 20, 2020
by
Suhas Somnath
Committed by
GitHub
Dec 20, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #241 from pycroscopy/svd_fix
Added fix for singular spec dim
parents
02743372
129f6aea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
pycroscopy/processing/svd_utils.py
pycroscopy/processing/svd_utils.py
+6
-0
No files found.
pycroscopy/processing/svd_utils.py
View file @
c5e8fae4
...
...
@@ -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