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

Update flatfield radios indices when processing radios by groups

parent e1b64c84
Pipeline #26896 passed with stages
in 3 minutes and 32 seconds
......@@ -181,8 +181,9 @@ class CudaFullFieldPipelineLimitedMemory(CudaFullFieldPipeline):
if "flatfield" in self.processing_steps:
# We need to update the projections indices passed to FlatField
# for each group of radios
self.processing_options["flatfield"]["projs_indices"] = self.processing_options["flatfield"]["projs_indices"][:self.radios_group_size]
ff_opts = self.processing_options["flatfield"]
self._ff_proj_indices = ff_opts["projs_indices"]
ff_opts["projs_indices"] = ff_opts["projs_indices"][:self.radios_group_size]
# Processing acting on sinograms will be done later
self._processing_steps = self.processing_steps.copy()
for step in ["build_sino", "reconstruction", "save"]:
......@@ -227,6 +228,14 @@ class CudaFullFieldPipelineLimitedMemory(CudaFullFieldPipeline):
# Copy H2D
self._d_radios[:transfer_size, :, :] = self._h_radios[start_idx:end_idx, :, :]
# Process a group of radios (radios_group_size, delta_z, width)
if "flatfield" in self.processing_steps:
# We need to update the projections indices passed to FlatField
# for each group of radios
ff_opts = self.processing_options["flatfield"]
ff_opts["projs_indices"] = self._ff_proj_indices[start_idx:end_idx]
self._init_flatfield(shape=(transfer_size, ) + self.radios_shape[1:])
self._old_radios = self.radios
self.radios = self.radios[:transfer_size]
self._flatfield()
self._double_flatfield()
self._retrieve_phase()
......
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