nabu 2024.1.2__py3-none-any.whl → 2024.1.3__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.
- doc/doc_config.py +32 -0
- nabu/__init__.py +1 -1
- nabu/reconstruction/rings_cuda.py +25 -10
- {nabu-2024.1.2.dist-info → nabu-2024.1.3.dist-info}/METADATA +1 -1
- {nabu-2024.1.2.dist-info → nabu-2024.1.3.dist-info}/RECORD +9 -9
- {nabu-2024.1.2.dist-info → nabu-2024.1.3.dist-info}/WHEEL +1 -1
- nabu/app/tests/__init__.py +0 -0
- {nabu-2024.1.2.dist-info → nabu-2024.1.3.dist-info}/LICENSE +0 -0
- {nabu-2024.1.2.dist-info → nabu-2024.1.3.dist-info}/entry_points.txt +0 -0
- {nabu-2024.1.2.dist-info → nabu-2024.1.3.dist-info}/top_level.txt +0 -0
doc/doc_config.py
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
|
3
|
+
from nabu.resources.nabu_config import nabu_config
|
4
|
+
|
5
|
+
|
6
|
+
def generate(file_):
|
7
|
+
def write(content):
|
8
|
+
print(content, file=file_)
|
9
|
+
for section, values in nabu_config.items():
|
10
|
+
if section == "about":
|
11
|
+
continue
|
12
|
+
write("## %s\n" % section)
|
13
|
+
for key, val in values.items():
|
14
|
+
if val["type"] == "unsupported":
|
15
|
+
continue
|
16
|
+
write(val["help"] + "\n")
|
17
|
+
write(
|
18
|
+
"```ini\n%s = %s\n```"
|
19
|
+
% (key, val["default"])
|
20
|
+
)
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
if __name__ == "__main__":
|
25
|
+
|
26
|
+
import sys, os
|
27
|
+
print(os.path.abspath(__file__))
|
28
|
+
exit(0)
|
29
|
+
|
30
|
+
fname = "/tmp/test.md"
|
31
|
+
with open(fname, "w") as f:
|
32
|
+
generate(f)
|
nabu/__init__.py
CHANGED
@@ -174,10 +174,15 @@ class CudaMunchDeringer(MunchDeringer):
|
|
174
174
|
self._fft_plans[level].ifft(d_coeffs_f, output=d_coeffs)
|
175
175
|
|
176
176
|
def _destripe_2D(self, d_sino, output):
|
177
|
+
if not (d_sino.flags.c_contiguous):
|
178
|
+
sino = self.cuda_processing.allocate_array("_d_sino", d_sino.shape, np.float32)
|
179
|
+
sino[:] = d_sino[:]
|
180
|
+
else:
|
181
|
+
sino = d_sino
|
177
182
|
if self.padding is not None:
|
178
|
-
|
183
|
+
sino = self.padder.pad(sino)
|
179
184
|
# set the "image" for DWT (memcpy D2D)
|
180
|
-
self._d_sino.set(
|
185
|
+
self._d_sino.set(sino)
|
181
186
|
# perform forward DWT
|
182
187
|
self.cudwt.forward()
|
183
188
|
for i in range(self.cudwt.levels):
|
@@ -256,9 +261,10 @@ class CudaSinoMeanDeringer(SinoMeanDeringer):
|
|
256
261
|
filename=get_cuda_srcfile("normalization.cu"),
|
257
262
|
signature="PPiii",
|
258
263
|
)
|
259
|
-
self._mean_kernel_block = (32, 1,
|
260
|
-
self._mean_kernel_grid = [updiv(
|
261
|
-
self._mean_kernel_args = [self.d_sino_profile, np.int32(self.n_x), np.int32(self.n_angles), np.int32(
|
264
|
+
self._mean_kernel_block = (32, 1, 1)
|
265
|
+
self._mean_kernel_grid = [updiv(self.sinos_shape[-1], self._mean_kernel_block[0]), 1, 1]
|
266
|
+
self._mean_kernel_args = [self.d_sino_profile, np.int32(self.n_x), np.int32(self.n_angles), np.int32(1)]
|
267
|
+
|
262
268
|
self._mean_kernel_kwargs = {
|
263
269
|
"grid": self._mean_kernel_grid,
|
264
270
|
"block": self._mean_kernel_block,
|
@@ -270,9 +276,11 @@ class CudaSinoMeanDeringer(SinoMeanDeringer):
|
|
270
276
|
signature="PPiii",
|
271
277
|
options=["-DGENERIC_OP=%d" % (3 if self.mode == "divide" else 1)],
|
272
278
|
)
|
273
|
-
self._op_kernel_block = (16, 16,
|
274
|
-
self._op_kernel_grid = [updiv(a, b) for a, b in zip(self.sinos_shape[::-1], self._op_kernel_block)]
|
275
|
-
|
279
|
+
self._op_kernel_block = (16, 16, 1)
|
280
|
+
self._op_kernel_grid = [updiv(a, b) for a, b in zip(self.sinos_shape[1:][::-1], self._op_kernel_block[:-1])] + [
|
281
|
+
1
|
282
|
+
]
|
283
|
+
self._op_kernel_args = [self.d_sino_profile, np.int32(self.n_x), np.int32(self.n_angles), np.int32(1)]
|
276
284
|
self._op_kernel_kwargs = {
|
277
285
|
"grid": self._op_kernel_grid,
|
278
286
|
"block": self._op_kernel_block,
|
@@ -312,9 +320,16 @@ class CudaSinoMeanDeringer(SinoMeanDeringer):
|
|
312
320
|
if output is not None:
|
313
321
|
raise NotImplementedError
|
314
322
|
#
|
315
|
-
|
323
|
+
if not (sino.flags.c_contiguous):
|
324
|
+
d_sino = self.processing.allocate_array("d_sino", sino.shape, np.float32)
|
325
|
+
d_sino[:] = sino[:]
|
326
|
+
else:
|
327
|
+
d_sino = sino
|
328
|
+
self._mean_kernel(d_sino, *self._mean_kernel_args, **self._mean_kernel_kwargs)
|
316
329
|
self._apply_filter(self.d_sino_profile)
|
317
|
-
self._op_kernel(
|
330
|
+
self._op_kernel(d_sino, *self._op_kernel_args, **self._op_kernel_kwargs)
|
331
|
+
if not (sino.flags.c_contiguous):
|
332
|
+
sino[:] = self.processing.d_sino[:]
|
318
333
|
return sino
|
319
334
|
|
320
335
|
def remove_rings_sinograms(self, sinograms):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nabu
|
3
|
-
Version: 2024.1.
|
3
|
+
Version: 2024.1.3
|
4
4
|
Summary: Nabu - Tomography software
|
5
5
|
Author-email: Pierre Paleo <pierre.paleo@esrf.fr>, Henri Payno <henri.payno@esrf.fr>, Alessandro Mirone <mirone@esrf.fr>, Jérôme Lesaint <jerome.lesaint@esrf.fr>
|
6
6
|
Maintainer-email: Pierre Paleo <pierre.paleo@esrf.fr>
|
@@ -1,7 +1,8 @@
|
|
1
1
|
doc/conf.py,sha256=3xtCarCHrXPr50GbeRDuH-o3Jzojw7mpr7vpGfZPLAE,3787
|
2
2
|
doc/create_conf_doc.py,sha256=IVOdP70KvbW9WS_UQu3Iyd0YfS60E2fJ5IDtQ_s4cDw,1143
|
3
|
+
doc/doc_config.py,sha256=anqeOVjqE2e7eVzg7yuh9dvIneTkrA5doGl1cVBqT7Q,730
|
3
4
|
doc/get_mathjax.py,sha256=VIvKRCdDuF2VoY8JD3mSey9XX13AZMmwTJBHdt1tUs4,1012
|
4
|
-
nabu/__init__.py,sha256=
|
5
|
+
nabu/__init__.py,sha256=0gCFkw19XEtpFmj4__mgFLwZHUBVLIJtgG-XzgYhmMQ,270
|
5
6
|
nabu/tests.py,sha256=cew9OY2uTyncHI_HM32W8CP6B1GTGKaOW65XtMEqs7o,1417
|
6
7
|
nabu/testutils.py,sha256=qqtGgkIhpOpXhgeoXlqCb91Rx-JlI4ALaDF6nt8YRRk,13298
|
7
8
|
nabu/utils.py,sha256=1OKKhQ6-t7OOwTLQkTJuK5Hk9lb7hkEZrDtTdcmvD4c,24164
|
@@ -31,7 +32,6 @@ nabu/app/shrink_dataset.py,sha256=P9dorO0Q-gPAWgSHyZi3XQp4jkMTJacDYzNvJY4oh98,35
|
|
31
32
|
nabu/app/stitching.py,sha256=Ibp1oVokLVMz-VX762j1C0E88Di0YJvRt-b8NjGoe7g,3310
|
32
33
|
nabu/app/utils.py,sha256=XUBRWDmth4i3BZHd27rfarFAUP7OEcsMeVmDJ6T4EXA,1178
|
33
34
|
nabu/app/validator.py,sha256=IR-DcUV5h1Fc5CChBfBIaglrGpfKNICX7tGirAroMiw,3368
|
34
|
-
nabu/app/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
35
35
|
nabu/app/tests/test_reduce_dark_flat.py,sha256=T-_zyzD0-f2c5Z-tlzmRF5p3vPtyL2RFb-D5fIYYEoM,2641
|
36
36
|
nabu/cuda/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
37
37
|
nabu/cuda/convolution.py,sha256=n8KsJ7IZdPOs_K5QZC6qblnOvIKYwxtdt03oNa0GiMU,241
|
@@ -234,7 +234,7 @@ nabu/reconstruction/projection.py,sha256=7WVPlYLUmCmB2yR1JYmVLJ5fZ3CMMKQ3vS9yuTU
|
|
234
234
|
nabu/reconstruction/reconstructor.py,sha256=wSva2EK-NTJi8N_ubzJWIZ4sv2ksfrA9YcA2ioEtISo,7299
|
235
235
|
nabu/reconstruction/reconstructor_cuda.py,sha256=m_3GzG44PRyiSEfTvYjgr5atLwl26hMfZOMyqTWxp0g,1644
|
236
236
|
nabu/reconstruction/rings.py,sha256=mpbCLuFM_6Uy9oNJkyQ8tZwhGhrbWtzRlArSRsC90bI,9527
|
237
|
-
nabu/reconstruction/rings_cuda.py,sha256=
|
237
|
+
nabu/reconstruction/rings_cuda.py,sha256=NFU4lV_K6oY3eVyHmK_zxpQYeXpejOe_j8fnK7Vnnb0,13514
|
238
238
|
nabu/reconstruction/sinogram.py,sha256=KTSGP_JJABf4Yr9l628HPbyWsBnpbnyGKyPEq3ZrPIE,17026
|
239
239
|
nabu/reconstruction/sinogram_cuda.py,sha256=wS84AIy3T00d1kTtuJOQmA3hktbDVs4ybwB9haiBcoY,10623
|
240
240
|
nabu/reconstruction/sinogram_opencl.py,sha256=p793N26VknU8KIZLtDgFY6HNx0TylemZ1YL4WKD3fHs,1403
|
@@ -288,9 +288,9 @@ nabu/thirdparty/pore3d_deringer_munch.py,sha256=o4bisnFc-wMjuohWBT8wgWmfNehPQGtC
|
|
288
288
|
nabu/thirdparty/tomocupy_remove_stripe.py,sha256=VgXHr2tzTAAGZix5pwhFfbPxj4tt3yXBcjCPNQSLPAg,22810
|
289
289
|
nabu/thirdparty/tomopy_phase.py,sha256=hK4oPpkogLOhv23XzzEXQY2u3r8fJvASY_bINVs6ERE,8634
|
290
290
|
nabu/thirdparty/tomwer_load_flats_darks.py,sha256=ZNoVAinUb_wGYbfvs_4BVnWsjsQmNxSvCh1bWhR2WWg,5611
|
291
|
-
nabu-2024.1.
|
292
|
-
nabu-2024.1.
|
293
|
-
nabu-2024.1.
|
294
|
-
nabu-2024.1.
|
295
|
-
nabu-2024.1.
|
296
|
-
nabu-2024.1.
|
291
|
+
nabu-2024.1.3.dist-info/LICENSE,sha256=1eAIPSnEsnSFNUODnLtNtQTs76exG3ZxJ1DJR6zoUBA,1066
|
292
|
+
nabu-2024.1.3.dist-info/METADATA,sha256=9F-UcdLnNHr8HNiwZOdq_TeA2eowj38U4hVcKCWpcEM,5224
|
293
|
+
nabu-2024.1.3.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
294
|
+
nabu-2024.1.3.dist-info/entry_points.txt,sha256=cJKGkBeykVL7uK3E4R0RLRqMXifTL2qdO573syPAvJc,1288
|
295
|
+
nabu-2024.1.3.dist-info/top_level.txt,sha256=fsm_N3eXLRZk2QXF9OSKPNDPFXOz8FAQjHh5avT3dok,9
|
296
|
+
nabu-2024.1.3.dist-info/RECORD,,
|
nabu/app/tests/__init__.py
DELETED
File without changes
|
File without changes
|
File without changes
|
File without changes
|