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.
- {nxtomomill-2.1.1/nxtomomill.egg-info → nxtomomill-2.2.0.dev0}/PKG-INFO +3 -2
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/doc/conf.py +1 -1
- nxtomomill-2.2.0.dev0/nxtomomill/__init__.py +31 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/__main__.py +2 -2
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/blissfluo2nx.py +5 -4
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/edf2nx.py +5 -4
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/fluo2nx.py +5 -4
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/h52nx.py +7 -6
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/patch_nx.py +1 -1
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/split_nxfile.py +1 -1
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_edf2nx_app.py +1 -1
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_patch_nx_app.py +1 -1
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_split_nxfile_app.py +2 -2
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/z_concatenate_scans.py +4 -4
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/dxfile/dxfileconverter.py +1 -1
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/dxfile/tests/test_dxfile.py +1 -1
- nxtomomill-2.2.0.dev0/nxtomomill/converter/edf/_Blosc2Jp2kWrapper.py +63 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/edf/checks.py +1 -1
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/edf/edfconverter.py +4 -4
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/edf/tests/test_checks.py +2 -2
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/edf/tests/test_edf2nx.py +18 -16
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/edf/tests/test_edf2nx_check.py +2 -2
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/fluo/fluoscan.py +3 -3
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/fscan/fscanconverter.py +2 -2
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/tests/test_acquisition.py +3 -2
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/tests/test_acquisition_utils.py +1 -1
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/tests/test_back_and_forth.py +2 -1
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/tests/test_bliss_tomo_config.py +3 -2
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/tests/test_holotomo.py +2 -1
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/tests/test_legacy.py +4 -2
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/tests/test_multitomo_zseries.py +2 -1
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/tests/test_multitomoacquisition.py +4 -4
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/utils/_context.py +40 -22
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/hdf5converter.py +2 -2
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/post_processing/dark_flat_copy.py +1 -1
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/tests/test_frame_flip.py +4 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/tests/test_h52nx_utils.py +23 -10
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/tests/test_hdf5converter.py +17 -22
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/FrameGroup.py +1 -1
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/utils.py +1 -1
- nxtomomill-2.2.0.dev0/nxtomomill/tests/test_version.py +7 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/tests/utils/bliss.py +1 -1
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/tests/utils/dxfile.py +1 -1
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/_os.py +1 -1
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/flat_reducer.py +2 -2
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/nexus.py +1 -1
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/tests/test_flat_reducer.py +2 -2
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/tests/test_utils.py +22 -24
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/utils.py +1 -2
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0/nxtomomill.egg-info}/PKG-INFO +3 -2
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill.egg-info/SOURCES.txt +1 -1
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill.egg-info/requires.txt +2 -1
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill.egg-info/top_level.txt +1 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/pyproject.toml +3 -5
- nxtomomill-2.1.1/nxtomomill/__init__.py +0 -5
- nxtomomill-2.1.1/nxtomomill/tests/test_version.py +0 -7
- nxtomomill-2.1.1/nxtomomill/version.py +0 -109
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/LICENSE +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/README.md +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/blissfluoconfig.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/dxfile2nx.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/edf2nx_check.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/edfconfig.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/fluoconfig.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/fscan2nx.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/h5config.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/nxcopy.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_bliss_fluo2nx_app.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_dxfile2nx_app.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_edf_config_app.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_fluo2nx_app.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_h52nx_app.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_h5_config_app.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/tests/test_nx_copy.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/app/zstages2nxs.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/baseconverter.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/dxfile/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/edf/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/fluo/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/fluo/blissfluoscan.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/fluo/fluoconverter.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/fluo/tests/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/fluo/tests/test_fluoscan2D.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/fluo/tests/test_fluoscan3D.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/fscan/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/_bliss_activeconfig.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/backandforth.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/baseacquisition.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/blisstomoconfig.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/multitomo.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/pcotomoacquisition.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/standardacquisition.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/tests/bliss_tomo_datasets.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/utils/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/utils/_keys.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/utils/_scan_type_finder.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/utils/bliss_scan_type.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/utils/detector.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/utils/machine_current.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/utils/series.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/utils/timestamps.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisition/zseriesacquisition.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/acquisitionConstructor.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/post_processing/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/hdf5/utils.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/version.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/config/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/config/configbase.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/config/confighandler.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/config/dxconfig.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/config/edfconfig.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/config/fluoconfig.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/config/hdf5config.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/config/tests/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/config/tests/test_confighandler.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/tests/test_frame_group.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/io/tests/utils.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/base/ConfigBase.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/base/FrmFlatToNestedBase.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/base/NestedModelBase.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/base/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/base/general_section.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/base/instrument_section.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/base/source_section.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/blissfluo2nx/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/blissfluo2nx/blissfluo2nx.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/blissfluo2nx/general_section.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/dx2nx.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/edf2nx/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/edf2nx/dark_and_flat_section.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/edf2nx/detector_section.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/edf2nx/edf2nx.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/edf2nx/general_section.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/edf2nx/keys_section.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/edf2nx/sample_section.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/edf2nx/unit_section.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/fluo2nx/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/fluo2nx/fluo2nx.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/fluo2nx/general_section.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/_acquisitionstep.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/_context.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/entries_and_title_section.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/extra_params_section.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/frame_type_section.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/general_section.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/h52nx.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/keys_section.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/h52nx/multitomo_section.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/tests/test_context.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/tests/test_edf2nx_model.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/tests/test_fluo2nx_model.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/tests/test_h52nx_model.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/models/tests/test_io_utils.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/settings.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/test.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/tests/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/tests/datasets.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/tests/resources/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/tests/resources/edf2nx_config_files/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/tests/resources/fluo2nx_config_files/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/tests/resources/h52nx_config_files/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/tests/utils/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/__init__.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/h5pyutils.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/hdf5.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/io.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/pintutils.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/tests/test_h5pyutils.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/utils/tests/test_nexus_utils.py +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill.egg-info/dependency_links.txt +0 -0
- {nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill.egg-info/entry_points.txt +0 -0
- {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.
|
|
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]>=
|
|
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-
|
|
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
|
|
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.
|
|
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
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
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.
|
|
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.
|
|
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,8 @@ import os
|
|
|
2
2
|
import numpy
|
|
3
3
|
import pytest
|
|
4
4
|
import pint
|
|
5
|
-
from
|
|
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.
|
|
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"
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
23
|
-
from tomoscan.
|
|
24
|
-
from tomoscan.
|
|
25
|
-
from
|
|
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.
|
|
7
|
-
from
|
|
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
|
|
14
|
-
from tomoscan.
|
|
15
|
-
from tomoscan.
|
|
16
|
-
from tomoscan.
|
|
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("
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
68
|
-
|
|
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"
|
|
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
|
{nxtomomill-2.1.1 → nxtomomill-2.2.0.dev0}/nxtomomill/converter/edf/tests/test_edf2nx_check.py
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import pytest
|
|
3
3
|
from glob import glob
|
|
4
|
-
from tomoscan.
|
|
5
|
-
from tomoscan.
|
|
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.
|
|
13
|
-
from tomoscan.scanbase import TomoScanBase
|
|
14
|
-
from
|
|
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.
|
|
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.
|
|
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
|
|
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
|
-
|
|
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(
|
|
@@ -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
|
-
|
|
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
|
|
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"
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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"
|
|
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"
|
|
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(
|