nabu 2024.2.10__tar.gz → 2024.2.12__tar.gz

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.
Files changed (323) hide show
  1. {nabu-2024.2.10/nabu.egg-info → nabu-2024.2.12}/PKG-INFO +5 -26
  2. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/__init__.py +1 -1
  3. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/io/cast_volume.py +13 -0
  4. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/fullfield/chunked.py +1 -1
  5. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/rings_cuda.py +41 -13
  6. nabu-2024.2.12/nabu/resources/tests/test_extract.py +9 -0
  7. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/config.py +1 -0
  8. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/stitcher/dumper/__init__.py +1 -0
  9. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/stitcher/dumper/postprocessing.py +105 -1
  10. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/stitcher/post_processing.py +13 -3
  11. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/stitcher/single_axis.py +7 -6
  12. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/stitcher/z_stitcher.py +8 -4
  13. {nabu-2024.2.10 → nabu-2024.2.12/nabu.egg-info}/PKG-INFO +5 -26
  14. {nabu-2024.2.10 → nabu-2024.2.12}/nabu.egg-info/SOURCES.txt +1 -0
  15. {nabu-2024.2.10 → nabu-2024.2.12}/nabu.egg-info/requires.txt +1 -1
  16. {nabu-2024.2.10 → nabu-2024.2.12}/nabu.egg-info/top_level.txt +1 -0
  17. {nabu-2024.2.10 → nabu-2024.2.12}/pyproject.toml +3 -3
  18. {nabu-2024.2.10 → nabu-2024.2.12}/LICENSE +0 -0
  19. {nabu-2024.2.10 → nabu-2024.2.12}/README.md +0 -0
  20. {nabu-2024.2.10 → nabu-2024.2.12}/doc/conf.py +0 -0
  21. {nabu-2024.2.10 → nabu-2024.2.12}/doc/create_conf_doc.py +0 -0
  22. {nabu-2024.2.10 → nabu-2024.2.12}/doc/get_mathjax.py +0 -0
  23. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/__init__.py +0 -0
  24. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/bootstrap.py +0 -0
  25. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/bootstrap_stitching.py +0 -0
  26. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/cast_volume.py +0 -0
  27. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/cli_configs.py +0 -0
  28. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/compare_volumes.py +0 -0
  29. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/composite_cor.py +0 -0
  30. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/correct_rot.py +0 -0
  31. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/create_distortion_map_from_poly.py +0 -0
  32. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/diag_to_pix.py +0 -0
  33. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/diag_to_rot.py +0 -0
  34. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/double_flatfield.py +0 -0
  35. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/generate_header.py +0 -0
  36. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/histogram.py +0 -0
  37. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/multicor.py +0 -0
  38. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/nx_z_splitter.py +0 -0
  39. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/parse_reconstruction_log.py +0 -0
  40. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/prepare_weights_double.py +0 -0
  41. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/reconstruct.py +0 -0
  42. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/reconstruct_helical.py +0 -0
  43. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/reduce_dark_flat.py +0 -0
  44. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/rotate.py +0 -0
  45. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/shrink_dataset.py +0 -0
  46. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/stitching.py +0 -0
  47. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/tests/test_reduce_dark_flat.py +0 -0
  48. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/utils.py +0 -0
  49. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/app/validator.py +0 -0
  50. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/__init__.py +0 -0
  51. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/convolution.py +0 -0
  52. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/fft.py +0 -0
  53. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/kernel.py +0 -0
  54. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/medfilt.py +0 -0
  55. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/padding.py +0 -0
  56. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/processing.py +0 -0
  57. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/ElementOp.cu +0 -0
  58. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/backproj.cu +0 -0
  59. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/backproj_polar.cu +0 -0
  60. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/boundary.h +0 -0
  61. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/cone.cu +0 -0
  62. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/convolution.cu +0 -0
  63. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/dfi_fftshift.cu +0 -0
  64. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/flatfield.cu +0 -0
  65. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/fourier_wavelets.cu +0 -0
  66. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/halftomo.cu +0 -0
  67. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/helical_padding.cu +0 -0
  68. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/hierarchical_backproj.cu +0 -0
  69. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/histogram.cu +0 -0
  70. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/interpolation.cu +0 -0
  71. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/medfilt.cu +0 -0
  72. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/normalization.cu +0 -0
  73. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/padding.cu +0 -0
  74. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/proj.cu +0 -0
  75. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/rotation.cu +0 -0
  76. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/src/transpose.cu +0 -0
  77. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/tests/__init__.py +0 -0
  78. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/cuda/utils.py +0 -0
  79. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/estimation/__init__.py +0 -0
  80. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/estimation/alignment.py +0 -0
  81. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/estimation/cor.py +0 -0
  82. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/estimation/cor_sino.py +0 -0
  83. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/estimation/distortion.py +0 -0
  84. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/estimation/focus.py +0 -0
  85. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/estimation/tests/__init__.py +0 -0
  86. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/estimation/tests/test_alignment.py +0 -0
  87. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/estimation/tests/test_cor.py +0 -0
  88. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/estimation/tests/test_focus.py +0 -0
  89. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/estimation/tests/test_tilt.py +0 -0
  90. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/estimation/tests/test_translation.py +0 -0
  91. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/estimation/tilt.py +0 -0
  92. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/estimation/translation.py +0 -0
  93. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/estimation/utils.py +0 -0
  94. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/io/__init__.py +0 -0
  95. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/io/detector_distortion.py +0 -0
  96. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/io/reader.py +0 -0
  97. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/io/reader_helical.py +0 -0
  98. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/io/tests/__init__.py +0 -0
  99. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/io/tests/test_cast_volume.py +0 -0
  100. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/io/tests/test_detector_distortion.py +0 -0
  101. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/io/tests/test_readers.py +0 -0
  102. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/io/tests/test_writers.py +0 -0
  103. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/io/utils.py +0 -0
  104. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/io/writer.py +0 -0
  105. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/__init__.py +0 -0
  106. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/binning.py +0 -0
  107. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/fftshift.py +0 -0
  108. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/filters.py +0 -0
  109. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/fourier_filters.py +0 -0
  110. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/histogram.py +0 -0
  111. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/histogram_cuda.py +0 -0
  112. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/kernel_base.py +0 -0
  113. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/padding.py +0 -0
  114. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/padding_base.py +0 -0
  115. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/processing_base.py +0 -0
  116. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/rotation.py +0 -0
  117. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/rotation_cuda.py +0 -0
  118. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/tests/__init__.py +0 -0
  119. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/tests/test_binning.py +0 -0
  120. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/tests/test_interpolation.py +0 -0
  121. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/transpose.py +0 -0
  122. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/unsharp.py +0 -0
  123. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/unsharp_cuda.py +0 -0
  124. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/unsharp_opencl.py +0 -0
  125. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/misc/utils.py +0 -0
  126. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/opencl/__init__.py +0 -0
  127. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/opencl/fft.py +0 -0
  128. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/opencl/kernel.py +0 -0
  129. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/opencl/memcpy.py +0 -0
  130. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/opencl/padding.py +0 -0
  131. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/opencl/processing.py +0 -0
  132. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/opencl/src/ElementOp.cl +0 -0
  133. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/opencl/src/backproj.cl +0 -0
  134. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/opencl/src/fftshift.cl +0 -0
  135. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/opencl/src/halftomo.cl +0 -0
  136. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/opencl/src/padding.cl +0 -0
  137. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/opencl/src/roll.cl +0 -0
  138. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/opencl/src/transpose.cl +0 -0
  139. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/opencl/tests/__init__.py +0 -0
  140. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/opencl/utils.py +0 -0
  141. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/__init__.py +0 -0
  142. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/config.py +0 -0
  143. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/config_validators.py +0 -0
  144. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/datadump.py +0 -0
  145. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/dataset_validator.py +0 -0
  146. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/detector_distortion_provider.py +0 -0
  147. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/estimators.py +0 -0
  148. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/fullfield/__init__.py +0 -0
  149. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/fullfield/chunked_cuda.py +0 -0
  150. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/fullfield/computations.py +0 -0
  151. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/fullfield/dataset_validator.py +0 -0
  152. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/fullfield/nabu_config.py +0 -0
  153. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/fullfield/processconfig.py +0 -0
  154. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/fullfield/reconstruction.py +0 -0
  155. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/helical/__init__.py +0 -0
  156. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/helical/dataset_validator.py +0 -0
  157. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/helical/fbp.py +0 -0
  158. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/helical/filtering.py +0 -0
  159. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/helical/gridded_accumulator.py +0 -0
  160. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/helical/helical_chunked_regridded.py +0 -0
  161. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/helical/helical_chunked_regridded_cuda.py +0 -0
  162. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/helical/helical_reconstruction.py +0 -0
  163. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/helical/helical_utils.py +0 -0
  164. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/helical/nabu_config.py +0 -0
  165. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/helical/processconfig.py +0 -0
  166. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/helical/span_strategy.py +0 -0
  167. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/helical/tests/__init__.py +0 -0
  168. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/helical/weight_balancer.py +0 -0
  169. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/params.py +0 -0
  170. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/processconfig.py +0 -0
  171. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/reader.py +0 -0
  172. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/tests/test_estimators.py +0 -0
  173. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/utils.py +0 -0
  174. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/writer.py +0 -0
  175. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/pipeline/xrdct/__init__.py +0 -0
  176. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/__init__.py +0 -0
  177. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/alignment.py +0 -0
  178. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/ccd.py +0 -0
  179. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/ccd_cuda.py +0 -0
  180. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/ctf.py +0 -0
  181. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/ctf_cuda.py +0 -0
  182. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/distortion.py +0 -0
  183. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/double_flatfield.py +0 -0
  184. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/double_flatfield_cuda.py +0 -0
  185. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/double_flatfield_variable_region.py +0 -0
  186. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/flatfield.py +0 -0
  187. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/flatfield_cuda.py +0 -0
  188. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/flatfield_variable_region.py +0 -0
  189. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/phase.py +0 -0
  190. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/phase_cuda.py +0 -0
  191. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/shift.py +0 -0
  192. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/shift_cuda.py +0 -0
  193. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/tests/__init__.py +0 -0
  194. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/tests/test_ccd_corr.py +0 -0
  195. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/tests/test_ctf.py +0 -0
  196. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/tests/test_double_flatfield.py +0 -0
  197. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/tests/test_flatfield.py +0 -0
  198. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/tests/test_paganin.py +0 -0
  199. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/preproc/tests/test_vshift.py +0 -0
  200. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/__init__.py +0 -0
  201. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/azim.py +0 -0
  202. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/convolution_cuda.py +0 -0
  203. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/fft_base.py +0 -0
  204. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/fft_cuda.py +0 -0
  205. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/fft_opencl.py +0 -0
  206. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/fftshift.py +0 -0
  207. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/histogram.py +0 -0
  208. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/histogram_cuda.py +0 -0
  209. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/kernel_base.py +0 -0
  210. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/medfilt_cuda.py +0 -0
  211. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/muladd.py +0 -0
  212. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/muladd_cuda.py +0 -0
  213. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/padding_base.py +0 -0
  214. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/padding_cuda.py +0 -0
  215. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/padding_opencl.py +0 -0
  216. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/processing_base.py +0 -0
  217. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/roll_opencl.py +0 -0
  218. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/rotation.py +0 -0
  219. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/rotation_cuda.py +0 -0
  220. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/tests/__init__.py +0 -0
  221. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/tests/test_fft.py +0 -0
  222. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/tests/test_fftshift.py +0 -0
  223. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/tests/test_histogram.py +0 -0
  224. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/tests/test_medfilt.py +0 -0
  225. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/tests/test_muladd.py +0 -0
  226. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/tests/test_padding.py +0 -0
  227. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/tests/test_roll.py +0 -0
  228. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/tests/test_rotation.py +0 -0
  229. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/tests/test_transpose.py +0 -0
  230. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/tests/test_unsharp.py +0 -0
  231. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/transpose.py +0 -0
  232. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/unsharp.py +0 -0
  233. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/unsharp_cuda.py +0 -0
  234. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/processing/unsharp_opencl.py +0 -0
  235. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/__init__.py +0 -0
  236. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/cone.py +0 -0
  237. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/fbp.py +0 -0
  238. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/fbp_base.py +0 -0
  239. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/fbp_opencl.py +0 -0
  240. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/filtering.py +0 -0
  241. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/filtering_cuda.py +0 -0
  242. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/filtering_opencl.py +0 -0
  243. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/hbp.py +0 -0
  244. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/mlem.py +0 -0
  245. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/projection.py +0 -0
  246. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/reconstructor.py +0 -0
  247. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/reconstructor_cuda.py +0 -0
  248. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/rings.py +0 -0
  249. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/sinogram.py +0 -0
  250. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/sinogram_cuda.py +0 -0
  251. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/sinogram_opencl.py +0 -0
  252. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/tests/__init__.py +0 -0
  253. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/tests/test_cone.py +0 -0
  254. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/tests/test_deringer.py +0 -0
  255. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/tests/test_fbp.py +0 -0
  256. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/tests/test_filtering.py +0 -0
  257. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/tests/test_halftomo.py +0 -0
  258. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/tests/test_mlem.py +0 -0
  259. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/tests/test_projector.py +0 -0
  260. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/tests/test_reconstructor.py +0 -0
  261. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/reconstruction/tests/test_sino_normalization.py +0 -0
  262. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/resources/__init__.py +0 -0
  263. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/resources/cli/__init__.py +0 -0
  264. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/resources/cor.py +0 -0
  265. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/resources/dataset_analyzer.py +0 -0
  266. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/resources/gpu.py +0 -0
  267. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/resources/logger.py +0 -0
  268. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/resources/nxflatfield.py +0 -0
  269. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/resources/templates/__init__.py +0 -0
  270. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/resources/templates/bm05_pag.conf +0 -0
  271. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/resources/templates/id16_ctf.conf +0 -0
  272. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/resources/templates/id16_holo.conf +0 -0
  273. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/resources/templates/id16a_fluo.conf +0 -0
  274. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/resources/templates/id19_pag.conf +0 -0
  275. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/resources/tests/__init__.py +0 -0
  276. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/resources/tests/test_nxflatfield.py +0 -0
  277. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/resources/tests/test_units.py +0 -0
  278. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/resources/utils.py +0 -0
  279. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/__init__.py +0 -0
  280. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/alignment.py +0 -0
  281. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/definitions.py +0 -0
  282. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/frame_composition.py +0 -0
  283. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/overlap.py +0 -0
  284. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/sample_normalization.py +0 -0
  285. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/single_axis_stitching.py +0 -0
  286. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/slurm_utils.py +0 -0
  287. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/stitcher/__init__.py +0 -0
  288. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/stitcher/base.py +0 -0
  289. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/stitcher/dumper/base.py +0 -0
  290. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/stitcher/dumper/preprocessing.py +0 -0
  291. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/stitcher/pre_processing.py +0 -0
  292. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/stitcher/stitcher.py +0 -0
  293. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/stitcher/y_stitcher.py +0 -0
  294. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/stitcher_2D.py +0 -0
  295. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/tests/__init__.py +0 -0
  296. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/tests/test_alignment.py +0 -0
  297. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/tests/test_config.py +0 -0
  298. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/tests/test_frame_composition.py +0 -0
  299. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/tests/test_overlap.py +0 -0
  300. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/tests/test_sample_normalization.py +0 -0
  301. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/tests/test_slurm_utils.py +0 -0
  302. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/tests/test_utils.py +0 -0
  303. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/tests/test_y_preprocessing_stitching.py +0 -0
  304. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/tests/test_z_postprocessing_stitching.py +0 -0
  305. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/tests/test_z_preprocessing_stitching.py +0 -0
  306. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/utils/__init__.py +0 -0
  307. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/utils/post_processing.py +0 -0
  308. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/utils/tests/test_post-processing.py +0 -0
  309. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/utils/utils.py +0 -0
  310. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/y_stitching.py +0 -0
  311. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/stitching/z_stitching.py +0 -0
  312. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/tests.py +0 -0
  313. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/testutils.py +0 -0
  314. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/thirdparty/__init__.py +0 -0
  315. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/thirdparty/algotom_convert_sino.py +0 -0
  316. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/thirdparty/pore3d_deringer_munch.py +0 -0
  317. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/thirdparty/tomocupy_remove_stripe.py +0 -0
  318. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/thirdparty/tomopy_phase.py +0 -0
  319. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/thirdparty/tomwer_load_flats_darks.py +0 -0
  320. {nabu-2024.2.10 → nabu-2024.2.12}/nabu/utils.py +0 -0
  321. {nabu-2024.2.10 → nabu-2024.2.12}/nabu.egg-info/dependency_links.txt +0 -0
  322. {nabu-2024.2.10 → nabu-2024.2.12}/nabu.egg-info/entry_points.txt +0 -0
  323. {nabu-2024.2.10 → nabu-2024.2.12}/setup.cfg +0 -0
@@ -1,31 +1,10 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: nabu
3
- Version: 2024.2.10
3
+ Version: 2024.2.12
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>
7
- License: MIT License
8
-
9
- Copyright (c) 2020-2024 ESRF
10
-
11
- Permission is hereby granted, free of charge, to any person obtaining a copy
12
- of this software and associated documentation files (the "Software"), to deal
13
- in the Software without restriction, including without limitation the rights
14
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- copies of the Software, and to permit persons to whom the Software is
16
- furnished to do so, subject to the following conditions:
17
-
18
- The above copyright notice and this permission notice shall be included in all
19
- copies or substantial portions of the Software.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
- SOFTWARE.
28
-
7
+ License-Expression: MIT
29
8
  Project-URL: Homepage, https://gitlab.esrf.fr/tomotools/nabu
30
9
  Project-URL: Documentation, http://www.silx.org/pub/nabu/doc
31
10
  Project-URL: Repository, https://gitlab.esrf.fr/tomotools/nabu/-/releases
@@ -40,7 +19,6 @@ Classifier: Programming Language :: Python :: 3.8
40
19
  Classifier: Programming Language :: Python :: 3.9
41
20
  Classifier: Programming Language :: Python :: 3.10
42
21
  Classifier: Environment :: Console
43
- Classifier: License :: OSI Approved :: MIT License
44
22
  Classifier: Operating System :: Unix
45
23
  Classifier: Operating System :: MacOS :: MacOS X
46
24
  Classifier: Operating System :: POSIX
@@ -53,7 +31,7 @@ Requires-Dist: numpy<2,>1.9.0
53
31
  Requires-Dist: scipy
54
32
  Requires-Dist: h5py>=3.0
55
33
  Requires-Dist: silx>=0.15.0
56
- Requires-Dist: tomoscan>=2.1.0
34
+ Requires-Dist: tomoscan>=2.1.5
57
35
  Requires-Dist: psutil
58
36
  Requires-Dist: pytest
59
37
  Requires-Dist: tifffile
@@ -78,6 +56,7 @@ Requires-Dist: sphinx; extra == "doc"
78
56
  Requires-Dist: cloud_sptheme; extra == "doc"
79
57
  Requires-Dist: myst-parser; extra == "doc"
80
58
  Requires-Dist: nbsphinx; extra == "doc"
59
+ Dynamic: license-file
81
60
 
82
61
  # Nabu
83
62
 
@@ -1,4 +1,4 @@
1
- __version__ = "2024.2.10"
1
+ __version__ = "2024.2.12"
2
2
  __nabu_modules__ = [
3
3
  "app",
4
4
  "cuda",
@@ -1,4 +1,6 @@
1
1
  import os
2
+
3
+ from tomoscan.esrf.volume.singleframebase import VolumeSingleFrameBase
2
4
  from nabu.misc.utils import rescale_data
3
5
  from nabu.pipeline.params import files_formats
4
6
  from tomoscan.volumebase import VolumeBase
@@ -176,6 +178,17 @@ def cast_volume(
176
178
  if not isinstance(output_data_type, numpy.dtype):
177
179
  raise TypeError(f"output_data_type is expected to be a {numpy.dtype}. {type(output_data_type)} provided")
178
180
 
181
+ # Make sure the output volume has the same "start_index" as input volume, if relevant
182
+ if isinstance(input_volume, VolumeSingleFrameBase) and isinstance(output_volume, VolumeSingleFrameBase):
183
+ try:
184
+ first_file_name = next(input_volume.browse_data_files())
185
+ start_idx = int(first_file_name.split(".")[0].split("_")[-1])
186
+ except (StopIteration, ValueError, TypeError):
187
+ # StopIteration: Input volume has no file - should not happen
188
+ # ValueError / TypeError: fail to convert to int, something wrong when extracting slice number (non-default file name scheme)
189
+ start_idx = 0
190
+ output_volume.start_index = start_idx
191
+
179
192
  # start processing
180
193
  # check for data_min and data_max
181
194
  if data_min is None or data_max is None:
@@ -781,7 +781,7 @@ class ChunkedPipeline:
781
781
  @pipeline_step("sino_deringer", "Removing rings on sinograms")
782
782
  def _destripe_sinos(self):
783
783
  sinos = np.rollaxis(self.radios, 1, 0) # view
784
- self.sino_deringer.remove_rings(sinos) # TODO check it works with non-contiguous view
784
+ self.sino_deringer.remove_rings(sinos)
785
785
 
786
786
  @pipeline_step("reconstruction", "Reconstruction")
787
787
  def _reconstruct(self):
@@ -264,13 +264,7 @@ class CudaSinoMeanDeringer(SinoMeanDeringer):
264
264
  filename=get_cuda_srcfile("normalization.cu"),
265
265
  signature="PPiii",
266
266
  )
267
- self._mean_kernel_block = (32, 1, 32)
268
- self._mean_kernel_grid = [updiv(a, b) for a, b in zip(self.sinos_shape[::-1], self._mean_kernel_block)]
269
- self._mean_kernel_args = [self.d_sino_profile, np.int32(self.n_x), np.int32(self.n_angles), np.int32(self.n_z)]
270
- self._mean_kernel_kwargs = {
271
- "grid": self._mean_kernel_grid,
272
- "block": self._mean_kernel_block,
273
- }
267
+ self._set_kernel_args_normalization()
274
268
 
275
269
  self._op_kernel = self.processing.kernel(
276
270
  "inplace_generic_op_3Dby1D",
@@ -278,9 +272,25 @@ class CudaSinoMeanDeringer(SinoMeanDeringer):
278
272
  signature="PPiii",
279
273
  options=["-DGENERIC_OP=%d" % (3 if self.mode == "divide" else 1)],
280
274
  )
281
- self._op_kernel_block = (16, 16, 4)
282
- self._op_kernel_grid = [updiv(a, b) for a, b in zip(self.sinos_shape[::-1], self._op_kernel_block)]
283
- self._op_kernel_args = [self.d_sino_profile, np.int32(self.n_x), np.int32(self.n_angles), np.int32(self.n_z)]
275
+ self._set_kernel_args_mult()
276
+
277
+ def _set_kernel_args_normalization(self, blk_z=32, n_z=None):
278
+ n_z = n_z or self.n_z
279
+ self._mean_kernel_block = (32, 1, blk_z)
280
+ sinos_shape_xyz = self.sinos_shape[1:][::-1] + (n_z,)
281
+ self._mean_kernel_grid = [updiv(a, b) for a, b in zip(sinos_shape_xyz, self._mean_kernel_block)]
282
+ self._mean_kernel_args = [self.d_sino_profile, np.int32(self.n_x), np.int32(self.n_angles), np.int32(n_z)]
283
+ self._mean_kernel_kwargs = {
284
+ "grid": self._mean_kernel_grid,
285
+ "block": self._mean_kernel_block,
286
+ }
287
+
288
+ def _set_kernel_args_mult(self, blk_z=4, n_z=None):
289
+ n_z = n_z or self.n_z
290
+ self._op_kernel_block = (16, 16, blk_z)
291
+ sinos_shape_xyz = self.sinos_shape[1:][::-1] + (n_z,)
292
+ self._op_kernel_grid = [updiv(a, b) for a, b in zip(sinos_shape_xyz, self._op_kernel_block)]
293
+ self._op_kernel_args = [self.d_sino_profile, np.int32(self.n_x), np.int32(self.n_angles), np.int32(n_z)]
284
294
  self._op_kernel_kwargs = {
285
295
  "grid": self._op_kernel_grid,
286
296
  "block": self._op_kernel_block,
@@ -315,23 +325,41 @@ class CudaSinoMeanDeringer(SinoMeanDeringer):
315
325
  self.d_sino_profile[:] = sino_profile_p[self._pad_left : -self._pad_right]
316
326
  return self.d_sino_profile
317
327
 
328
+ def _remove_rings_sino(self, d_sino):
329
+ self._mean_kernel(d_sino, *self._mean_kernel_args, **self._mean_kernel_kwargs)
330
+ self._apply_filter(self.d_sino_profile)
331
+ self._op_kernel(d_sino, *self._op_kernel_args, **self._op_kernel_kwargs)
332
+
318
333
  def remove_rings_sinogram(self, sino, output=None):
319
334
  #
320
335
  if output is not None:
321
336
  raise NotImplementedError
322
337
  #
323
338
  if not (sino.flags.c_contiguous):
339
+ # If the sinogram (or stack of sinogram) is not C-Contiguous, we'll proceed by looping over each
340
+ # C-Contiguous sinogram
324
341
  d_sino = self.processing.allocate_array("d_sino", sino.shape, np.float32)
325
342
  d_sino[:] = sino[:]
326
343
  else:
327
344
  d_sino = sino
328
- self._mean_kernel(d_sino, *self._mean_kernel_args, **self._mean_kernel_kwargs)
329
- self._apply_filter(self.d_sino_profile)
330
- self._op_kernel(d_sino, *self._op_kernel_args, **self._op_kernel_kwargs)
345
+ self._remove_rings_sino(d_sino)
331
346
  if not (sino.flags.c_contiguous):
332
347
  sino[:] = self.processing.d_sino[:]
333
348
  return sino
334
349
 
335
350
  def remove_rings_sinograms(self, sinograms):
351
+ if sinograms.flags.c_contiguous:
352
+ self._remove_rings_sino(sinograms)
353
+ return sinograms
354
+
355
+ # If the stack of sinograms is not C-Contiguous, we have to proceed by looping over each C-Contiguous sinogram
356
+ # (i.e don't copy the entire stack, just one sinogram at a time)
357
+ self._set_kernel_args_normalization(blk_z=1, n_z=1)
358
+ self._set_kernel_args_mult(blk_z=1, n_z=1)
336
359
  for i in range(sinograms.shape[0]):
337
360
  self.remove_rings_sinogram(sinograms[i])
361
+ self._set_kernel_args_normalization()
362
+ self._set_kernel_args_mult()
363
+ return sinograms
364
+
365
+ remove_rings = remove_rings_sinograms
@@ -0,0 +1,9 @@
1
+ from nabu.utils import list_match_queries
2
+
3
+
4
+ def test_list_match_queries():
5
+
6
+ # entry0000 .... entry0099
7
+ avail = ["entry%04d" % i for i in range(100)]
8
+ query = "entry0000"
9
+ list_match_queries()
@@ -411,6 +411,7 @@ class NormalizationBySample:
411
411
  @dataclass
412
412
  class SlurmConfig:
413
413
  "configuration for slurm jobs"
414
+
414
415
  partition: str = "" # note: must stay empty to make by default we don't use slurm (use by the configuration file)
415
416
  mem: str = "128"
416
417
  n_jobs: int = 1
@@ -1,3 +1,4 @@
1
1
  from .postprocessing import PostProcessingStitchingDumper
2
2
  from .postprocessing import PostProcessingStitchingDumperNoDD
3
+ from .postprocessing import PostProcessingStitchingDumperWithCache
3
4
  from .preprocessing import PreProcessingStitchingDumper
@@ -161,7 +161,7 @@ class OutputVolumeNoDDContext(OutputVolumeContext):
161
161
 
162
162
  class PostProcessingStitchingDumper(DumperBase):
163
163
  """
164
- dumper to be used when save data durint post-processing stitching (on recosntructed volume). Output is expected to be an NXtomo
164
+ dumper to be used when save data during post-processing stitching (on reconstructed volume). Output is expected to be an NXtomo
165
165
  """
166
166
 
167
167
  OutputDatasetContext = OutputVolumeContext
@@ -220,6 +220,110 @@ class PostProcessingStitchingDumper(DumperBase):
220
220
  )
221
221
 
222
222
 
223
+ class PostProcessingStitchingDumperWithCache(PostProcessingStitchingDumper):
224
+ """
225
+ PostProcessingStitchingDumper with intermediate cache in order to speed up writting.
226
+ The cache is save to disk when full or when closing the dumper.
227
+ Mostly convenient for HDF5
228
+ """
229
+
230
+ def __init__(self, configuration):
231
+ super().__init__(configuration)
232
+ self.__cache = None
233
+ """cache as a numpy.ndarray"""
234
+ self.__cache_size = None
235
+ """how many frame do we want to keep in memory before dumping to disk"""
236
+ self.__dump_axis = None
237
+ """axis along which we load / save the data. Different of the stitching axis"""
238
+ self.__final_volume_shape = None
239
+ self.__output_frame_index = 0
240
+ self.__cache_index = 0
241
+
242
+ def init_cache(self, dump_axis, size, dtype):
243
+ if dump_axis not in (0, 1, 2):
244
+ raise ValueError(f"axis should be in (0, 1, 2). Got {dump_axis}")
245
+
246
+ self.__dump_axis = dump_axis
247
+ self.__cache_size = size
248
+ self.__cache = numpy.empty(
249
+ self._get_cache_shape(),
250
+ dtype=dtype,
251
+ )
252
+
253
+ def reset_cache(self):
254
+ self.__cache_index = 0
255
+
256
+ def set_final_volume_shape(self, shape):
257
+ self.__final_volume_shape = shape
258
+
259
+ def _get_cache_shape(self):
260
+ assert self.__final_volume_shape is not None, "final volume shape should already be defined"
261
+ if self.__dump_axis == 0:
262
+ return (
263
+ self.__cache_size,
264
+ self.__final_volume_shape[1],
265
+ self.__final_volume_shape[2],
266
+ )
267
+ elif self.__dump_axis == 1:
268
+ return (
269
+ self.__final_volume_shape[0],
270
+ self.__cache_size,
271
+ self.__final_volume_shape[2],
272
+ )
273
+ elif self.__dump_axis == 2:
274
+ return (
275
+ self.__final_volume_shape[0],
276
+ self.__final_volume_shape[1],
277
+ self.__cache_size,
278
+ )
279
+ else:
280
+ raise RuntimeError("dump axis should be defined before using the cache")
281
+
282
+ def save_stitched_frame(
283
+ self,
284
+ stitched_frame: numpy.ndarray,
285
+ composition_cls: dict,
286
+ i_frame: int,
287
+ axis: int,
288
+ ):
289
+ """save the frame to the volume. In this use case save the frame to the buffer. Waiting to be dump later.
290
+ We expect 'save_stitched_frame' to be called with contiguous frames (in the output volume space)
291
+ """
292
+ index_cache = self.__cache_index
293
+ if self.__dump_axis == 0:
294
+ self.__cache[index_cache,] = stitched_frame
295
+ elif self.__dump_axis == 1:
296
+ self.__cache[:, index_cache, :] = stitched_frame
297
+ elif self.__dump_axis == 2:
298
+ self.__cache[:, :, index_cache] = stitched_frame
299
+ else:
300
+ raise RuntimeError("dump axis should be defined before using the cache")
301
+ self.__cache_index += 1
302
+
303
+ def dump_cache(self, nb_frames):
304
+ """
305
+ dump the first nb_frames to disk
306
+ """
307
+ output_dataset_start_index = self.__output_frame_index
308
+ output_dataset_end_index = self.__output_frame_index + nb_frames
309
+ if self.__dump_axis == 0:
310
+ self.output_dataset[output_dataset_start_index:output_dataset_end_index] = self.__cache[:nb_frames]
311
+ elif self.__dump_axis == 1:
312
+ self.output_dataset[
313
+ :,
314
+ output_dataset_start_index:output_dataset_end_index,
315
+ ] = self.__cache[:, :nb_frames]
316
+ elif self.__dump_axis == 2:
317
+ self.output_dataset[:, :, output_dataset_start_index:output_dataset_end_index] = self.__cache[
318
+ :, :, :nb_frames
319
+ ]
320
+ else:
321
+ raise RuntimeError("dump axis should be defined before using the cache")
322
+
323
+ self.__output_frame_index = output_dataset_end_index
324
+ self.reset_cache()
325
+
326
+
223
327
  class PostProcessingStitchingDumperNoDD(PostProcessingStitchingDumper):
224
328
  """
225
329
  same as PostProcessingStitchingDumper but prevent to do data duplication.
@@ -412,7 +412,7 @@ class PostProcessingStitching(SingleAxisStitcher):
412
412
  "dtype": data_type,
413
413
  "dumper": self.dumper,
414
414
  }
415
- from .dumper.postprocessing import PostProcessingStitchingDumperNoDD
415
+ from .dumper.postprocessing import PostProcessingStitchingDumperNoDD, PostProcessingStitchingDumperWithCache
416
416
 
417
417
  # TODO: FIXME: for now not very elegant but in the case of avoiding data duplication
418
418
  # we need to provide the the information about the stitched part shape.
@@ -421,7 +421,11 @@ class PostProcessingStitching(SingleAxisStitcher):
421
421
  output_dataset_args["stitching_sources_arr_shapes"] = tuple(
422
422
  [(abs(overlap), n_slices, self._stitching_constant_length) for overlap in self._axis_0_rel_final_shifts]
423
423
  )
424
+ elif isinstance(self.dumper, PostProcessingStitchingDumperWithCache):
425
+ self.dumper.set_final_volume_shape(final_volume_shape)
424
426
 
427
+ bunch_size = 50
428
+ # how many frame to we stitch between two read from disk / save to disk
425
429
  with self.dumper.OutputDatasetContext(**output_dataset_args):
426
430
  # note: output_dataset is a HDF5 dataset if final volume is an HDF5 volume else is a numpy array
427
431
  with _RawDatasetsContext(
@@ -431,11 +435,14 @@ class PostProcessingStitching(SingleAxisStitcher):
431
435
  # note: raw_datasets can be numpy arrays or HDF5 dataset (in the case of HDF5Volume)
432
436
  # to speed up we read by bunch of dataset. For numpy array this doesn't change anything
433
437
  # but for HDF5 dataset this can speed up a lot the processing (depending on HDF5 dataset chuncks)
434
- # note: we read trhough axis 1
438
+ # note: we read through axis 1
435
439
  if isinstance(self.dumper, PostProcessingStitchingDumperNoDD):
436
440
  self.dumper.raw_regions_hdf5_dataset = raw_datasets
441
+ if isinstance(self.dumper, PostProcessingStitchingDumperWithCache):
442
+ self.dumper.init_cache(dump_axis=1, dtype=data_type, size=bunch_size)
443
+
437
444
  for bunch_start, bunch_end in PostProcessingStitching._data_bunch_iterator(
438
- slices=self._slices_to_stitch, bunch_size=50
445
+ slices=self._slices_to_stitch, bunch_size=bunch_size
439
446
  ):
440
447
  for data_frames in PostProcessingStitching._get_bunch_of_data(
441
448
  bunch_start,
@@ -470,6 +477,9 @@ class PostProcessingStitching(SingleAxisStitcher):
470
477
  self.progress.update()
471
478
  y_index += 1
472
479
 
480
+ if isinstance(self.dumper, PostProcessingStitchingDumperWithCache):
481
+ self.dumper.dump_cache(nb_frames=(bunch_end - bunch_start))
482
+
473
483
  # alias to general API
474
484
  def _create_stitching(self, store_composition):
475
485
  self._create_stitched_volume(store_composition=store_composition)
@@ -471,12 +471,13 @@ class SingleAxisStitcher(_StitcherBase, metaclass=_SingleAxisMetaClass):
471
471
  pad_mode=pad_mode,
472
472
  new_unstitched_axis_size=new_width,
473
473
  )
474
- dumper.save_stitched_frame(
475
- stitched_frame=stitched_frame,
476
- composition_cls=composition_cls,
477
- i_frame=i_frame,
478
- axis=1,
479
- )
474
+ if dumper is not None:
475
+ dumper.save_stitched_frame(
476
+ stitched_frame=stitched_frame,
477
+ composition_cls=composition_cls,
478
+ i_frame=i_frame,
479
+ axis=1,
480
+ )
480
481
 
481
482
  if return_composition_cls:
482
483
  return stitched_frame, composition_cls
@@ -1,6 +1,10 @@
1
1
  from nabu.stitching.stitcher.pre_processing import PreProcessingStitching
2
2
  from nabu.stitching.stitcher.post_processing import PostProcessingStitching
3
- from .dumper import PreProcessingStitchingDumper, PostProcessingStitchingDumperNoDD, PostProcessingStitchingDumper
3
+ from .dumper import (
4
+ PreProcessingStitchingDumper,
5
+ PostProcessingStitchingDumperNoDD,
6
+ PostProcessingStitchingDumperWithCache,
7
+ )
4
8
  from nabu.stitching.stitcher.single_axis import _SingleAxisMetaClass
5
9
 
6
10
 
@@ -26,12 +30,12 @@ class PreProcessingZStitcher(
26
30
  class PostProcessingZStitcher(
27
31
  PostProcessingStitching,
28
32
  metaclass=_SingleAxisMetaClass,
29
- dumper_cls=PostProcessingStitchingDumper,
33
+ dumper_cls=PostProcessingStitchingDumperWithCache,
30
34
  axis=0,
31
35
  ):
32
36
  @property
33
37
  def serie_label(self) -> str:
34
- return "z-serie"
38
+ return "z-series"
35
39
 
36
40
 
37
41
  class PostProcessingZStitcherNoDD(
@@ -42,4 +46,4 @@ class PostProcessingZStitcherNoDD(
42
46
  ):
43
47
  @property
44
48
  def serie_label(self) -> str:
45
- return "z-serie"
49
+ return "z-series"
@@ -1,31 +1,10 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: nabu
3
- Version: 2024.2.10
3
+ Version: 2024.2.12
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>
7
- License: MIT License
8
-
9
- Copyright (c) 2020-2024 ESRF
10
-
11
- Permission is hereby granted, free of charge, to any person obtaining a copy
12
- of this software and associated documentation files (the "Software"), to deal
13
- in the Software without restriction, including without limitation the rights
14
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- copies of the Software, and to permit persons to whom the Software is
16
- furnished to do so, subject to the following conditions:
17
-
18
- The above copyright notice and this permission notice shall be included in all
19
- copies or substantial portions of the Software.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
- SOFTWARE.
28
-
7
+ License-Expression: MIT
29
8
  Project-URL: Homepage, https://gitlab.esrf.fr/tomotools/nabu
30
9
  Project-URL: Documentation, http://www.silx.org/pub/nabu/doc
31
10
  Project-URL: Repository, https://gitlab.esrf.fr/tomotools/nabu/-/releases
@@ -40,7 +19,6 @@ Classifier: Programming Language :: Python :: 3.8
40
19
  Classifier: Programming Language :: Python :: 3.9
41
20
  Classifier: Programming Language :: Python :: 3.10
42
21
  Classifier: Environment :: Console
43
- Classifier: License :: OSI Approved :: MIT License
44
22
  Classifier: Operating System :: Unix
45
23
  Classifier: Operating System :: MacOS :: MacOS X
46
24
  Classifier: Operating System :: POSIX
@@ -53,7 +31,7 @@ Requires-Dist: numpy<2,>1.9.0
53
31
  Requires-Dist: scipy
54
32
  Requires-Dist: h5py>=3.0
55
33
  Requires-Dist: silx>=0.15.0
56
- Requires-Dist: tomoscan>=2.1.0
34
+ Requires-Dist: tomoscan>=2.1.5
57
35
  Requires-Dist: psutil
58
36
  Requires-Dist: pytest
59
37
  Requires-Dist: tifffile
@@ -78,6 +56,7 @@ Requires-Dist: sphinx; extra == "doc"
78
56
  Requires-Dist: cloud_sptheme; extra == "doc"
79
57
  Requires-Dist: myst-parser; extra == "doc"
80
58
  Requires-Dist: nbsphinx; extra == "doc"
59
+ Dynamic: license-file
81
60
 
82
61
  # Nabu
83
62
 
@@ -271,6 +271,7 @@ nabu/resources/templates/id16_holo.conf
271
271
  nabu/resources/templates/id16a_fluo.conf
272
272
  nabu/resources/templates/id19_pag.conf
273
273
  nabu/resources/tests/__init__.py
274
+ nabu/resources/tests/test_extract.py
274
275
  nabu/resources/tests/test_nxflatfield.py
275
276
  nabu/resources/tests/test_units.py
276
277
  nabu/stitching/__init__.py
@@ -2,7 +2,7 @@ numpy<2,>1.9.0
2
2
  scipy
3
3
  h5py>=3.0
4
4
  silx>=0.15.0
5
- tomoscan>=2.1.0
5
+ tomoscan>=2.1.5
6
6
  psutil
7
7
  pytest
8
8
  tifffile
@@ -1,3 +1,4 @@
1
1
  dist
2
2
  doc
3
3
  nabu
4
+ scripts
@@ -29,7 +29,8 @@ keywords = [
29
29
  "Ring artefact correction",
30
30
  "Geometric calibration",
31
31
  ]
32
- license = {file = "LICENSE"}
32
+ license = "MIT"
33
+ license-files = ["LICENSE"]
33
34
  classifiers = [
34
35
  "Development Status :: 5 - Production/Stable",
35
36
  "Intended Audience :: Developers",
@@ -40,7 +41,6 @@ classifiers = [
40
41
  "Programming Language :: Python :: 3.9",
41
42
  "Programming Language :: Python :: 3.10",
42
43
  "Environment :: Console",
43
- "License :: OSI Approved :: MIT License",
44
44
  "Operating System :: Unix",
45
45
  "Operating System :: MacOS :: MacOS X",
46
46
  "Operating System :: POSIX",
@@ -53,7 +53,7 @@ dependencies = [
53
53
  "scipy",
54
54
  "h5py>=3.0",
55
55
  "silx >= 0.15.0",
56
- "tomoscan >= 2.1.0",
56
+ "tomoscan >= 2.1.5",
57
57
  "psutil",
58
58
  "pytest",
59
59
  "tifffile",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes