nabu 2024.2.13__py3-none-any.whl → 2024.2.14__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 CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "2024.2.13"
1
+ __version__ = "2024.2.14"
2
2
  __nabu_modules__ = [
3
3
  "app",
4
4
  "cuda",
@@ -79,6 +79,13 @@ class CudaBackprojector(BackprojectorBase):
79
79
  self.sino_mult = CudaSinoMult(self.sino_shape, self.rot_center, ctx=self._processing.ctx)
80
80
  self._prepare_textures() # has to be done after compilation for Cuda (to bind texture to built kernel)
81
81
 
82
+ def _get_filter_init_extra_options(self):
83
+ return {
84
+ "cuda_options": {
85
+ "ctx": self._processing.ctx,
86
+ },
87
+ }
88
+
82
89
  def _transfer_to_texture(self, sino, do_checks=True):
83
90
  if do_checks and not (sino.flags.c_contiguous):
84
91
  raise ValueError("Expected C-Contiguous array")
@@ -237,14 +237,15 @@ class BackprojectorBase:
237
237
  self._axis_correction = np.zeros((1, self.n_angles), dtype=np.float32)
238
238
  self._axis_correction[0, :] = axcorr[:] # pylint: disable=E1136
239
239
 
240
+ def _get_filter_init_extra_options(self):
241
+ return {}
242
+
240
243
  def _init_filter(self, filter_name):
241
244
  self.filter_name = filter_name
242
245
  if filter_name in ["None", "none"]:
243
246
  self.sino_filter = None
244
247
  return
245
- sinofilter_other_kwargs = {}
246
- if self.backend != "numpy":
247
- sinofilter_other_kwargs["%s_options" % self.backend] = {"ctx": self._processing.ctx}
248
+ sinofilter_other_kwargs = self._get_filter_init_extra_options()
248
249
  self.sino_filter = self.SinoFilterClass(
249
250
  self.sino_shape,
250
251
  filter_name=self.filter_name,
@@ -74,5 +74,13 @@ class OpenCLBackprojector(BackprojectorBase):
74
74
  return
75
75
  return cl.enqueue_copy(self._processing.queue, self._d_sino.data, sino.data)
76
76
 
77
+ def _get_filter_init_extra_options(self):
78
+ return {
79
+ "opencl_options": {
80
+ "ctx": self._processing.ctx,
81
+ "queue": self._processing.queue, # !!!!
82
+ },
83
+ }
84
+
77
85
  def _set_kernel_slice_arg(self, d_slice):
78
86
  self.kern_proj_args[1] = d_slice
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nabu
3
- Version: 2024.2.13
3
+ Version: 2024.2.14
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,7 @@
1
1
  doc/conf.py,sha256=3xtCarCHrXPr50GbeRDuH-o3Jzojw7mpr7vpGfZPLAE,3787
2
2
  doc/create_conf_doc.py,sha256=IVOdP70KvbW9WS_UQu3Iyd0YfS60E2fJ5IDtQ_s4cDw,1143
3
3
  doc/get_mathjax.py,sha256=VIvKRCdDuF2VoY8JD3mSey9XX13AZMmwTJBHdt1tUs4,1012
4
- nabu/__init__.py,sha256=iqQNXUZn1tj4dy0-d8Q6pnVT3_JslbGsfNuFFaYkcKQ,271
4
+ nabu/__init__.py,sha256=8_mbP31FX12L0QwJXpiUISTKOgsEynDKnwTQRVjBaOc,271
5
5
  nabu/tests.py,sha256=cew9OY2uTyncHI_HM32W8CP6B1GTGKaOW65XtMEqs7o,1417
6
6
  nabu/testutils.py,sha256=VkSL9tbY0XEH49Z5OjDFFhzkSxrCv4UIuvSVFgegSUY,7632
7
7
  nabu/utils.py,sha256=V1B_sD54XGNKn5pORa2yNCATyswOzybey3sv8BuIYWY,26355
@@ -221,9 +221,9 @@ nabu/processing/tests/test_transpose.py,sha256=hTG17wTaB5Wv6twbW3ZFhBv6BYfqJY7DT
221
221
  nabu/processing/tests/test_unsharp.py,sha256=R3ovbwDDp3ccy2A8t6CcUVELXRWkED5EnQdN2FQOfQM,4391
222
222
  nabu/reconstruction/__init__.py,sha256=EmKVvx_-FJvzJngG4ielIC7FhMCpI1Waaflg_lF44tk,163
223
223
  nabu/reconstruction/cone.py,sha256=RZj1JoxqskShvglgxUnsbYw7qbm6Rralt7hJ96eU-8c,19015
224
- nabu/reconstruction/fbp.py,sha256=uwEniGdEOn1atc9mTAHEDeF1y-ZqneifCKVr-ieHZss,5015
225
- nabu/reconstruction/fbp_base.py,sha256=DwZCilPXgGMRPV8_XfkWiaXUzWFM8rNBa8IyMdy5nno,17092
226
- nabu/reconstruction/fbp_opencl.py,sha256=coEGLq65PCuvWnhAbIyLPHACkWjMB0XOceMp9ZIDWtc,3274
224
+ nabu/reconstruction/fbp.py,sha256=iXC9M91DWq3SauZa44iWkSBcy6YIxmmjx1PyIOLFCTk,5179
225
+ nabu/reconstruction/fbp_base.py,sha256=Mh7brqiCsfPLMI2-OU4g0PafG7qq2mYR1TJYizemC_4,17059
226
+ nabu/reconstruction/fbp_opencl.py,sha256=U-XP7v1m1lJ1ulvlF8tclJfEOWmZLCT1hevIw4gsNec,3497
227
227
  nabu/reconstruction/filtering.py,sha256=fg_loze-VkiFqBAqQ7AGkKwCDz-5UskSSh27klaakD0,8659
228
228
  nabu/reconstruction/filtering_cuda.py,sha256=syKp_CHzMjM4sBSK0JI5k5Ag3xzROvM15FfOO48ssDo,4041
229
229
  nabu/reconstruction/filtering_opencl.py,sha256=B9zcvSxvt3KMxEXxoirop1vfqM0kSRP-LhvGgqDGQlA,3957
@@ -309,9 +309,9 @@ nabu/thirdparty/pore3d_deringer_munch.py,sha256=o4bisnFc-wMjuohWBT8wgWmfNehPQGtC
309
309
  nabu/thirdparty/tomocupy_remove_stripe.py,sha256=Khe4zFf0kRzu65Yxnvq58gt1ljOztqJGdMDhVAiM7lM,24363
310
310
  nabu/thirdparty/tomopy_phase.py,sha256=hK4oPpkogLOhv23XzzEXQY2u3r8fJvASY_bINVs6ERE,8634
311
311
  nabu/thirdparty/tomwer_load_flats_darks.py,sha256=ZNoVAinUb_wGYbfvs_4BVnWsjsQmNxSvCh1bWhR2WWg,5611
312
- nabu-2024.2.13.dist-info/licenses/LICENSE,sha256=1eAIPSnEsnSFNUODnLtNtQTs76exG3ZxJ1DJR6zoUBA,1066
313
- nabu-2024.2.13.dist-info/METADATA,sha256=QfOWtai7CR-1J1MijA9XJhr74yw2RByxlqGGe662MeE,4266
314
- nabu-2024.2.13.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
315
- nabu-2024.2.13.dist-info/entry_points.txt,sha256=cJKGkBeykVL7uK3E4R0RLRqMXifTL2qdO573syPAvJc,1288
316
- nabu-2024.2.13.dist-info/top_level.txt,sha256=fsm_N3eXLRZk2QXF9OSKPNDPFXOz8FAQjHh5avT3dok,9
317
- nabu-2024.2.13.dist-info/RECORD,,
312
+ nabu-2024.2.14.dist-info/licenses/LICENSE,sha256=1eAIPSnEsnSFNUODnLtNtQTs76exG3ZxJ1DJR6zoUBA,1066
313
+ nabu-2024.2.14.dist-info/METADATA,sha256=jZjH6LPbNHttKwjr2bJ8j5NG6QrKruR9R3PdlTIKw9w,4266
314
+ nabu-2024.2.14.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
315
+ nabu-2024.2.14.dist-info/entry_points.txt,sha256=cJKGkBeykVL7uK3E4R0RLRqMXifTL2qdO573syPAvJc,1288
316
+ nabu-2024.2.14.dist-info/top_level.txt,sha256=fsm_N3eXLRZk2QXF9OSKPNDPFXOz8FAQjHh5avT3dok,9
317
+ nabu-2024.2.14.dist-info/RECORD,,