Commit d7231b99 authored by Pierre Paleo's avatar Pierre Paleo
Browse files

radios_shape should account for binning/subsampling

and not rely on the data_reader (too early)
parent 8f7b796e
Pipeline #78482 passed with stage
in 6 minutes and 18 seconds
...@@ -175,7 +175,7 @@ class DatasetValidatorBase: ...@@ -175,7 +175,7 @@ class DatasetValidatorBase:
self.binning = (dataset_cfg["binning"], dataset_cfg["binning_z"]) self.binning = (dataset_cfg["binning"], dataset_cfg["binning_z"])
self.dataset_info._binning = self.binning self.dataset_info._binning = self.binning
subsampling_factor = dataset_cfg["projections_subsampling"] subsampling_factor = dataset_cfg["projections_subsampling"]
self.projections_subsampling = subsampling_factor self.dataset_info.subsampling_factor = subsampling_factor
self.dataset_info._projections_subsampled = self.dataset_info.projections self.dataset_info._projections_subsampled = self.dataset_info.projections
self.dataset_info._projs_indices_subsampled = self._projs_indices self.dataset_info._projs_indices_subsampled = self._projs_indices
if subsampling_factor > 1: if subsampling_factor > 1:
......
...@@ -114,7 +114,12 @@ class NewPipeline: ...@@ -114,7 +114,12 @@ class NewPipeline:
# TODO: sanity check (eg. compare to size of radios in dataset_info) ? # TODO: sanity check (eg. compare to size of radios in dataset_info) ?
self.delta_z = chunk_shape[1] # includes "margin" self.delta_z = chunk_shape[1] # includes "margin"
self.n_angles = self.chunk_shape[0] self.n_angles = self.chunk_shape[0]
self.radios_shape = self.chunk_shape # (n_a, n_z, n_x) # (n_a, n_z, n_x)
self.radios_shape = (
self.chunk_shape[0] // self.dataset_info.subsampling_factor,
self.chunk_shape[1] // self.dataset_info.binning[1],
self.chunk_shape[2] // self.dataset_info.binning[0],
)
def _set_margin(self, margin): def _set_margin(self, margin):
if margin is None: if margin is None:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment