Skip to content

Commit 8052617

Browse files
committed
made translate method return h5_file.
1 parent d34216e commit 8052617

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

hyperspectral_pifm_utils.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
from pyUSID import USIDataset
77

88
class PiFMTranslator(Translator):
9-
"""Writes images, spectrograms, point spectra and associated ancillary data sets to h5 file."""
9+
"""
10+
Class that writes images, spectrograms, point spectra and associated ancillary data sets to h5 file in pyUSID data
11+
structure.
12+
13+
"""
1014
def __init__(self, path=None, *args, **kwargs):
1115
self.path = path
1216
super(HyperspectralTranslator, self).__init__(*args, **kwargs)
@@ -286,6 +290,10 @@ def write_spectra(self):
286290
h5_raw[:, :] = self.spectra[spec_f].reshape(h5_raw.shape)
287291

288292
def translate(self):
293+
"""
294+
295+
:return: h5 file.
296+
"""
289297
self.get_path()
290298
self.read_anfatec_params()
291299
self.read_file_desc()
@@ -297,3 +305,4 @@ def translate(self):
297305
self.write_spectrograms()
298306
self.write_images()
299307
self.write_spectra()
308+
return self.h5_f

0 commit comments

Comments
 (0)