Skip to content

Commit

Permalink
Fix tranposition.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericpre committed Sep 24, 2020
1 parent 4a223eb commit 2150463
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pguresvt/hspy.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@ def denoise(self, signal):

super(HSPYSVT, self).denoise(self._X)

denoised_signal = signal._deepcopy_with_new_data(self.Y_.T)
if self._signal_type == "spectrum":
axes = (1, 0)
elif self._signal_type == "image":
axes = (2, 0, 1)

denoised_signal = signal._deepcopy_with_new_data(self.Y_.transpose(axes))
new_title = f"Denoised {signal.metadata.General.title}".strip()
denoised_signal.metadata.General.title = new_title

Expand Down

0 comments on commit 2150463

Please sign in to comment.