nabu 2022.3.0a1__py3-none-any.whl → 2023.1.0a2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nabu/__init__.py +1 -1
- nabu/app/bootstrap.py +7 -1
- nabu/app/cast_volume.py +8 -2
- nabu/app/cli_configs.py +69 -0
- nabu/app/composite_cor.py +97 -0
- nabu/app/create_distortion_map_from_poly.py +118 -0
- nabu/app/nx_z_splitter.py +1 -1
- nabu/app/prepare_weights_double.py +21 -16
- nabu/app/reconstruct_helical.py +0 -1
- nabu/app/utils.py +10 -5
- nabu/cuda/processing.py +1 -0
- nabu/cuda/tests/test_padding.py +1 -0
- nabu/cuda/utils.py +1 -0
- nabu/distributed/__init__.py +0 -0
- nabu/distributed/utils.py +57 -0
- nabu/distributed/worker.py +543 -0
- nabu/estimation/cor.py +3 -7
- nabu/estimation/cor_sino.py +2 -1
- nabu/estimation/distortion.py +6 -4
- nabu/io/cast_volume.py +10 -1
- nabu/io/detector_distortion.py +305 -0
- nabu/io/reader.py +37 -7
- nabu/io/reader_helical.py +0 -3
- nabu/io/tests/test_cast_volume.py +16 -4
- nabu/io/tests/test_detector_distortion.py +178 -0
- nabu/io/tests/test_writers.py +2 -2
- nabu/io/tiffwriter_zmm.py +2 -3
- nabu/io/writer.py +84 -1
- nabu/io/writer_BACKUP_193259.py +556 -0
- nabu/io/writer_BACKUP_193381.py +556 -0
- nabu/io/writer_BASE_193259.py +548 -0
- nabu/io/writer_BASE_193381.py +548 -0
- nabu/io/writer_LOCAL_193259.py +550 -0
- nabu/io/writer_LOCAL_193381.py +550 -0
- nabu/io/writer_REMOTE_193259.py +557 -0
- nabu/io/writer_REMOTE_193381.py +557 -0
- nabu/misc/fourier_filters.py +2 -0
- nabu/misc/rotation.py +0 -1
- nabu/misc/tests/test_rotation.py +1 -0
- nabu/pipeline/config_validators.py +10 -0
- nabu/pipeline/datadump.py +1 -1
- nabu/pipeline/dataset_validator.py +0 -1
- nabu/pipeline/detector_distortion_provider.py +20 -0
- nabu/pipeline/estimators.py +35 -21
- nabu/pipeline/fallback_utils.py +1 -1
- nabu/pipeline/fullfield/chunked.py +30 -15
- nabu/pipeline/fullfield/chunked_black.py +881 -0
- nabu/pipeline/fullfield/chunked_cuda.py +34 -4
- nabu/pipeline/fullfield/chunked_fb.py +966 -0
- nabu/pipeline/fullfield/chunked_google.py +921 -0
- nabu/pipeline/fullfield/chunked_pep8.py +920 -0
- nabu/pipeline/fullfield/computations.py +7 -6
- nabu/pipeline/fullfield/dataset_validator.py +1 -1
- nabu/pipeline/fullfield/grouped_cuda.py +6 -0
- nabu/pipeline/fullfield/nabu_config.py +15 -3
- nabu/pipeline/fullfield/processconfig.py +5 -0
- nabu/pipeline/fullfield/reconstruction.py +1 -2
- nabu/pipeline/helical/gridded_accumulator.py +1 -8
- nabu/pipeline/helical/helical_chunked_regridded.py +48 -33
- nabu/pipeline/helical/helical_reconstruction.py +1 -9
- nabu/pipeline/helical/nabu_config.py +11 -14
- nabu/pipeline/helical/span_strategy.py +11 -4
- nabu/pipeline/helical/tests/test_accumulator.py +0 -3
- nabu/pipeline/helical/tests/test_pipeline_elements_full.py +0 -6
- nabu/pipeline/helical/tests/test_strategy.py +0 -1
- nabu/pipeline/helical/weight_balancer.py +0 -1
- nabu/pipeline/params.py +4 -0
- nabu/pipeline/processconfig.py +6 -2
- nabu/pipeline/writer.py +9 -4
- nabu/preproc/distortion.py +4 -3
- nabu/preproc/double_flatfield.py +16 -4
- nabu/preproc/double_flatfield_cuda.py +3 -2
- nabu/preproc/double_flatfield_variable_region.py +13 -4
- nabu/preproc/flatfield.py +29 -7
- nabu/preproc/flatfield_cuda.py +0 -1
- nabu/preproc/flatfield_variable_region.py +5 -2
- nabu/preproc/phase.py +0 -1
- nabu/preproc/phase_cuda.py +0 -1
- nabu/preproc/tests/test_ctf.py +4 -3
- nabu/preproc/tests/test_flatfield.py +6 -7
- nabu/reconstruction/fbp_opencl.py +1 -1
- nabu/reconstruction/filtering.py +0 -1
- nabu/reconstruction/tests/test_fbp.py +1 -0
- nabu/resources/dataset_analyzer.py +0 -1
- nabu/resources/templates/bm05_pag.conf +34 -0
- nabu/resources/templates/id16_ctf.conf +2 -1
- nabu/resources/tests/test_nxflatfield.py +0 -1
- nabu/resources/tests/test_units.py +0 -1
- nabu/stitching/frame_composition.py +7 -1
- {nabu-2022.3.0a1.dist-info → nabu-2023.1.0a2.dist-info}/METADATA +2 -7
- {nabu-2022.3.0a1.dist-info → nabu-2023.1.0a2.dist-info}/RECORD +96 -75
- {nabu-2022.3.0a1.dist-info → nabu-2023.1.0a2.dist-info}/WHEEL +1 -1
- {nabu-2022.3.0a1.dist-info → nabu-2023.1.0a2.dist-info}/entry_points.txt +2 -1
- {nabu-2022.3.0a1.dist-info → nabu-2023.1.0a2.dist-info}/LICENSE +0 -0
- {nabu-2022.3.0a1.dist-info → nabu-2023.1.0a2.dist-info}/top_level.txt +0 -0
- {nabu-2022.3.0a1.dist-info → nabu-2023.1.0a2.dist-info}/zip-safe +0 -0
@@ -43,10 +43,34 @@ class CudaChunkedPipeline(ChunkedPipeline):
|
|
43
43
|
HistogramClass = CudaPartialHistogram
|
44
44
|
SinoNormalizationClass = CudaSinoNormalization
|
45
45
|
|
46
|
-
def __init__(
|
46
|
+
def __init__(
|
47
|
+
self,
|
48
|
+
process_config,
|
49
|
+
chunk_shape,
|
50
|
+
logger=None,
|
51
|
+
extra_options=None,
|
52
|
+
margin=None,
|
53
|
+
use_grouped_mode=False,
|
54
|
+
cuda_options=None,
|
55
|
+
):
|
47
56
|
self._init_cuda(cuda_options)
|
48
|
-
super().__init__(
|
57
|
+
super().__init__(
|
58
|
+
process_config,
|
59
|
+
chunk_shape,
|
60
|
+
logger=logger,
|
61
|
+
extra_options=extra_options,
|
62
|
+
use_grouped_mode=use_grouped_mode,
|
63
|
+
margin=margin,
|
64
|
+
)
|
49
65
|
self._allocate_array(self.radios.shape, "f", name="radios")
|
66
|
+
self._determine_when_to_transfer_data_on_gpu()
|
67
|
+
|
68
|
+
def _determine_when_to_transfer_data_on_gpu(self):
|
69
|
+
# Decide when to transfer data to GPU. Normally it's right after reading the data,
|
70
|
+
# But sometimes a part of the processing is done on CPU.
|
71
|
+
self._when_to_transfer_radios_on_gpu = "read_data"
|
72
|
+
if self.flatfield is not None and self.flatfield.distortion_correction is not None:
|
73
|
+
self._when_to_transfer_radios_on_gpu = "flatfield"
|
50
74
|
|
51
75
|
def _init_cuda(self, cuda_options):
|
52
76
|
if not (__has_pycuda__):
|
@@ -68,6 +92,7 @@ class CudaChunkedPipeline(ChunkedPipeline):
|
|
68
92
|
return d_arr
|
69
93
|
|
70
94
|
def _transfer_radios_to_gpu(self):
|
95
|
+
self.logger.debug("Transfering radios to GPU")
|
71
96
|
self._d_radios.set(self.radios)
|
72
97
|
self._h_radios = self.radios
|
73
98
|
self.radios = self._d_radios
|
@@ -81,8 +106,13 @@ class CudaChunkedPipeline(ChunkedPipeline):
|
|
81
106
|
|
82
107
|
def _read_data(self):
|
83
108
|
super()._read_data()
|
84
|
-
self.
|
85
|
-
|
109
|
+
if self._when_to_transfer_radios_on_gpu == "read_data":
|
110
|
+
self._transfer_radios_to_gpu()
|
111
|
+
|
112
|
+
def _flatfield(self):
|
113
|
+
super()._flatfield()
|
114
|
+
if self._when_to_transfer_radios_on_gpu == "flatfield":
|
115
|
+
self._transfer_radios_to_gpu()
|
86
116
|
|
87
117
|
def _reconstruct(self):
|
88
118
|
super()._reconstruct()
|