Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tomotools
Nabu
Commits
8f7b796e
Commit
8f7b796e
authored
Jun 24, 2022
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nabu/pipeline/fullfield/new_pipeline.py
View file @
8f7b796e
...
...
@@ -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
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment