nabu 2024.2.2__tar.gz → 2024.2.4__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 (325) hide show
  1. {nabu-2024.2.2/nabu.egg-info → nabu-2024.2.4}/PKG-INFO +3 -29
  2. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/__init__.py +1 -1
  3. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/estimators.py +1 -2
  4. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/fullfield/chunked.py +7 -1
  5. nabu-2024.2.4/nabu/resources/tests/test_extract.py +9 -0
  6. {nabu-2024.2.2 → nabu-2024.2.4/nabu.egg-info}/PKG-INFO +3 -29
  7. {nabu-2024.2.2 → nabu-2024.2.4}/nabu.egg-info/SOURCES.txt +1 -2
  8. {nabu-2024.2.2 → nabu-2024.2.4}/nabu.egg-info/top_level.txt +1 -0
  9. nabu-2024.2.2/doc/doc_config.py +0 -32
  10. nabu-2024.2.2/nabu/reconstruction/astra.py +0 -244
  11. {nabu-2024.2.2 → nabu-2024.2.4}/LICENSE +0 -0
  12. {nabu-2024.2.2 → nabu-2024.2.4}/README.md +0 -0
  13. {nabu-2024.2.2 → nabu-2024.2.4}/doc/conf.py +0 -0
  14. {nabu-2024.2.2 → nabu-2024.2.4}/doc/create_conf_doc.py +0 -0
  15. {nabu-2024.2.2 → nabu-2024.2.4}/doc/get_mathjax.py +0 -0
  16. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/__init__.py +0 -0
  17. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/bootstrap.py +0 -0
  18. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/bootstrap_stitching.py +0 -0
  19. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/cast_volume.py +0 -0
  20. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/cli_configs.py +0 -0
  21. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/compare_volumes.py +0 -0
  22. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/composite_cor.py +0 -0
  23. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/correct_rot.py +0 -0
  24. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/create_distortion_map_from_poly.py +0 -0
  25. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/diag_to_pix.py +0 -0
  26. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/diag_to_rot.py +0 -0
  27. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/double_flatfield.py +0 -0
  28. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/generate_header.py +0 -0
  29. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/histogram.py +0 -0
  30. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/multicor.py +0 -0
  31. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/nx_z_splitter.py +0 -0
  32. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/parse_reconstruction_log.py +0 -0
  33. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/prepare_weights_double.py +0 -0
  34. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/reconstruct.py +0 -0
  35. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/reconstruct_helical.py +0 -0
  36. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/reduce_dark_flat.py +0 -0
  37. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/rotate.py +0 -0
  38. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/shrink_dataset.py +0 -0
  39. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/stitching.py +0 -0
  40. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/tests/test_reduce_dark_flat.py +0 -0
  41. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/utils.py +0 -0
  42. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/app/validator.py +0 -0
  43. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/__init__.py +0 -0
  44. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/convolution.py +0 -0
  45. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/fft.py +0 -0
  46. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/kernel.py +0 -0
  47. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/medfilt.py +0 -0
  48. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/padding.py +0 -0
  49. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/processing.py +0 -0
  50. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/ElementOp.cu +0 -0
  51. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/backproj.cu +0 -0
  52. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/backproj_polar.cu +0 -0
  53. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/boundary.h +0 -0
  54. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/cone.cu +0 -0
  55. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/convolution.cu +0 -0
  56. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/dfi_fftshift.cu +0 -0
  57. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/flatfield.cu +0 -0
  58. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/fourier_wavelets.cu +0 -0
  59. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/halftomo.cu +0 -0
  60. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/helical_padding.cu +0 -0
  61. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/hierarchical_backproj.cu +0 -0
  62. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/histogram.cu +0 -0
  63. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/interpolation.cu +0 -0
  64. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/medfilt.cu +0 -0
  65. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/normalization.cu +0 -0
  66. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/padding.cu +0 -0
  67. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/proj.cu +0 -0
  68. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/rotation.cu +0 -0
  69. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/src/transpose.cu +0 -0
  70. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/tests/__init__.py +0 -0
  71. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/cuda/utils.py +0 -0
  72. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/estimation/__init__.py +0 -0
  73. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/estimation/alignment.py +0 -0
  74. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/estimation/cor.py +0 -0
  75. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/estimation/cor_sino.py +0 -0
  76. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/estimation/distortion.py +0 -0
  77. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/estimation/focus.py +0 -0
  78. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/estimation/tests/__init__.py +0 -0
  79. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/estimation/tests/test_alignment.py +0 -0
  80. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/estimation/tests/test_cor.py +0 -0
  81. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/estimation/tests/test_focus.py +0 -0
  82. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/estimation/tests/test_tilt.py +0 -0
  83. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/estimation/tests/test_translation.py +0 -0
  84. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/estimation/tilt.py +0 -0
  85. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/estimation/translation.py +0 -0
  86. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/estimation/utils.py +0 -0
  87. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/io/__init__.py +0 -0
  88. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/io/cast_volume.py +0 -0
  89. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/io/detector_distortion.py +0 -0
  90. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/io/reader.py +0 -0
  91. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/io/reader_helical.py +0 -0
  92. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/io/tests/__init__.py +0 -0
  93. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/io/tests/test_cast_volume.py +0 -0
  94. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/io/tests/test_detector_distortion.py +0 -0
  95. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/io/tests/test_readers.py +0 -0
  96. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/io/tests/test_writers.py +0 -0
  97. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/io/utils.py +0 -0
  98. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/io/writer.py +0 -0
  99. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/__init__.py +0 -0
  100. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/binning.py +0 -0
  101. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/fftshift.py +0 -0
  102. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/filters.py +0 -0
  103. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/fourier_filters.py +0 -0
  104. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/histogram.py +0 -0
  105. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/histogram_cuda.py +0 -0
  106. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/kernel_base.py +0 -0
  107. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/padding.py +0 -0
  108. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/padding_base.py +0 -0
  109. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/processing_base.py +0 -0
  110. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/rotation.py +0 -0
  111. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/rotation_cuda.py +0 -0
  112. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/tests/__init__.py +0 -0
  113. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/tests/test_binning.py +0 -0
  114. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/tests/test_interpolation.py +0 -0
  115. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/transpose.py +0 -0
  116. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/unsharp.py +0 -0
  117. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/unsharp_cuda.py +0 -0
  118. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/unsharp_opencl.py +0 -0
  119. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/misc/utils.py +0 -0
  120. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/opencl/__init__.py +0 -0
  121. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/opencl/fft.py +0 -0
  122. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/opencl/kernel.py +0 -0
  123. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/opencl/memcpy.py +0 -0
  124. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/opencl/padding.py +0 -0
  125. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/opencl/processing.py +0 -0
  126. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/opencl/src/ElementOp.cl +0 -0
  127. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/opencl/src/backproj.cl +0 -0
  128. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/opencl/src/fftshift.cl +0 -0
  129. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/opencl/src/halftomo.cl +0 -0
  130. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/opencl/src/padding.cl +0 -0
  131. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/opencl/src/roll.cl +0 -0
  132. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/opencl/src/transpose.cl +0 -0
  133. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/opencl/tests/__init__.py +0 -0
  134. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/opencl/utils.py +0 -0
  135. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/__init__.py +0 -0
  136. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/config.py +0 -0
  137. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/config_validators.py +0 -0
  138. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/datadump.py +0 -0
  139. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/dataset_validator.py +0 -0
  140. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/detector_distortion_provider.py +0 -0
  141. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/fullfield/__init__.py +0 -0
  142. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/fullfield/chunked_cuda.py +0 -0
  143. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/fullfield/computations.py +0 -0
  144. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/fullfield/dataset_validator.py +0 -0
  145. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/fullfield/nabu_config.py +0 -0
  146. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/fullfield/processconfig.py +0 -0
  147. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/fullfield/reconstruction.py +0 -0
  148. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/helical/__init__.py +0 -0
  149. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/helical/dataset_validator.py +0 -0
  150. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/helical/fbp.py +0 -0
  151. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/helical/filtering.py +0 -0
  152. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/helical/gridded_accumulator.py +0 -0
  153. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/helical/helical_chunked_regridded.py +0 -0
  154. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/helical/helical_chunked_regridded_cuda.py +0 -0
  155. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/helical/helical_reconstruction.py +0 -0
  156. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/helical/helical_utils.py +0 -0
  157. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/helical/nabu_config.py +0 -0
  158. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/helical/processconfig.py +0 -0
  159. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/helical/span_strategy.py +0 -0
  160. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/helical/tests/__init__.py +0 -0
  161. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/helical/weight_balancer.py +0 -0
  162. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/params.py +0 -0
  163. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/processconfig.py +0 -0
  164. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/reader.py +0 -0
  165. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/tests/test_estimators.py +0 -0
  166. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/utils.py +0 -0
  167. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/writer.py +0 -0
  168. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/pipeline/xrdct/__init__.py +0 -0
  169. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/__init__.py +0 -0
  170. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/alignment.py +0 -0
  171. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/ccd.py +0 -0
  172. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/ccd_cuda.py +0 -0
  173. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/ctf.py +0 -0
  174. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/ctf_cuda.py +0 -0
  175. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/distortion.py +0 -0
  176. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/double_flatfield.py +0 -0
  177. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/double_flatfield_cuda.py +0 -0
  178. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/double_flatfield_variable_region.py +0 -0
  179. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/flatfield.py +0 -0
  180. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/flatfield_cuda.py +0 -0
  181. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/flatfield_variable_region.py +0 -0
  182. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/phase.py +0 -0
  183. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/phase_cuda.py +0 -0
  184. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/shift.py +0 -0
  185. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/shift_cuda.py +0 -0
  186. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/tests/__init__.py +0 -0
  187. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/tests/test_ccd_corr.py +0 -0
  188. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/tests/test_ctf.py +0 -0
  189. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/tests/test_double_flatfield.py +0 -0
  190. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/tests/test_flatfield.py +0 -0
  191. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/tests/test_paganin.py +0 -0
  192. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/preproc/tests/test_vshift.py +0 -0
  193. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/__init__.py +0 -0
  194. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/azim.py +0 -0
  195. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/convolution_cuda.py +0 -0
  196. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/fft_base.py +0 -0
  197. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/fft_cuda.py +0 -0
  198. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/fft_opencl.py +0 -0
  199. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/fftshift.py +0 -0
  200. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/histogram.py +0 -0
  201. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/histogram_cuda.py +0 -0
  202. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/kernel_base.py +0 -0
  203. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/medfilt_cuda.py +0 -0
  204. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/muladd.py +0 -0
  205. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/muladd_cuda.py +0 -0
  206. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/padding_base.py +0 -0
  207. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/padding_cuda.py +0 -0
  208. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/padding_opencl.py +0 -0
  209. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/processing_base.py +0 -0
  210. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/roll_opencl.py +0 -0
  211. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/rotation.py +0 -0
  212. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/rotation_cuda.py +0 -0
  213. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/tests/__init__.py +0 -0
  214. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/tests/test_fft.py +0 -0
  215. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/tests/test_fftshift.py +0 -0
  216. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/tests/test_histogram.py +0 -0
  217. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/tests/test_medfilt.py +0 -0
  218. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/tests/test_muladd.py +0 -0
  219. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/tests/test_padding.py +0 -0
  220. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/tests/test_roll.py +0 -0
  221. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/tests/test_rotation.py +0 -0
  222. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/tests/test_transpose.py +0 -0
  223. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/tests/test_unsharp.py +0 -0
  224. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/transpose.py +0 -0
  225. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/unsharp.py +0 -0
  226. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/unsharp_cuda.py +0 -0
  227. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/processing/unsharp_opencl.py +0 -0
  228. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/__init__.py +0 -0
  229. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/cone.py +0 -0
  230. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/fbp.py +0 -0
  231. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/fbp_base.py +0 -0
  232. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/fbp_opencl.py +0 -0
  233. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/filtering.py +0 -0
  234. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/filtering_cuda.py +0 -0
  235. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/filtering_opencl.py +0 -0
  236. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/hbp.py +0 -0
  237. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/mlem.py +0 -0
  238. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/projection.py +0 -0
  239. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/reconstructor.py +0 -0
  240. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/reconstructor_cuda.py +0 -0
  241. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/rings.py +0 -0
  242. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/rings_cuda.py +0 -0
  243. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/sinogram.py +0 -0
  244. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/sinogram_cuda.py +0 -0
  245. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/sinogram_opencl.py +0 -0
  246. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/tests/__init__.py +0 -0
  247. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/tests/test_cone.py +0 -0
  248. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/tests/test_deringer.py +0 -0
  249. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/tests/test_fbp.py +0 -0
  250. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/tests/test_filtering.py +0 -0
  251. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/tests/test_halftomo.py +0 -0
  252. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/tests/test_mlem.py +0 -0
  253. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/tests/test_projector.py +0 -0
  254. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/tests/test_reconstructor.py +0 -0
  255. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/reconstruction/tests/test_sino_normalization.py +0 -0
  256. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/resources/__init__.py +0 -0
  257. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/resources/cli/__init__.py +0 -0
  258. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/resources/cor.py +0 -0
  259. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/resources/dataset_analyzer.py +0 -0
  260. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/resources/gpu.py +0 -0
  261. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/resources/logger.py +0 -0
  262. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/resources/nxflatfield.py +0 -0
  263. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/resources/templates/__init__.py +0 -0
  264. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/resources/templates/bm05_pag.conf +0 -0
  265. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/resources/templates/id16_ctf.conf +0 -0
  266. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/resources/templates/id16_holo.conf +0 -0
  267. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/resources/templates/id16a_fluo.conf +0 -0
  268. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/resources/templates/id19_pag.conf +0 -0
  269. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/resources/tests/__init__.py +0 -0
  270. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/resources/tests/test_nxflatfield.py +0 -0
  271. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/resources/tests/test_units.py +0 -0
  272. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/resources/utils.py +0 -0
  273. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/__init__.py +0 -0
  274. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/alignment.py +0 -0
  275. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/config.py +0 -0
  276. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/definitions.py +0 -0
  277. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/frame_composition.py +0 -0
  278. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/overlap.py +0 -0
  279. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/sample_normalization.py +0 -0
  280. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/single_axis_stitching.py +0 -0
  281. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/slurm_utils.py +0 -0
  282. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/stitcher/__init__.py +0 -0
  283. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/stitcher/base.py +0 -0
  284. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/stitcher/dumper/__init__.py +0 -0
  285. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/stitcher/dumper/base.py +0 -0
  286. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/stitcher/dumper/postprocessing.py +0 -0
  287. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/stitcher/dumper/preprocessing.py +0 -0
  288. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/stitcher/post_processing.py +0 -0
  289. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/stitcher/pre_processing.py +0 -0
  290. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/stitcher/single_axis.py +0 -0
  291. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/stitcher/stitcher.py +0 -0
  292. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/stitcher/y_stitcher.py +0 -0
  293. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/stitcher/z_stitcher.py +0 -0
  294. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/stitcher_2D.py +0 -0
  295. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/tests/__init__.py +0 -0
  296. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/tests/test_alignment.py +0 -0
  297. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/tests/test_config.py +0 -0
  298. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/tests/test_frame_composition.py +0 -0
  299. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/tests/test_overlap.py +0 -0
  300. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/tests/test_sample_normalization.py +0 -0
  301. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/tests/test_slurm_utils.py +0 -0
  302. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/tests/test_utils.py +0 -0
  303. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/tests/test_y_preprocessing_stitching.py +0 -0
  304. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/tests/test_z_postprocessing_stitching.py +0 -0
  305. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/tests/test_z_preprocessing_stitching.py +0 -0
  306. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/utils/__init__.py +0 -0
  307. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/utils/post_processing.py +0 -0
  308. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/utils/tests/test_post-processing.py +0 -0
  309. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/utils/utils.py +0 -0
  310. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/y_stitching.py +0 -0
  311. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/stitching/z_stitching.py +0 -0
  312. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/tests.py +0 -0
  313. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/testutils.py +0 -0
  314. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/thirdparty/__init__.py +0 -0
  315. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/thirdparty/algotom_convert_sino.py +0 -0
  316. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/thirdparty/pore3d_deringer_munch.py +0 -0
  317. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/thirdparty/tomocupy_remove_stripe.py +0 -0
  318. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/thirdparty/tomopy_phase.py +0 -0
  319. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/thirdparty/tomwer_load_flats_darks.py +0 -0
  320. {nabu-2024.2.2 → nabu-2024.2.4}/nabu/utils.py +0 -0
  321. {nabu-2024.2.2 → nabu-2024.2.4}/nabu.egg-info/dependency_links.txt +0 -0
  322. {nabu-2024.2.2 → nabu-2024.2.4}/nabu.egg-info/entry_points.txt +0 -0
  323. {nabu-2024.2.2 → nabu-2024.2.4}/nabu.egg-info/requires.txt +0 -0
  324. {nabu-2024.2.2 → nabu-2024.2.4}/pyproject.toml +0 -0
  325. {nabu-2024.2.2 → nabu-2024.2.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nabu
3
- Version: 2024.2.2
3
+ Version: 2024.2.4
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>
@@ -48,36 +48,10 @@ Classifier: Topic :: Scientific/Engineering :: Physics
48
48
  Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
49
49
  Requires-Python: >=3.7
50
50
  Description-Content-Type: text/markdown
51
- License-File: LICENSE
52
- Requires-Dist: numpy<2,>1.9.0
53
- Requires-Dist: scipy
54
- Requires-Dist: h5py>=3.0
55
- Requires-Dist: silx>=0.15.0
56
- Requires-Dist: tomoscan>=2.1.0
57
- Requires-Dist: psutil
58
- Requires-Dist: pytest
59
- Requires-Dist: tifffile
60
- Requires-Dist: tqdm
61
51
  Provides-Extra: full
62
- Requires-Dist: scikit-image; extra == "full"
63
- Requires-Dist: PyWavelets; extra == "full"
64
- Requires-Dist: glymur; extra == "full"
65
- Requires-Dist: pycuda!=2024.1.1; extra == "full"
66
- Requires-Dist: scikit-cuda; extra == "full"
67
- Requires-Dist: pycudwt; extra == "full"
68
- Requires-Dist: sluurp>=0.3; extra == "full"
69
- Requires-Dist: pyvkfft; extra == "full"
70
- Provides-Extra: full-nocuda
71
- Requires-Dist: scikit-image; extra == "full-nocuda"
72
- Requires-Dist: PyWavelets; extra == "full-nocuda"
73
- Requires-Dist: glymur; extra == "full-nocuda"
74
- Requires-Dist: sluurp>=0.3; extra == "full-nocuda"
75
- Requires-Dist: pyvkfft; extra == "full-nocuda"
52
+ Provides-Extra: full_nocuda
76
53
  Provides-Extra: doc
77
- Requires-Dist: sphinx; extra == "doc"
78
- Requires-Dist: cloud_sptheme; extra == "doc"
79
- Requires-Dist: myst-parser; extra == "doc"
80
- Requires-Dist: nbsphinx; extra == "doc"
54
+ License-File: LICENSE
81
55
 
82
56
  # Nabu
83
57
 
@@ -1,4 +1,4 @@
1
- __version__ = "2024.2.2"
1
+ __version__ = "2024.2.4"
2
2
  __nabu_modules__ = [
3
3
  "app",
4
4
  "cuda",
@@ -95,9 +95,8 @@ def estimate_cor(method, dataset_info, do_flatfield=True, cor_options=None, logg
95
95
  dataset_info,
96
96
  cor_options=cor_options,
97
97
  do_flatfield=do_flatfield,
98
- take_log=cor_options.get("take_log", True),
99
98
  logger=logger,
100
- **composite_options,
99
+ **composite_options, # contains take_log
101
100
  )
102
101
  estimated_cor = cor_finder.find_cor()
103
102
  return estimated_cor
@@ -339,10 +339,16 @@ class ChunkedPipeline:
339
339
  subs_angles = None
340
340
  subs_z = None
341
341
  subs_x = None
342
+ angular_sub_region = slice(*(self.sub_region[0]))
342
343
  if self.process_config.subsampling_factor:
343
344
  subs_angles = self.process_config.subsampling_factor
345
+ angular_sub_region = slice(
346
+ getattr(self.process_config, "subsampling_start", 0) + self.sub_region[0][0],
347
+ self.sub_region[0][1],
348
+ subs_angles,
349
+ )
344
350
  reader_sub_region = (
345
- slice(*(self.sub_region[0]) + ((subs_angles,) if subs_angles else ())),
351
+ angular_sub_region,
346
352
  slice(*(self.sub_region[1]) + ((subs_z,) if subs_z else ())),
347
353
  slice(*(self.sub_region[2]) + ((subs_x,) if subs_x else ())),
348
354
  )
@@ -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()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nabu
3
- Version: 2024.2.2
3
+ Version: 2024.2.4
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>
@@ -48,36 +48,10 @@ Classifier: Topic :: Scientific/Engineering :: Physics
48
48
  Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
49
49
  Requires-Python: >=3.7
50
50
  Description-Content-Type: text/markdown
51
- License-File: LICENSE
52
- Requires-Dist: numpy<2,>1.9.0
53
- Requires-Dist: scipy
54
- Requires-Dist: h5py>=3.0
55
- Requires-Dist: silx>=0.15.0
56
- Requires-Dist: tomoscan>=2.1.0
57
- Requires-Dist: psutil
58
- Requires-Dist: pytest
59
- Requires-Dist: tifffile
60
- Requires-Dist: tqdm
61
51
  Provides-Extra: full
62
- Requires-Dist: scikit-image; extra == "full"
63
- Requires-Dist: PyWavelets; extra == "full"
64
- Requires-Dist: glymur; extra == "full"
65
- Requires-Dist: pycuda!=2024.1.1; extra == "full"
66
- Requires-Dist: scikit-cuda; extra == "full"
67
- Requires-Dist: pycudwt; extra == "full"
68
- Requires-Dist: sluurp>=0.3; extra == "full"
69
- Requires-Dist: pyvkfft; extra == "full"
70
- Provides-Extra: full-nocuda
71
- Requires-Dist: scikit-image; extra == "full-nocuda"
72
- Requires-Dist: PyWavelets; extra == "full-nocuda"
73
- Requires-Dist: glymur; extra == "full-nocuda"
74
- Requires-Dist: sluurp>=0.3; extra == "full-nocuda"
75
- Requires-Dist: pyvkfft; extra == "full-nocuda"
52
+ Provides-Extra: full_nocuda
76
53
  Provides-Extra: doc
77
- Requires-Dist: sphinx; extra == "doc"
78
- Requires-Dist: cloud_sptheme; extra == "doc"
79
- Requires-Dist: myst-parser; extra == "doc"
80
- Requires-Dist: nbsphinx; extra == "doc"
54
+ License-File: LICENSE
81
55
 
82
56
  # Nabu
83
57
 
@@ -3,7 +3,6 @@ README.md
3
3
  pyproject.toml
4
4
  doc/conf.py
5
5
  doc/create_conf_doc.py
6
- doc/doc_config.py
7
6
  doc/get_mathjax.py
8
7
  nabu/__init__.py
9
8
  nabu/tests.py
@@ -230,7 +229,6 @@ nabu/processing/tests/test_rotation.py
230
229
  nabu/processing/tests/test_transpose.py
231
230
  nabu/processing/tests/test_unsharp.py
232
231
  nabu/reconstruction/__init__.py
233
- nabu/reconstruction/astra.py
234
232
  nabu/reconstruction/cone.py
235
233
  nabu/reconstruction/fbp.py
236
234
  nabu/reconstruction/fbp_base.py
@@ -273,6 +271,7 @@ nabu/resources/templates/id16_holo.conf
273
271
  nabu/resources/templates/id16a_fluo.conf
274
272
  nabu/resources/templates/id19_pag.conf
275
273
  nabu/resources/tests/__init__.py
274
+ nabu/resources/tests/test_extract.py
276
275
  nabu/resources/tests/test_nxflatfield.py
277
276
  nabu/resources/tests/test_units.py
278
277
  nabu/stitching/__init__.py
@@ -1,3 +1,4 @@
1
1
  dist
2
2
  doc
3
3
  nabu
4
+ scripts
@@ -1,32 +0,0 @@
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)
@@ -1,244 +0,0 @@
1
- try:
2
- import astra
3
-
4
- __have_astra__ = True
5
- except ImportError:
6
- __have_astra__ = False
7
- astra = None
8
-
9
-
10
- class AstraReconstructor:
11
- """
12
- Base class for reconstructors based on the Astra toolbox
13
- """
14
-
15
- default_extra_options = {
16
- "axis_correction": None,
17
- "clip_outer_circle": False,
18
- "scale_factor": None,
19
- "filter_cutoff": 1.0,
20
- "outer_circle_value": 0.0,
21
- }
22
-
23
- def __init__(
24
- self,
25
- sinos_shape,
26
- angles=None,
27
- volume_shape=None,
28
- rot_center=None,
29
- pixel_size=None,
30
- padding_mode="zeros",
31
- filter_name=None,
32
- slice_roi=None,
33
- cuda_options=None,
34
- extra_options=None,
35
- ):
36
- self._configure_extra_options(extra_options)
37
- self._init_cuda(cuda_options)
38
- self._set_sino_shape(sinos_shape)
39
- self._orig_prog_geom = None
40
- self._init_geometry(
41
- source_origin_dist,
42
- origin_detector_dist,
43
- pixel_size,
44
- angles,
45
- volume_shape,
46
- rot_center,
47
- relative_z_position,
48
- slice_roi,
49
- )
50
- self._init_fdk(padding_mode, filter_name)
51
- self._alg_id = None
52
- self._vol_id = None
53
- self._proj_id = None
54
-
55
- def _configure_extra_options(self, extra_options):
56
- self.extra_options = self.default_extra_options.copy()
57
- self.extra_options.update(extra_options or {})
58
-
59
- def _init_cuda(self, cuda_options):
60
- cuda_options = cuda_options or {}
61
- self.cuda = CudaProcessing(**cuda_options)
62
-
63
- def _set_sino_shape(self, sinos_shape):
64
- if len(sinos_shape) != 3:
65
- raise ValueError("Expected a 3D shape")
66
- self.sinos_shape = sinos_shape
67
- self.n_sinos, self.n_angles, self.prj_width = sinos_shape
68
-
69
- def _set_pixel_size(self, pixel_size):
70
- if pixel_size is None:
71
- det_spacing_y = det_spacing_x = 1
72
- elif np.iterable(pixel_size):
73
- det_spacing_y, det_spacing_x = pixel_size
74
- else:
75
- # assuming scalar
76
- det_spacing_y = det_spacing_x = pixel_size
77
- self._det_spacing_y = det_spacing_y
78
- self._det_spacing_x = det_spacing_x
79
-
80
- def _set_slice_roi(self, slice_roi):
81
- self.slice_roi = slice_roi
82
- self._vol_geom_n_x = self.n_x
83
- self._vol_geom_n_y = self.n_y
84
- self._crop_data = True
85
- if slice_roi is None:
86
- return
87
- start_x, end_x, start_y, end_y = slice_roi
88
- if roi_is_centered(self.volume_shape[1:], (slice(start_y, end_y), slice(start_x, end_x))):
89
- # Astra can only reconstruct subregion centered around the origin
90
- self._vol_geom_n_x = self.n_x - start_x * 2
91
- self._vol_geom_n_y = self.n_y - start_y * 2
92
- else:
93
- raise NotImplementedError(
94
- "Astra supports only slice_roi centered around origin (got slice_roi=%s with n_x=%d, n_y=%d)"
95
- % (str(slice_roi), self.n_x, self.n_y)
96
- )
97
-
98
- def _init_geometry(
99
- self,
100
- source_origin_dist,
101
- origin_detector_dist,
102
- pixel_size,
103
- angles,
104
- volume_shape,
105
- rot_center,
106
- relative_z_position,
107
- slice_roi,
108
- ):
109
- if angles is None:
110
- self.angles = np.linspace(0, 2 * np.pi, self.n_angles, endpoint=True)
111
- else:
112
- self.angles = angles
113
- if volume_shape is None:
114
- volume_shape = (self.sinos_shape[0], self.sinos_shape[2], self.sinos_shape[2])
115
- self.volume_shape = volume_shape
116
- self.n_z, self.n_y, self.n_x = self.volume_shape
117
- self.source_origin_dist = source_origin_dist
118
- self.origin_detector_dist = origin_detector_dist
119
- self.magnification = 1 + origin_detector_dist / source_origin_dist
120
- self._set_slice_roi(slice_roi)
121
- self.vol_geom = astra.create_vol_geom(self._vol_geom_n_y, self._vol_geom_n_x, self.n_z)
122
- self.vol_shape = astra.geom_size(self.vol_geom)
123
- self._cor_shift = 0.0
124
- self.rot_center = rot_center
125
- if rot_center is not None:
126
- self._cor_shift = (self.sinos_shape[-1] - 1) / 2.0 - rot_center
127
- self._set_pixel_size(pixel_size)
128
- self._axis_corrections = self.extra_options.get("axis_correction", None)
129
- self._create_astra_proj_geometry(relative_z_position)
130
-
131
- def _create_astra_proj_geometry(self, relative_z_position):
132
- # This object has to be re-created each time, because once the modifications below are done,
133
- # it is no more a "cone" geometry but a "cone_vec" geometry, and cannot be updated subsequently
134
- # (see astra/functions.py:271)
135
- self.proj_geom = astra.create_proj_geom(
136
- "cone",
137
- self._det_spacing_x,
138
- self._det_spacing_y,
139
- self.n_sinos,
140
- self.prj_width,
141
- self.angles,
142
- self.source_origin_dist,
143
- self.origin_detector_dist,
144
- )
145
- self.relative_z_position = relative_z_position or 0.0
146
- # This will turn the geometry of type "cone" into a geometry of type "cone_vec"
147
- if self._orig_prog_geom is None:
148
- self._orig_prog_geom = self.proj_geom
149
- self.proj_geom = astra.geom_postalignment(self.proj_geom, (self._cor_shift, 0))
150
- # (src, detector_center, u, v) = (srcX, srcY, srcZ, dX, dY, dZ, uX, uY, uZ, vX, vY, vZ)
151
- vecs = self.proj_geom["Vectors"]
152
-
153
- # To adapt the center of rotation:
154
- # dX = cor_shift * cos(theta) - origin_detector_dist * sin(theta)
155
- # dY = origin_detector_dist * cos(theta) + cor_shift * sin(theta)
156
- if self._axis_corrections is not None:
157
- # should we check that dX and dY match the above formulas ?
158
- cor_shifts = self._cor_shift + self._axis_corrections
159
- vecs[:, 3] = cor_shifts * np.cos(self.angles) - self.origin_detector_dist * np.sin(self.angles)
160
- vecs[:, 4] = self.origin_detector_dist * np.cos(self.angles) + cor_shifts * np.sin(self.angles)
161
-
162
- # To adapt the z position:
163
- # Component 2 of vecs is the z coordinate of the source, component 5 is the z component of the detector position
164
- # We need to re-create the same inclination of the cone beam, thus we need to keep the inclination of the two z positions.
165
- # The detector is centered on the rotation axis, thus moving it up or down, just moves it out of the reconstruction volume.
166
- # We can bring back the detector in the correct volume position, by applying a rigid translation of both the detector and the source.
167
- # The translation is exactly the amount that brought the detector up or down, but in the opposite direction.
168
- vecs[:, 2] = -self.relative_z_position
169
-
170
- def _set_output(self, volume):
171
- if volume is not None:
172
- expected_shape = self.vol_shape # if not (self._crop_data) else self._output_cropped_shape
173
- self.cuda.check_array(volume, expected_shape)
174
- self.cuda.set_array("output", volume)
175
- if volume is None:
176
- self.cuda.allocate_array("output", self.vol_shape)
177
- d_volume = self.cuda.get_array("output")
178
- z, y, x = d_volume.shape
179
- self._vol_link = astra.data3d.GPULink(d_volume.ptr, x, y, z, d_volume.strides[-2])
180
- self._vol_id = astra.data3d.link("-vol", self.vol_geom, self._vol_link)
181
-
182
- def _set_input(self, sinos):
183
- self.cuda.check_array(sinos, self.sinos_shape)
184
- self.cuda.set_array("sinos", sinos) # self.cuda.sinos is now a GPU array
185
- # TODO don't create new link/proj_id if ptr is the same ?
186
- # But it seems Astra modifies the input sinogram while doing FDK, so this might be not relevant
187
- d_sinos = self.cuda.get_array("sinos")
188
-
189
- # self._proj_data_link = astra.data3d.GPULink(d_sinos.ptr, self.prj_width, self.n_angles, self.n_z, sinos.strides[-2])
190
- self._proj_data_link = astra.data3d.GPULink(
191
- d_sinos.ptr, self.prj_width, self.n_angles, self.n_sinos, d_sinos.strides[-2]
192
- )
193
- self._proj_id = astra.data3d.link("-sino", self.proj_geom, self._proj_data_link)
194
-
195
- def _preprocess_data(self):
196
- d_sinos = self.cuda.sinos
197
- for i in range(d_sinos.shape[0]):
198
- self.sino_filter.filter_sino(d_sinos[i], output=d_sinos[i])
199
-
200
- def _update_reconstruction(self):
201
- cfg = astra.astra_dict("BP3D_CUDA")
202
- cfg["ReconstructionDataId"] = self._vol_id
203
- cfg["ProjectionDataId"] = self._proj_id
204
- if self._alg_id is not None:
205
- astra.algorithm.delete(self._alg_id)
206
- self._alg_id = astra.algorithm.create(cfg)
207
-
208
- def reconstruct(self, sinos, output=None, relative_z_position=None):
209
- """
210
- sinos: numpy.ndarray or pycuda.gpuarray
211
- Sinograms, with shape (n_sinograms, n_angles, width)
212
- output: pycuda.gpuarray, optional
213
- Output array. If not provided, a new numpy array is returned
214
- relative_z_position: int, optional
215
- Position of the central slice of the slab, with respect to the full stack of slices.
216
- By default it is set to zero, meaning that the current slab is assumed in the middle of the stack
217
- """
218
- self._create_astra_proj_geometry(relative_z_position)
219
- self._set_input(sinos)
220
- self._set_output(output)
221
- self._preprocess_data()
222
- self._update_reconstruction()
223
- astra.algorithm.run(self._alg_id)
224
- #
225
- # NB: Could also be done with
226
- # from astra.experimental import direct_BP3D
227
- # projector_id = astra.create_projector("cuda3d", self.proj_geom, self.vol_geom, options=None)
228
- # direct_BP3D(projector_id, self._vol_link, self._proj_data_link)
229
- #
230
- result = self.cuda.get_array("output")
231
- if output is None:
232
- result = result.get()
233
- if self.extra_options.get("scale_factor", None) is not None:
234
- result *= np.float32(self.extra_options["scale_factor"]) # in-place for pycuda
235
- self.cuda.recover_arrays_references(["sinos", "output"])
236
- return result
237
-
238
- def __del__(self):
239
- if getattr(self, "_alg_id", None) is not None:
240
- astra.algorithm.delete(self._alg_id)
241
- if getattr(self, "_vol_id", None) is not None:
242
- astra.data3d.delete(self._vol_id)
243
- if getattr(self, "_proj_id", None) is not None:
244
- astra.data3d.delete(self._proj_id)
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
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