nxtomomill 2.1.1__tar.gz → 2.2.0.dev0__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 (179) hide show
  1. {nxtomomill-2.1.1/nxtomomill.egg-info → nxtomomill-2.2.0.dev0}/PKG-INFO +3 -2
  2. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/doc/conf.py +1 -1
  3. nxtomomill-2.2.0.dev0/nxtomomill/__init__.py +31 -0
  4. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/__main__.py +2 -2
  5. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/blissfluo2nx.py +5 -4
  6. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/edf2nx.py +5 -4
  7. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/fluo2nx.py +5 -4
  8. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/h52nx.py +7 -6
  9. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/patch_nx.py +1 -1
  10. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/split_nxfile.py +1 -1
  11. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_edf2nx_app.py +1 -1
  12. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_patch_nx_app.py +1 -1
  13. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_split_nxfile_app.py +2 -2
  14. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/z_concatenate_scans.py +4 -4
  15. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/dxfile/dxfileconverter.py +1 -1
  16. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/dxfile/tests/test_dxfile.py +1 -1
  17. nxtomomill-2.2.0.dev0/nxtomomill/converter/edf/_Blosc2Jp2kWrapper.py +63 -0
  18. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/edf/checks.py +1 -1
  19. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/edf/edfconverter.py +4 -4
  20. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/edf/tests/test_checks.py +2 -2
  21. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/edf/tests/test_edf2nx.py +18 -16
  22. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/edf/tests/test_edf2nx_check.py +2 -2
  23. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/fluo/fluoscan.py +3 -3
  24. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/fscan/fscanconverter.py +2 -2
  25. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/tests/test_acquisition.py +3 -2
  26. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/tests/test_acquisition_utils.py +1 -1
  27. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/tests/test_back_and_forth.py +2 -1
  28. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/tests/test_bliss_tomo_config.py +3 -2
  29. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/tests/test_holotomo.py +2 -1
  30. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/tests/test_legacy.py +4 -2
  31. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/tests/test_multitomo_zseries.py +2 -1
  32. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/tests/test_multitomoacquisition.py +4 -4
  33. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/utils/_context.py +40 -22
  34. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/hdf5converter.py +2 -2
  35. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/post_processing/dark_flat_copy.py +1 -1
  36. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/tests/test_frame_flip.py +4 -0
  37. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/tests/test_h52nx_utils.py +23 -10
  38. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/tests/test_hdf5converter.py +17 -22
  39. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/FrameGroup.py +1 -1
  40. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/utils.py +1 -1
  41. nxtomomill-2.2.0.dev0/nxtomomill/tests/test_version.py +7 -0
  42. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/tests/utils/bliss.py +1 -1
  43. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/tests/utils/dxfile.py +1 -1
  44. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/_os.py +1 -1
  45. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/flat_reducer.py +2 -2
  46. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/nexus.py +1 -1
  47. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/tests/test_flat_reducer.py +2 -2
  48. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/tests/test_utils.py +22 -24
  49. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/utils.py +1 -2
  50. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0/nxtomomill.egg-info}/PKG-INFO +3 -2
  51. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill.egg-info/SOURCES.txt +1 -1
  52. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill.egg-info/requires.txt +2 -1
  53. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill.egg-info/top_level.txt +1 -0
  54. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/pyproject.toml +3 -5
  55. nxtomomill-2.1.1/nxtomomill/__init__.py +0 -5
  56. nxtomomill-2.1.1/nxtomomill/tests/test_version.py +0 -7
  57. nxtomomill-2.1.1/nxtomomill/version.py +0 -109
  58. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/LICENSE +0 -0
  59. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/README.md +0 -0
  60. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/__init__.py +0 -0
  61. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/blissfluoconfig.py +0 -0
  62. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/dxfile2nx.py +0 -0
  63. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/edf2nx_check.py +0 -0
  64. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/edfconfig.py +0 -0
  65. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/fluoconfig.py +0 -0
  66. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/fscan2nx.py +0 -0
  67. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/h5config.py +0 -0
  68. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/nxcopy.py +0 -0
  69. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_bliss_fluo2nx_app.py +0 -0
  70. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_dxfile2nx_app.py +0 -0
  71. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_edf_config_app.py +0 -0
  72. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_fluo2nx_app.py +0 -0
  73. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_h52nx_app.py +0 -0
  74. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_h5_config_app.py +0 -0
  75. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_nx_copy.py +0 -0
  76. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/zstages2nxs.py +0 -0
  77. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/__init__.py +0 -0
  78. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/baseconverter.py +0 -0
  79. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/dxfile/__init__.py +0 -0
  80. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/edf/__init__.py +0 -0
  81. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/fluo/__init__.py +0 -0
  82. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/fluo/blissfluoscan.py +0 -0
  83. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/fluo/fluoconverter.py +0 -0
  84. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/fluo/tests/__init__.py +0 -0
  85. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/fluo/tests/test_fluoscan2D.py +0 -0
  86. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/fluo/tests/test_fluoscan3D.py +0 -0
  87. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/fscan/__init__.py +0 -0
  88. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/__init__.py +0 -0
  89. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/__init__.py +0 -0
  90. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/_bliss_activeconfig.py +0 -0
  91. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/backandforth.py +0 -0
  92. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/baseacquisition.py +0 -0
  93. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/blisstomoconfig.py +0 -0
  94. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/multitomo.py +0 -0
  95. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/pcotomoacquisition.py +0 -0
  96. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/standardacquisition.py +0 -0
  97. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/tests/bliss_tomo_datasets.py +0 -0
  98. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/utils/__init__.py +0 -0
  99. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/utils/_keys.py +0 -0
  100. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/utils/_scan_type_finder.py +0 -0
  101. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/utils/bliss_scan_type.py +0 -0
  102. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/utils/detector.py +0 -0
  103. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/utils/machine_current.py +0 -0
  104. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/utils/series.py +0 -0
  105. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/utils/timestamps.py +0 -0
  106. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/zseriesacquisition.py +0 -0
  107. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisitionConstructor.py +0 -0
  108. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/post_processing/__init__.py +0 -0
  109. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/utils.py +0 -0
  110. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/version.py +0 -0
  111. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/__init__.py +0 -0
  112. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/config/__init__.py +0 -0
  113. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/config/configbase.py +0 -0
  114. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/config/confighandler.py +0 -0
  115. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/config/dxconfig.py +0 -0
  116. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/config/edfconfig.py +0 -0
  117. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/config/fluoconfig.py +0 -0
  118. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/config/hdf5config.py +0 -0
  119. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/config/tests/__init__.py +0 -0
  120. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/config/tests/test_confighandler.py +0 -0
  121. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/tests/test_frame_group.py +0 -0
  122. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/tests/utils.py +0 -0
  123. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/__init__.py +0 -0
  124. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/base/ConfigBase.py +0 -0
  125. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/base/FrmFlatToNestedBase.py +0 -0
  126. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/base/NestedModelBase.py +0 -0
  127. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/base/__init__.py +0 -0
  128. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/base/general_section.py +0 -0
  129. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/base/instrument_section.py +0 -0
  130. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/base/source_section.py +0 -0
  131. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/blissfluo2nx/__init__.py +0 -0
  132. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/blissfluo2nx/blissfluo2nx.py +0 -0
  133. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/blissfluo2nx/general_section.py +0 -0
  134. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/dx2nx.py +0 -0
  135. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/edf2nx/__init__.py +0 -0
  136. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/edf2nx/dark_and_flat_section.py +0 -0
  137. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/edf2nx/detector_section.py +0 -0
  138. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/edf2nx/edf2nx.py +0 -0
  139. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/edf2nx/general_section.py +0 -0
  140. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/edf2nx/keys_section.py +0 -0
  141. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/edf2nx/sample_section.py +0 -0
  142. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/edf2nx/unit_section.py +0 -0
  143. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/fluo2nx/__init__.py +0 -0
  144. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/fluo2nx/fluo2nx.py +0 -0
  145. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/fluo2nx/general_section.py +0 -0
  146. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/__init__.py +0 -0
  147. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/_acquisitionstep.py +0 -0
  148. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/_context.py +0 -0
  149. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/entries_and_title_section.py +0 -0
  150. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/extra_params_section.py +0 -0
  151. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/frame_type_section.py +0 -0
  152. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/general_section.py +0 -0
  153. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/h52nx.py +0 -0
  154. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/keys_section.py +0 -0
  155. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/multitomo_section.py +0 -0
  156. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/tests/test_context.py +0 -0
  157. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/tests/test_edf2nx_model.py +0 -0
  158. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/tests/test_fluo2nx_model.py +0 -0
  159. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/tests/test_h52nx_model.py +0 -0
  160. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/tests/test_io_utils.py +0 -0
  161. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/settings.py +0 -0
  162. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/test.py +0 -0
  163. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/tests/__init__.py +0 -0
  164. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/tests/datasets.py +0 -0
  165. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/tests/resources/__init__.py +0 -0
  166. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/tests/resources/edf2nx_config_files/__init__.py +0 -0
  167. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/tests/resources/fluo2nx_config_files/__init__.py +0 -0
  168. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/tests/resources/h52nx_config_files/__init__.py +0 -0
  169. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/tests/utils/__init__.py +0 -0
  170. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/__init__.py +0 -0
  171. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/h5pyutils.py +0 -0
  172. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/hdf5.py +0 -0
  173. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/io.py +0 -0
  174. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/pintutils.py +0 -0
  175. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/tests/test_h5pyutils.py +0 -0
  176. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/tests/test_nexus_utils.py +0 -0
  177. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill.egg-info/dependency_links.txt +0 -0
  178. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill.egg-info/entry_points.txt +0 -0
  179. {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nxtomomill
3
- Version: 2.1.1
3
+ Version: 2.2.0.dev0
4
4
  Summary: applications and library to convert raw format to NXtomo format
5
5
  Author-email: Henri Payno <henri.payno@esrf.fr>, Pierre Paleo <pierre.paleo@esrf.fr>, Pierre-Olivier Autran <pierre-olivier.autran@esrf.fr>, Jérôme Lesaint <jerome.lesaint@esrf.fr>, Alessandro Mirone <mirone@esrf.fr>
6
6
  License:
@@ -58,7 +58,8 @@ Requires-Dist: silx>=2.0
58
58
  Requires-Dist: nxtomo>=3.1.0dev1
59
59
  Requires-Dist: pint
60
60
  Requires-Dist: packaging
61
- Requires-Dist: tomoscan[full]>=2.2.0a4
61
+ Requires-Dist: tomoscan[full]>=3.0.0dev0
62
+ Requires-Dist: tomobase>=0.0.0dev0
62
63
  Requires-Dist: tqdm
63
64
  Requires-Dist: pydantic
64
65
  Requires-Dist: eval_type_backport; python_version < "3.10"
@@ -9,7 +9,7 @@
9
9
  from importlib.metadata import version as get_version
10
10
 
11
11
  project = "nxtomomill"
12
- copyright = "2020-2025, ESRF"
12
+ copyright = "2020-2026, ESRF"
13
13
  author = "P.-O. Autran, J. Lesaint, A. Mirone, C. Nemoz, P. Paleo, H. Payno, A. Sole, N. Vigano"
14
14
 
15
15
  release = get_version("nxtomomill")
@@ -0,0 +1,31 @@
1
+ """a set of applications and tools around the `NXtomo <https://manual.nexusformat.org/classes/applications/NXtomo.html>`_ format defined by the `NeXus community <https://manual.nexusformat.org/index.html>`_"""
2
+
3
+ import atexit
4
+
5
+ import logging
6
+
7
+ from importlib.metadata import version as _get_version, PackageNotFoundError
8
+
9
+ try:
10
+ __version__ = _get_version("nxtomomill")
11
+ except PackageNotFoundError:
12
+ __version__ = "unknown"
13
+
14
+ _logger = logging.getLogger(__name__)
15
+
16
+
17
+ @atexit.register
18
+ def _close_leftover_tqdm_instances():
19
+ import tqdm
20
+
21
+ # tqdm progress bars can end up only reachable through a reference cycle,
22
+ # so they are not closed by simple refcounting and survive until the
23
+ # interpreter's final garbage-collection pass. Closing a bar twice is a
24
+ # no-op, so closing them here proactively (while stdout/stderr are still
25
+ # usable) prevents their `__del__` from running during interpreter
26
+ # shutdown, where it can segfault (observed with Python 3.14).
27
+ for bar in list(tqdm.tqdm._instances):
28
+ try:
29
+ bar.close()
30
+ except Exception as e:
31
+ _logger.error("Error when closing the progress bar: %s", e)
@@ -12,7 +12,7 @@ from collections import namedtuple
12
12
 
13
13
  from silx.utils.launcher import Launcher as _Launcher
14
14
 
15
- import nxtomomill.version
15
+ import nxtomomill
16
16
  from nxtomomill.utils.io import deprecated_warning
17
17
 
18
18
  logging.basicConfig()
@@ -118,7 +118,7 @@ def main():
118
118
 
119
119
  :returns: The execution status
120
120
  """
121
- _version = nxtomomill.version.version
121
+ _version = nxtomomill.__version__
122
122
  launcher = Launcher(prog="nxtomomill", version=_version)
123
123
  launcher.add_command(
124
124
  "nx-copy",
@@ -90,7 +90,8 @@ def main(argv):
90
90
  config.general_section.dimension = options.dimension
91
91
  config.general_section.overwrite = options.overwrite
92
92
 
93
- converter.from_blissfluo_to_nx(
94
- configuration=config,
95
- progress=tqdm("blissfluo2nx"),
96
- )
93
+ with tqdm("blissfluo2nx") as progress:
94
+ converter.from_blissfluo_to_nx(
95
+ configuration=config,
96
+ progress=progress,
97
+ )
@@ -108,7 +108,8 @@ def main(argv):
108
108
  assert isinstance(
109
109
  config.output_checks, tuple
110
110
  ), f"config.output_checks is expected to be a tuple. Gets {type(config.output_checks)}"
111
- converter.from_edf_to_nx(
112
- configuration=config,
113
- progress=tqdm(desc="edf2nx", bar_format="{l_bar}{bar}{postfix}"),
114
- )
111
+ with tqdm(desc="edf2nx", bar_format="{l_bar}{bar}{postfix}") as progress:
112
+ converter.from_edf_to_nx(
113
+ configuration=config,
114
+ progress=progress,
115
+ )
@@ -125,7 +125,8 @@ def main(argv):
125
125
  f"The value entered for --mode is not valid. Should be either 'newfile' or 'overwrite'. {options.mode} was given."
126
126
  )
127
127
 
128
- converter.from_fluo_to_nx(
129
- configuration=config,
130
- progress=tqdm("fluo2nx"),
131
- )
128
+ with tqdm("fluo2nx") as progress:
129
+ converter.from_fluo_to_nx(
130
+ configuration=config,
131
+ progress=progress,
132
+ )
@@ -334,9 +334,10 @@ def main(argv):
334
334
  logging.getLogger("nxtomomill").setLevel(
335
335
  configuration_handler.configuration.log_level
336
336
  )
337
- from_h5_to_nx(
338
- configuration=configuration_handler.configuration,
339
- progress=tqdm(desc="h52nx", delay=1, bar_format="{l_bar}{bar}"),
340
- input_callback=None,
341
- detector_sel_callback=callback_det_sel,
342
- )
337
+ with tqdm(desc="h52nx", delay=1, bar_format="{l_bar}{bar}") as progress:
338
+ from_h5_to_nx(
339
+ configuration=configuration_handler.configuration,
340
+ progress=progress,
341
+ input_callback=None,
342
+ detector_sel_callback=callback_det_sel,
343
+ )
@@ -13,7 +13,7 @@ import os
13
13
 
14
14
  from silx.io.url import DataUrl
15
15
  from silx.utils.enum import Enum as _Enum
16
- from tomoscan.esrf.scan.nxtomoscan import NXtomoScan
16
+ from tomoscan.scans.nxtomoscan import NXtomoScan
17
17
 
18
18
  from nxtomomill import utils
19
19
  from nxtomo.nxobject.nxdetector import ImageKey
@@ -11,7 +11,7 @@ import logging
11
11
  import string
12
12
 
13
13
  from nxtomo.application.nxtomo import NXtomo
14
- from tomoscan.esrf.scan.nxtomoscan import NXtomoScan
14
+ from tomoscan.scans.nxtomoscan import NXtomoScan
15
15
  from silx.io.utils import open as open_hdf5
16
16
  from nxtomomill.utils._os import abspath
17
17
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  import os
4
4
 
5
- from tomoscan.esrf.mock import MockEDF
5
+ from tomoscan.tests.mock import MockEDF
6
6
 
7
7
  from nxtomomill.app.edf2nx import main
8
8
 
@@ -3,7 +3,7 @@
3
3
  import os
4
4
  import tempfile
5
5
 
6
- from tomoscan.esrf.mock import MockNXtomo
6
+ from tomoscan.tests.mock import MockNXtomo
7
7
 
8
8
  from nxtomomill.app.patch_nx import main
9
9
 
@@ -2,7 +2,8 @@ import os
2
2
  import numpy
3
3
  import pytest
4
4
  import pint
5
- from tomoscan.io import HDF5File, get_swmr_mode
5
+ from h5py import File as HDF5File
6
+
6
7
  from nxtomo.application.nxtomo import NXtomo
7
8
  from nxtomomill.app.split_nxfile import split
8
9
 
@@ -73,7 +74,6 @@ def test_split_nxfile(tmp_path, duplicate_data):
73
74
  with HDF5File(
74
75
  tmp_path / "test_split_nx_file/output_dir_2/entry0002.nx",
75
76
  mode="r",
76
- swmr=get_swmr_mode(),
77
77
  ) as h5f:
78
78
  assert "entry0002" in h5f.keys()
79
79
  assert "entry0000" not in h5f.keys()
@@ -9,10 +9,10 @@ import json
9
9
  import pint
10
10
 
11
11
  import numpy as np
12
+ from h5py import File as HDF5File
12
13
  from silx.io.url import DataUrl
13
- from tomoscan.esrf.scan.nxtomoscan import NXtomoScan
14
- from tomoscan.scanbase import ReducedFramesInfos
15
- from tomoscan.io import HDF5File, get_swmr_mode
14
+ from tomoscan.scans.nxtomoscan import NXtomoScan
15
+ from tomoscan.scans.scanbase import ReducedFramesInfos
16
16
 
17
17
  from nxtomo.application.nxtomo import NXtomo
18
18
  from nxtomo.nxobject.utils import concatenate as nx_concatenate
@@ -178,7 +178,7 @@ def get_arguments(argv):
178
178
  args.pixel_size_m = float(args.pixel_size_m)
179
179
  else:
180
180
  args.overwrite_pixel_size = False
181
- with HDF5File(args.file_list[0], "r", swmr=get_swmr_mode()) as h5f:
181
+ with HDF5File(args.file_list[0], "r") as h5f:
182
182
  args.pixel_size_m = h5f[
183
183
  os.path.join(args.entry_name, "instrument", "detector", "x_pixel_size")
184
184
  ][()]
@@ -14,7 +14,7 @@ import h5py
14
14
  import numpy
15
15
  from silx.io.url import DataUrl
16
16
  from silx.io.utils import get_data, h5py_read_dataset
17
- from tomoscan.io import HDF5File
17
+ from nxtomo.io import HDF5File
18
18
  from nxtomo.nxobject.nxdetector import FieldOfView, ImageKey
19
19
  from nxtomo.utils.frameappender import FrameAppender
20
20
 
@@ -9,7 +9,7 @@ from nxtomomill.converter.dxfile.dxfileconverter import from_dx_config_to_nx
9
9
  from nxtomomill.models.dx2nx import DX2nxModel
10
10
  from nxtomomill.tests.utils.dxfile import MockDxFile
11
11
 
12
- from tomoscan.esrf.scan.nxtomoscan import NXtomoScan
12
+ from tomoscan.scans.nxtomoscan import NXtomoScan
13
13
  from tomoscan.validator import is_valid_for_reconstruction
14
14
 
15
15
  from silx.io.utils import get_data, h5py_read_dataset
@@ -0,0 +1,63 @@
1
+ from __future__ import annotations
2
+ import numpy
3
+ from h5py import Dataset
4
+
5
+ try:
6
+ import blosc2
7
+ import blosc2_grok
8
+ except ImportError:
9
+ _has_blosc2 = False
10
+ else:
11
+ _has_blosc2 = True
12
+
13
+
14
+ class Blosc2Jp2kWrapper:
15
+ """Wrapper to apply JP2K conversion to a dataset"""
16
+
17
+ def __init__(self, dataset: Dataset, compression_params: dict):
18
+ self.dataset: Dataset = dataset
19
+ self.compression_params: dict = self.get_default_compression_params()
20
+ self.compression_params.update(compression_params)
21
+
22
+ blosc2_grok.set_params_defaults(
23
+ # codec=blosc2.Codec.GROK,
24
+ cod_format=blosc2_grok.GrkFileFmt.GRK_FMT_JP2,
25
+ num_threads=self.compression_params["nthreads"],
26
+ quality_mode="rates",
27
+ quality_layers=numpy.array(
28
+ [self.compression_params["cratio"]],
29
+ dtype=numpy.float64,
30
+ ),
31
+ verbose=True,
32
+ )
33
+
34
+ def __setitem__(self, name, value):
35
+ z, _, _ = name
36
+ Z, Y, X = self.dataset.shape
37
+
38
+ # Verify data type compatibility
39
+ if value.dtype not in [numpy.float32, numpy.float64, numpy.uint16]:
40
+ raise ValueError(f"Unsupported dtype: {value.dtype}")
41
+
42
+ b2im = blosc2.asarray(
43
+ value.reshape(1, Y, X),
44
+ chunks=(1, Y, X),
45
+ blocks=(1, Y, X),
46
+ cparams=self.compression_params,
47
+ )
48
+ cframe = b2im.schunk.to_cframe()
49
+ self.dataset.id.write_direct_chunk((z, 0, 0), cframe, filter_mask=0)
50
+
51
+ @classmethod
52
+ def get_default_compression_params(cls) -> dict:
53
+ if _has_blosc2:
54
+ return {
55
+ "codec": blosc2.Codec.GROK,
56
+ "filters": [],
57
+ "splitmode": blosc2.SplitMode.NEVER_SPLIT,
58
+ "nthreads": 4,
59
+ "cratio": 10,
60
+ "verbose": True,
61
+ }
62
+ else:
63
+ return {}
@@ -4,7 +4,7 @@ from silx.utils.enum import Enum as _Enum
4
4
  from silx.io.utils import open as open_hdf5
5
5
  from silx.io.utils import get_data
6
6
 
7
- from tomoscan.esrf.scan.nxtomoscan import NXtomoScan
7
+ from tomoscan.scans.nxtomoscan import NXtomoScan
8
8
  from nxtomo.paths.nxtomo import get_paths as get_nexus_paths
9
9
 
10
10
  _logger = logging.getLogger(__name__)
@@ -19,10 +19,10 @@ from tqdm import tqdm
19
19
  from silx.io.dictdump import dicttoh5
20
20
  from silx.utils.deprecation import deprecated
21
21
 
22
- from tomoscan.esrf.scan.edfscan import EDFTomoScan
23
- from tomoscan.esrf.scan.nxtomoscan import NXtomoScan
24
- from tomoscan.esrf.scan.utils import get_parameters_frm_par_or_info
25
- from tomoscan.io import HDF5File
22
+ from tomoscan.scans.edfscan import EDFTomoScan
23
+ from tomoscan.scans.nxtomoscan import NXtomoScan
24
+ from tomoscan.scan_utils import get_parameters_frm_par_or_info
25
+ from nxtomo.io import HDF5File
26
26
 
27
27
  from nxtomo.paths.nxtomo import get_paths as get_nexus_paths
28
28
  from nxtomo.nxobject.nxdetector import FieldOfView, ImageKey
@@ -3,8 +3,8 @@ import numpy
3
3
  from fabio.edfimage import EdfImage
4
4
  from silx.io.url import DataUrl
5
5
  from nxtomomill.converter.edf.checks import compare_volumes
6
- from tomoscan.esrf.scan.nxtomoscan import NXtomoScan
7
- from tomoscan.io import HDF5File
6
+ from tomoscan.scans.nxtomoscan import NXtomoScan
7
+ from nxtomo.io import HDF5File
8
8
 
9
9
 
10
10
  def test_compare_volumes(tmp_path):
@@ -1,5 +1,6 @@
1
1
  # coding: utf-8
2
2
 
3
+ import contextlib
3
4
  import os
4
5
  import shutil
5
6
  import tempfile
@@ -9,14 +10,13 @@ import numpy
9
10
  import pytest
10
11
 
11
12
  from tqdm import tqdm
13
+ from h5py import File as HDF5File
12
14
 
13
- from tomoscan import version
14
- from tomoscan.esrf.mock import MockEDF
15
- from tomoscan.esrf.scan.edfscan import EDFTomoScan
16
- from tomoscan.esrf.scan.nxtomoscan import NXtomoScan
17
- from tomoscan.esrf.scan.utils import dump_info_file
15
+ from tomoscan.tests.mock import MockEDF
16
+ from tomoscan.scans.edfscan import EDFTomoScan
17
+ from tomoscan.scans.nxtomoscan import NXtomoScan
18
+ from tomoscan.scan_utils import dump_info_file
18
19
  from tomoscan.validator import is_valid_for_reconstruction
19
- from tomoscan.io import HDF5File, get_swmr_mode
20
20
 
21
21
  from nxtomo.io import cwd_context
22
22
 
@@ -29,12 +29,10 @@ from nxtomomill.models.edf2nx import EDF2nxModel
29
29
  "duplicate_data, external_link_type",
30
30
  ((False, "absolute"), (False, "relative"), (True, "absolute")),
31
31
  )
32
- @pytest.mark.parametrize("progress", (None, tqdm(desc="conversion from edf")))
33
- @pytest.mark.skipif(
34
- condition=(version.MINOR < 7 and version.MAJOR == 0),
35
- reason="dark_n and ref_n from EDFTomoScan where not existing",
36
- )
37
- def test_edf_to_nx_converter(tmp_path, progress, duplicate_data, external_link_type):
32
+ @pytest.mark.parametrize("with_progress", (False, True))
33
+ def test_edf_to_nx_converter(
34
+ tmp_path, with_progress, duplicate_data, external_link_type
35
+ ):
38
36
  folder = tmp_path
39
37
 
40
38
  scan_path = os.path.join(folder, "myscan")
@@ -64,10 +62,14 @@ def test_edf_to_nx_converter(tmp_path, progress, duplicate_data, external_link_t
64
62
  config.y_translation_unit = "cm"
65
63
  config.z_translation_unit = "m"
66
64
  config.sample_detector_distance_unit = "cm"
67
- nx_file, nx_entry = converter.from_edf_to_nx(
68
- configuration=config,
69
- progress=progress,
65
+ progress_cm = (
66
+ tqdm(desc="conversion from edf") if with_progress else contextlib.nullcontext()
70
67
  )
68
+ with progress_cm as progress:
69
+ nx_file, nx_entry = converter.from_edf_to_nx(
70
+ configuration=config,
71
+ progress=progress,
72
+ )
71
73
 
72
74
  hdf5_scan = NXtomoScan(scan=nx_file, entry=nx_entry)
73
75
  assert len(hdf5_scan.projections) == n_proj
@@ -81,7 +83,7 @@ def test_edf_to_nx_converter(tmp_path, progress, duplicate_data, external_link_t
81
83
  # this will work with the tomotools suite as tomoscan will automatically create a working dircetory context when reading the file.
82
84
  # but this can be an issue when sharing data or reading data outside the tomotools suite
83
85
  with cwd_context(output_file):
84
- with HDF5File(output_file, mode="r", swmr=get_swmr_mode()) as h5f:
86
+ with HDF5File(output_file, mode="r") as h5f:
85
87
  detector_data_path = f"/{nx_entry}/instrument/detector/data"
86
88
  assert (
87
89
  f"/{nx_entry}/instrument/detector/data" in h5f
@@ -1,8 +1,8 @@
1
1
  import os
2
2
  import pytest
3
3
  from glob import glob
4
- from tomoscan.esrf.mock import MockEDF
5
- from tomoscan.esrf.scan.edfscan import EDFTomoScan
4
+ from tomoscan.tests.mock import MockEDF
5
+ from tomoscan.scans.edfscan import EDFTomoScan
6
6
  from nxtomomill.converter.edf.checks import OUPUT_CHECK
7
7
  from nxtomomill.models.edf2nx import EDF2nxModel
8
8
  from nxtomomill.converter.edf.edfconverter import from_edf_to_nx, post_processing_check
@@ -9,9 +9,9 @@ import pint
9
9
 
10
10
  import numpy
11
11
 
12
- from tomoscan.identifier import ScanIdentifier
13
- from tomoscan.scanbase import TomoScanBase
14
- from tomoscan.utils import docstring
12
+ from tomoscan.identifiers.base import ScanIdentifier
13
+ from tomoscan.scans.scanbase import TomoScanBase
14
+ from tomobase.utils import docstring
15
15
 
16
16
 
17
17
  from dataclasses import dataclass, field
@@ -2,10 +2,10 @@ import logging
2
2
  from posixpath import join
3
3
  import numpy as np
4
4
  import pint
5
- from tomoscan.esrf.scan.h5utils import get_h5_value
5
+ from tomoscan.h5utils import get_h5_value
6
6
  from nxtomo.application.nxtomo import NXtomo
7
7
  from nxtomo.nxobject.nxdetector import ImageKey
8
- from tomoscan.esrf.scan.fscan import FscanDataset, list_datasets
8
+ from tomoscan.fscan import FscanDataset, list_datasets
9
9
  from silx.utils.deprecation import deprecated
10
10
 
11
11
  _logger = logging.getLogger(__name__)
@@ -6,7 +6,7 @@ import tempfile
6
6
  import pytest
7
7
  from silx.io.url import DataUrl
8
8
 
9
- from tomoscan.io import HDF5File
9
+ from nxtomo.io import HDF5File
10
10
  from nxtomomill.converter.hdf5.acquisition.baseacquisition import (
11
11
  BaseAcquisition,
12
12
  get_dataset_name_from_motor,
@@ -60,7 +60,8 @@ def test_frame_flips(tmp_path, monkeypatch):
60
60
  )
61
61
 
62
62
  scan_dir = GitlabDataset.get_dataset("h5_datasets")
63
- assert scan_dir is not None
63
+ if scan_dir is None:
64
+ raise FileNotFoundError("Unable to download h5_datasets not found")
64
65
 
65
66
  configuration = TomoHDF5Config()
66
67
  configuration.input_file = os.path.join(
@@ -6,7 +6,7 @@ import pytest
6
6
  import h5py
7
7
 
8
8
  from silx.io.url import DataUrl
9
- from tomoscan.io import HDF5File
9
+ from nxtomo.io import HDF5File
10
10
  from nxtomo.nxobject.nxdetector import ImageKey
11
11
 
12
12
  from nxtomomill.io.config import TomoHDF5Config
@@ -17,7 +17,8 @@ _ureg = pint.get_application_registry()
17
17
  def test_back_and_forth_conversion(tmp_path):
18
18
  """test nxtomomill fluo2nx CLI with default parameters (handle all detectors found)"""
19
19
  scan_dir = GitlabDataset.get_dataset("h5_datasets")
20
- assert scan_dir is not None
20
+ if scan_dir is None:
21
+ raise FileNotFoundError("Unable to download h5_datasets not found")
21
22
  input_file = os.path.join(scan_dir, "back_and_forth/bliss_tomo_2025_06_17.h5")
22
23
 
23
24
  output_file = os.path.join(tmp_path, "nexus_file.nx")
@@ -1,7 +1,8 @@
1
1
  import pytest
2
2
  import os
3
3
  import numpy
4
- from tomoscan.io import HDF5File, get_swmr_mode
4
+ from h5py import File as HDF5File
5
+
5
6
  from nxtomomill.converter.hdf5.acquisition.blisstomoconfig import TomoConfig
6
7
 
7
8
 
@@ -56,7 +57,7 @@ def test_tomo_config(tmp_path):
56
57
  with pytest.raises(KeyError):
57
58
  TomoConfig.from_technique_group(h5s)
58
59
 
59
- with HDF5File(file_path, mode="r", swmr=get_swmr_mode()) as h5s:
60
+ with HDF5File(file_path, mode="r") as h5s:
60
61
  tomo_config = TomoConfig.from_technique_group(h5s["/0/test/instrument"])
61
62
 
62
63
  numpy.testing.assert_array_equal(
@@ -42,7 +42,8 @@ def test_holotomo_conversion_id16a(tmp_path):
42
42
  "h5_datasets", "holotomo", "id16a", "SiemensStar_HT_025nm_0002.h5"
43
43
  )
44
44
  input_file = GitlabDataset.get_dataset(dataset_file)
45
- assert os.path.exists(input_file)
45
+ if input_file is None:
46
+ raise FileNotFoundError(f"Unable to download {dataset_file} not found")
46
47
  output_file = os.path.join(tmp_path, "nexus_file.nx")
47
48
 
48
49
  assert not os.path.exists(output_file), "output_file exists already"
@@ -19,14 +19,16 @@ _ureg = pint.get_application_registry()
19
19
  @pytest.fixture(scope="class")
20
20
  def S59_68p41b_16mm_6p5mm_F8_0001_Dataset() -> Path:
21
21
  scan_dir = GitlabDataset.get_dataset("h5_datasets")
22
- assert scan_dir is not None
22
+ if scan_dir is None:
23
+ raise FileNotFoundError("Unable to download h5_datasets not found")
23
24
  return Path(os.path.join(scan_dir, "legacy", "S59_68p41b_16mm_6p5mm_F8_0001.h5"))
24
25
 
25
26
 
26
27
  @pytest.fixture(scope="class")
27
28
  def WGN_01_0000_P_110_8128_D_129_Dataset():
28
29
  scan_dir = GitlabDataset.get_dataset("h5_datasets")
29
- assert scan_dir is not None
30
+ if scan_dir is None:
31
+ raise FileNotFoundError("Unable to download h5_datasets not found")
30
32
  return Path(os.path.join(scan_dir, "legacy", "WGN_01_0000_P_110_8128_D_129.h5"))
31
33
 
32
34
 
@@ -17,7 +17,8 @@ def test_multitomo_z_series(tmp_path):
17
17
  """test nxtomomill h52nx with a 'multitomo z-series' acquisition"""
18
18
 
19
19
  scan_dir = GitlabDataset.get_dataset("h5_datasets")
20
- assert scan_dir is not None
20
+ if scan_dir is None:
21
+ raise FileNotFoundError("Unable to download h5_datasets not found")
21
22
  input_file = os.path.join(
22
23
  scan_dir, "multitomo/Zseries_Volcano_passedevis_-1.7-aka720-bis_0002.h5"
23
24
  )
@@ -3,12 +3,12 @@
3
3
  import os
4
4
  import numpy
5
5
  import pytest
6
+ from h5py import File as HDF5File
6
7
 
7
8
  from nxtomo.application.nxtomo import NXtomo
8
9
  from nxtomo.nxobject.nxdetector import ImageKey
9
10
 
10
- from tomoscan.io import HDF5File, get_swmr_mode
11
- from tomoscan.esrf.scan.nxtomoscan import NXtomoScan
11
+ from tomoscan.scans.nxtomoscan import NXtomoScan
12
12
 
13
13
  from nxtomomill import converter
14
14
  from nxtomomill.converter.hdf5.acquisition.multitomo import MultiTomoAcquisition
@@ -61,7 +61,7 @@ def test_multitomo_conversion(tmp_path, config: dict, multitomo_version: int):
61
61
  assert len(result) == nb_loop * nb_tomo
62
62
  n_projs = 10 * nb_loop * nb_tomo
63
63
  # check saved datasets
64
- with HDF5File(sample_file, mode="r", swmr=get_swmr_mode()) as h5f:
64
+ with HDF5File(sample_file, mode="r") as h5f:
65
65
  darks = h5f["2.1/instrument/pcolinux/data"][()]
66
66
  assert len(darks) == n_darks
67
67
  flats_1 = h5f["3.1/instrument/pcolinux/data"][()]
@@ -72,7 +72,7 @@ def test_multitomo_conversion(tmp_path, config: dict, multitomo_version: int):
72
72
  assert len(flats_2) == n_flats
73
73
 
74
74
  for i_nx_tomo, (file_path, data_path) in enumerate(result):
75
- with HDF5File(file_path, mode="r", swmr=get_swmr_mode()) as h5f:
75
+ with HDF5File(file_path, mode="r") as h5f:
76
76
  detector_path = "/".join([data_path, "instrument", "detector", "data"])
77
77
  detector_data = h5f[detector_path][()]
78
78
  expected_data = numpy.concatenate(