Commit 8f7b796e authored by Pierre Paleo's avatar Pierre Paleo
Browse files

Testing _reset_subregion()

Some nasty things to be removed after testing!
parent 5bc63b80
Pipeline #78444 passed with stage
in 6 minutes and 16 seconds
......@@ -26,6 +26,10 @@ except:
Backprojector = None
#
from ...reconstruction.fbp import Backprojector # for testing
#
class NewPipeline:
"""
Pipeline for "regular" full-field tomography.
......@@ -154,6 +158,7 @@ class NewPipeline:
)
else:
sub_region = get_subregion(sub_region, ndim=3)
self.logger.debug("Set sub-region to %s" % (str(sub_region)))
self.sub_region = sub_region
self._sub_region_xz = sub_region[2] + sub_region[1]
......@@ -727,10 +732,17 @@ class NewPipeline:
def _reconstruct(self, sinos=None):
if sinos is None:
sinos = self.sinos
# DEBUG
import pycuda.gpuarray as garray
d_sinos = garray.to_gpu(self.sinos)
d_recs = garray.to_gpu(self.recs)
#
for i in range(sinos.shape[0]):
self.reconstruction.fbp(
sinos[i], output=self.recs[i]
# sinos[i], output=self.recs[i]
d_sinos[i], output=d_recs[i]
)
self.recs[:] = d_recs.get()[:] # DEBUG
@pipeline_step("histogram", "Computing histogram")
def _compute_histogram(self, data=None):
......@@ -786,7 +798,7 @@ class NewPipeline:
def _reset_reader_subregion(self):
if self._resume_from_step is None:
self.chunk_reader._set_subregion(self.sub_region)
self.chunk_reader._set_subregion(self.sub_region_xz)
self.chunk_reader._init_reader()
self.chunk_reader._loaded = False
else:
......
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