Skip to content
Snippets Groups Projects
Commit 4d017489 authored by Jan David Mol's avatar Jan David Mol
Browse files

L2SS-674: Fix statistics_writer for multiple subbands in XST

parent 4136c11d
No related branches found
No related tags found
No related merge requests found
...@@ -253,7 +253,10 @@ class xst_hdf5_writer(hdf5_writer): ...@@ -253,7 +253,10 @@ class xst_hdf5_writer(hdf5_writer):
def write_values_matrix(self, current_group): def write_values_matrix(self, current_group):
# requires a function call to transform the xst_blocks in to the right structure # requires a function call to transform the xst_blocks in to the right structure
current_group.create_dataset(name="values", data=self.current_matrix.xst_values([self.subband_index])[0].astype(numpy.cfloat), compression="gzip") #
# since we have a dedicated writer per subband_index, they all end up in slot 0
# in their writer, so we only need to store the first set of xst_values.
current_group.create_dataset(name="values", data=self.current_matrix.xst_values([0])[0].astype(numpy.cfloat), compression="gzip")
class parallel_xst_hdf5_writer: class parallel_xst_hdf5_writer:
...@@ -265,15 +268,12 @@ class parallel_xst_hdf5_writer: ...@@ -265,15 +268,12 @@ class parallel_xst_hdf5_writer:
# function to create a new writer, to avoid having to store # function to create a new writer, to avoid having to store
# all the init parameters just for this purpose. # all the init parameters just for this purpose.
#
def new_writer(subband): def new_writer(subband):
# Since we use a dedicated writer per subband, the data will end
# up at subband_index == 0 in each of them.
return xst_hdf5_writer( return xst_hdf5_writer(
new_file_time_interval, new_file_time_interval,
file_location, file_location,
decimation_factor, decimation_factor,
0) subband)
self.new_writer = new_writer self.new_writer = new_writer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment