nabu 2024.2.14__tar.gz → 2025.1.0__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.
- {nabu-2024.2.14/nabu.egg-info → nabu-2025.1.0}/PKG-INFO +7 -7
- nabu-2025.1.0/doc/doc_config.py +32 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/__init__.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/bootstrap_stitching.py +4 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/cast_volume.py +16 -14
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/cli_configs.py +102 -9
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/compare_volumes.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/composite_cor.py +2 -4
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/diag_to_pix.py +5 -6
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/diag_to_rot.py +10 -11
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/double_flatfield.py +18 -5
- nabu-2025.1.0/nabu/app/estimate_motion.py +75 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/multicor.py +28 -15
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/parse_reconstruction_log.py +1 -0
- nabu-2025.1.0/nabu/app/pcaflats.py +122 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/prepare_weights_double.py +1 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/reconstruct.py +1 -7
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/reconstruct_helical.py +5 -9
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/reduce_dark_flat.py +5 -4
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/rotate.py +3 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/stitching.py +7 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/tests/test_reduce_dark_flat.py +2 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/validator.py +1 -4
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/convolution.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/fft.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/medfilt.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/padding.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/backproj.cu +6 -6
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/cone.cu +4 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/hierarchical_backproj.cu +14 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/utils.py +2 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/estimation/alignment.py +17 -31
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/estimation/cor.py +27 -33
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/estimation/cor_sino.py +2 -8
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/estimation/focus.py +4 -8
- nabu-2025.1.0/nabu/estimation/motion.py +557 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/estimation/tests/test_alignment.py +2 -0
- nabu-2025.1.0/nabu/estimation/tests/test_motion_estimation.py +471 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/estimation/tests/test_tilt.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/estimation/tilt.py +6 -5
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/estimation/translation.py +47 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/io/cast_volume.py +108 -18
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/io/detector_distortion.py +5 -6
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/io/reader.py +45 -6
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/io/reader_helical.py +5 -4
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/io/tests/test_cast_volume.py +2 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/io/tests/test_readers.py +41 -38
- nabu-2025.1.0/nabu/io/tests/test_remove_volume.py +152 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/io/tests/test_writers.py +2 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/io/utils.py +8 -4
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/io/writer.py +1 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/fftshift.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/fourier_filters.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/histogram.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/histogram_cuda.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/padding_base.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/rotation.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/rotation_cuda.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/tests/test_binning.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/transpose.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/unsharp.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/unsharp_cuda.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/unsharp_opencl.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/utils.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/opencl/fft.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/opencl/padding.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/opencl/src/backproj.cl +6 -6
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/opencl/utils.py +8 -8
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/config.py +2 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/config_validators.py +46 -46
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/datadump.py +3 -3
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/estimators.py +271 -11
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/fullfield/chunked.py +103 -67
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/fullfield/chunked_cuda.py +5 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/fullfield/computations.py +4 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/fullfield/dataset_validator.py +0 -1
- nabu-2025.1.0/nabu/pipeline/fullfield/get_double_flatfield.py +147 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/fullfield/nabu_config.py +36 -17
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/fullfield/processconfig.py +41 -7
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/fullfield/reconstruction.py +14 -10
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/helical/dataset_validator.py +3 -4
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/helical/fbp.py +4 -4
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/helical/filtering.py +5 -4
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/helical/gridded_accumulator.py +10 -11
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/helical/helical_chunked_regridded.py +1 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/helical/helical_reconstruction.py +12 -9
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/helical/helical_utils.py +1 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/helical/nabu_config.py +2 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/helical/span_strategy.py +1 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/helical/weight_balancer.py +2 -3
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/params.py +20 -3
- nabu-2025.1.0/nabu/pipeline/tests/test_estimators.py +358 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/utils.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/writer.py +1 -1
- nabu-2025.1.0/nabu/preproc/alignment.py +1 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/ccd.py +53 -3
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/ctf.py +8 -8
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/ctf_cuda.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/double_flatfield_cuda.py +2 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/double_flatfield_variable_region.py +0 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/flatfield.py +307 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/flatfield_cuda.py +1 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/flatfield_variable_region.py +3 -3
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/phase.py +2 -4
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/phase_cuda.py +2 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/shift.py +4 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/shift_cuda.py +0 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/tests/test_ctf.py +4 -4
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/tests/test_double_flatfield.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/tests/test_flatfield.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/tests/test_paganin.py +1 -3
- nabu-2025.1.0/nabu/preproc/tests/test_pcaflats.py +154 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/tests/test_vshift.py +4 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/azim.py +9 -5
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/convolution_cuda.py +6 -4
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/fft_base.py +7 -3
- nabu-2025.1.0/nabu/processing/fft_cuda.py +115 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/fft_opencl.py +28 -6
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/fftshift.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/histogram.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/muladd.py +0 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/padding_base.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/padding_cuda.py +0 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/processing_base.py +12 -6
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/rotation_cuda.py +3 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/tests/test_fft.py +2 -64
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/tests/test_fftshift.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/tests/test_medfilt.py +1 -3
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/tests/test_padding.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/tests/test_roll.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/tests/test_rotation.py +4 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/unsharp_opencl.py +1 -1
- nabu-2025.1.0/nabu/reconstruction/astra.py +245 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/cone.py +39 -9
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/fbp.py +7 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/fbp_base.py +36 -5
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/filtering.py +59 -25
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/filtering_cuda.py +22 -21
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/filtering_opencl.py +10 -14
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/hbp.py +26 -13
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/mlem.py +55 -16
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/projection.py +3 -5
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/sinogram.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/sinogram_cuda.py +0 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/tests/test_cone.py +37 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/tests/test_deringer.py +4 -4
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/tests/test_fbp.py +36 -15
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/tests/test_filtering.py +27 -7
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/tests/test_halftomo.py +28 -2
- nabu-2025.1.0/nabu/reconstruction/tests/test_mlem.py +121 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/tests/test_projector.py +7 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/tests/test_reconstructor.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/tests/test_sino_normalization.py +0 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/resources/dataset_analyzer.py +210 -24
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/resources/gpu.py +4 -4
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/resources/logger.py +4 -4
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/resources/nxflatfield.py +103 -37
- nabu-2025.1.0/nabu/resources/tests/test_dataset_analyzer.py +37 -0
- nabu-2025.1.0/nabu/resources/tests/test_extract.py +11 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/resources/tests/test_nxflatfield.py +5 -5
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/resources/utils.py +16 -10
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/alignment.py +8 -11
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/config.py +44 -35
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/definitions.py +2 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/frame_composition.py +8 -10
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/overlap.py +4 -4
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/sample_normalization.py +5 -5
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/slurm_utils.py +2 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/stitcher/base.py +2 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/stitcher/dumper/base.py +0 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/stitcher/dumper/postprocessing.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/stitcher/post_processing.py +11 -9
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/stitcher/pre_processing.py +37 -31
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/stitcher/single_axis.py +2 -3
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/stitcher_2D.py +2 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/tests/test_config.py +10 -11
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/tests/test_sample_normalization.py +1 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/tests/test_slurm_utils.py +1 -2
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/tests/test_y_preprocessing_stitching.py +11 -8
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/tests/test_z_postprocessing_stitching.py +3 -3
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/tests/test_z_preprocessing_stitching.py +27 -24
- nabu-2025.1.0/nabu/stitching/utils/tests/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/utils/tests/test_post-processing.py +1 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/utils/utils.py +16 -18
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/tests.py +0 -3
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/testutils.py +62 -9
- nabu-2025.1.0/nabu/thirdparty/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/utils.py +50 -20
- {nabu-2024.2.14 → nabu-2025.1.0/nabu.egg-info}/PKG-INFO +7 -7
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu.egg-info/SOURCES.txt +14 -3
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu.egg-info/entry_points.txt +2 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu.egg-info/requires.txt +2 -3
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu.egg-info/top_level.txt +0 -1
- {nabu-2024.2.14 → nabu-2025.1.0}/pyproject.toml +19 -7
- nabu-2024.2.14/nabu/app/correct_rot.py +0 -70
- nabu-2024.2.14/nabu/io/tests/test_detector_distortion.py +0 -178
- nabu-2024.2.14/nabu/pipeline/tests/test_estimators.py +0 -121
- nabu-2024.2.14/nabu/preproc/alignment.py +0 -11
- nabu-2024.2.14/nabu/processing/fft_cuda.py +0 -254
- nabu-2024.2.14/nabu/reconstruction/tests/test_mlem.py +0 -91
- {nabu-2024.2.14 → nabu-2025.1.0}/LICENSE +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/README.md +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/doc/conf.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/doc/create_conf_doc.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/doc/get_mathjax.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/bootstrap.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/create_distortion_map_from_poly.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/generate_header.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/histogram.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/nx_z_splitter.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/shrink_dataset.py +0 -0
- {nabu-2024.2.14/nabu/cuda → nabu-2025.1.0/nabu/app/tests}/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/app/utils.py +0 -0
- {nabu-2024.2.14/nabu/estimation/tests → nabu-2025.1.0/nabu/cuda}/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/kernel.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/processing.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/ElementOp.cu +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/backproj_polar.cu +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/boundary.h +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/convolution.cu +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/dfi_fftshift.cu +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/flatfield.cu +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/fourier_wavelets.cu +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/halftomo.cu +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/helical_padding.cu +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/histogram.cu +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/interpolation.cu +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/medfilt.cu +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/normalization.cu +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/padding.cu +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/proj.cu +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/rotation.cu +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/src/transpose.cu +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/cuda/tests/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/estimation/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/estimation/distortion.py +0 -0
- {nabu-2024.2.14/nabu/io → nabu-2025.1.0/nabu/estimation}/tests/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/estimation/tests/test_cor.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/estimation/tests/test_focus.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/estimation/tests/test_translation.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/estimation/utils.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/io/__init__.py +0 -0
- {nabu-2024.2.14/nabu/misc → nabu-2025.1.0/nabu/io/tests}/__init__.py +0 -0
- {nabu-2024.2.14/nabu/opencl → nabu-2025.1.0/nabu/misc}/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/binning.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/filters.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/kernel_base.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/padding.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/processing_base.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/tests/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/misc/tests/test_interpolation.py +0 -0
- {nabu-2024.2.14/nabu/opencl/tests → nabu-2025.1.0/nabu/opencl}/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/opencl/kernel.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/opencl/memcpy.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/opencl/processing.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/opencl/src/ElementOp.cl +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/opencl/src/fftshift.cl +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/opencl/src/halftomo.cl +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/opencl/src/padding.cl +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/opencl/src/roll.cl +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/opencl/src/transpose.cl +0 -0
- {nabu-2024.2.14/nabu/pipeline → nabu-2025.1.0/nabu/opencl/tests}/__init__.py +0 -0
- {nabu-2024.2.14/nabu/pipeline/fullfield → nabu-2025.1.0/nabu/pipeline}/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/dataset_validator.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/detector_distortion_provider.py +0 -0
- {nabu-2024.2.14/nabu/pipeline/helical → nabu-2025.1.0/nabu/pipeline/fullfield}/__init__.py +0 -0
- {nabu-2024.2.14/nabu/pipeline/helical/tests → nabu-2025.1.0/nabu/pipeline/helical}/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/helical/helical_chunked_regridded_cuda.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/helical/processconfig.py +0 -0
- {nabu-2024.2.14/nabu/pipeline/xrdct → nabu-2025.1.0/nabu/pipeline/helical/tests}/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/processconfig.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/pipeline/reader.py +0 -0
- {nabu-2024.2.14/nabu/processing → nabu-2025.1.0/nabu/pipeline/tests}/__init__.py +0 -0
- {nabu-2024.2.14/nabu/processing/tests → nabu-2025.1.0/nabu/pipeline/xrdct}/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/ccd_cuda.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/distortion.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/double_flatfield.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/tests/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/preproc/tests/test_ccd_corr.py +0 -0
- {nabu-2024.2.14/nabu/resources → nabu-2025.1.0/nabu/processing}/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/histogram_cuda.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/kernel_base.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/medfilt_cuda.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/muladd_cuda.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/padding_opencl.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/roll_opencl.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/rotation.py +0 -0
- {nabu-2024.2.14/nabu/resources/cli → nabu-2025.1.0/nabu/processing/tests}/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/tests/test_histogram.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/tests/test_muladd.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/tests/test_transpose.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/tests/test_unsharp.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/transpose.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/unsharp.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/processing/unsharp_cuda.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/fbp_opencl.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/reconstructor.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/reconstructor_cuda.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/rings.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/rings_cuda.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/sinogram_opencl.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/reconstruction/tests/__init__.py +0 -0
- {nabu-2024.2.14/nabu/resources/templates → nabu-2025.1.0/nabu/resources}/__init__.py +0 -0
- {nabu-2024.2.14/nabu/resources/tests → nabu-2025.1.0/nabu/resources/cli}/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/resources/cor.py +0 -0
- {nabu-2024.2.14/nabu/stitching → nabu-2025.1.0/nabu/resources/templates}/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/resources/templates/bm05_pag.conf +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/resources/templates/id16_ctf.conf +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/resources/templates/id16_holo.conf +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/resources/templates/id16a_fluo.conf +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/resources/templates/id19_pag.conf +0 -0
- {nabu-2024.2.14/nabu/stitching/stitcher → nabu-2025.1.0/nabu/resources/tests}/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/resources/tests/test_units.py +0 -0
- {nabu-2024.2.14/nabu/stitching/tests → nabu-2025.1.0/nabu/stitching}/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/single_axis_stitching.py +0 -0
- {nabu-2024.2.14/nabu/thirdparty → nabu-2025.1.0/nabu/stitching/stitcher}/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/stitcher/dumper/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/stitcher/dumper/preprocessing.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/stitcher/stitcher.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/stitcher/y_stitcher.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/stitcher/z_stitcher.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/tests/test_alignment.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/tests/test_frame_composition.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/tests/test_overlap.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/tests/test_utils.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/utils/__init__.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/utils/post_processing.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/y_stitching.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/stitching/z_stitching.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/thirdparty/algotom_convert_sino.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/thirdparty/pore3d_deringer_munch.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/thirdparty/tomocupy_remove_stripe.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/thirdparty/tomopy_phase.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu/thirdparty/tomwer_load_flats_darks.py +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/nabu.egg-info/dependency_links.txt +0 -0
- {nabu-2024.2.14 → nabu-2025.1.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: nabu
|
3
|
-
Version:
|
3
|
+
Version: 2025.1.0
|
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>
|
@@ -14,24 +14,25 @@ Classifier: Development Status :: 5 - Production/Stable
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
15
15
|
Classifier: Intended Audience :: Science/Research
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
17
|
-
Classifier: Programming Language :: Python :: 3.7
|
18
|
-
Classifier: Programming Language :: Python :: 3.8
|
19
17
|
Classifier: Programming Language :: Python :: 3.9
|
20
18
|
Classifier: Programming Language :: Python :: 3.10
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
21
22
|
Classifier: Environment :: Console
|
22
23
|
Classifier: Operating System :: Unix
|
23
24
|
Classifier: Operating System :: MacOS :: MacOS X
|
24
25
|
Classifier: Operating System :: POSIX
|
25
26
|
Classifier: Topic :: Scientific/Engineering :: Physics
|
26
27
|
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
|
27
|
-
Requires-Python: >=3.
|
28
|
+
Requires-Python: >=3.9
|
28
29
|
Description-Content-Type: text/markdown
|
29
30
|
License-File: LICENSE
|
30
|
-
Requires-Dist: numpy
|
31
|
+
Requires-Dist: numpy>1.9.0
|
31
32
|
Requires-Dist: scipy
|
32
33
|
Requires-Dist: h5py>=3.0
|
33
34
|
Requires-Dist: silx>=0.15.0
|
34
|
-
Requires-Dist: tomoscan>=2.
|
35
|
+
Requires-Dist: tomoscan>=2.2.2
|
35
36
|
Requires-Dist: psutil
|
36
37
|
Requires-Dist: pytest
|
37
38
|
Requires-Dist: tifffile
|
@@ -41,7 +42,6 @@ Requires-Dist: scikit-image; extra == "full"
|
|
41
42
|
Requires-Dist: PyWavelets; extra == "full"
|
42
43
|
Requires-Dist: glymur; extra == "full"
|
43
44
|
Requires-Dist: pycuda!=2024.1.1; extra == "full"
|
44
|
-
Requires-Dist: scikit-cuda; extra == "full"
|
45
45
|
Requires-Dist: pycudwt; extra == "full"
|
46
46
|
Requires-Dist: sluurp>=0.3; extra == "full"
|
47
47
|
Requires-Dist: pyvkfft; extra == "full"
|
@@ -0,0 +1,32 @@
|
|
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)
|
@@ -23,12 +23,14 @@ def guess_tomo_objects(my_str: str) -> tuple:
|
|
23
23
|
try:
|
24
24
|
# create_tomo_object_from_identifier will raise an exception is the string does not match an identifier
|
25
25
|
return (Factory.create_tomo_object_from_identifier(my_str),)
|
26
|
-
except Exception:
|
26
|
+
except Exception as exc:
|
27
|
+
print("Error:", str(exc))
|
27
28
|
pass
|
28
29
|
|
29
30
|
try:
|
30
31
|
volumes = guess_volumes(my_str)
|
31
|
-
except Exception:
|
32
|
+
except Exception as exc:
|
33
|
+
print("Error:", str(exc))
|
32
34
|
pass
|
33
35
|
else:
|
34
36
|
if len(volumes) > 0:
|
@@ -1,6 +1,3 @@
|
|
1
|
-
#!/usr/bin/env python
|
2
|
-
# -*- coding: utf-8 -*-
|
3
|
-
|
4
1
|
import argparse
|
5
2
|
import os
|
6
3
|
import sys
|
@@ -49,7 +46,7 @@ def main(argv=None):
|
|
49
46
|
|
50
47
|
volume_help = f"""To define a volume you can either provide: \n
|
51
48
|
* an url (recommanded way) - see details lower \n
|
52
|
-
* a path. For hdf5 and multitiff we expect a file path. For edf, tif and jp2k we expect a folder path. In this case we will try to deduce the Volume from it. \n
|
49
|
+
* a path. For hdf5 and multitiff we expect a file path. For edf, tif and jp2k we expect a folder path. In this case we will try to deduce the Volume from it. \n
|
53
50
|
url must be defined like: \n{_volume_url_helps}
|
54
51
|
"""
|
55
52
|
|
@@ -112,7 +109,14 @@ def main(argv=None):
|
|
112
109
|
default=None,
|
113
110
|
help="Provide url to the histogram - like: '/{path}/my_file.hdf5?path/to/my/data' with my_file.hdf5 is the file containing the histogram. Located under 'path'. And 'path/to/my/data' is the location of the HDF5 dataset",
|
114
111
|
)
|
115
|
-
|
112
|
+
parser.add_argument(
|
113
|
+
"--remove-input-volume",
|
114
|
+
"--remove",
|
115
|
+
dest="remove",
|
116
|
+
action="store_true",
|
117
|
+
default=False,
|
118
|
+
help="Whether to remove the input volume after cast. Default is False.",
|
119
|
+
)
|
116
120
|
options = parser.parse_args(argv[1:])
|
117
121
|
|
118
122
|
# handle input volume
|
@@ -150,16 +154,13 @@ def main(argv=None):
|
|
150
154
|
except Exception as e:
|
151
155
|
raise ValueError(f"Fail to build output volume from {options.output_volume}") from e
|
152
156
|
|
157
|
+
# ruff: noqa: SIM102
|
153
158
|
if output_format is not None:
|
154
159
|
if not (
|
155
|
-
isinstance(output_volume, EDFVolume)
|
156
|
-
and output_format == "
|
157
|
-
or isinstance(output_format,
|
158
|
-
and output_format == "
|
159
|
-
or isinstance(output_format, JP2KVolume)
|
160
|
-
and output_format == "jp2"
|
161
|
-
or isinstance(output_format, (TIFFVolume, MultiTIFFVolume))
|
162
|
-
and output_format == "tiff"
|
160
|
+
(isinstance(output_volume, EDFVolume) and output_format == "edf")
|
161
|
+
or (isinstance(output_format, HDF5Volume) and output_format == "hdf5")
|
162
|
+
or (isinstance(output_format, JP2KVolume) and output_format == "jp2")
|
163
|
+
or (isinstance(output_format, (TIFFVolume, MultiTIFFVolume)) and output_format == "tiff")
|
163
164
|
):
|
164
165
|
raise ValueError(
|
165
166
|
"Requested 'output_type' and output volume url are incoherent. 'output_type' is optional when url provided"
|
@@ -264,7 +265,7 @@ def main(argv=None):
|
|
264
265
|
# update output volume from options
|
265
266
|
output_volume.overwrite = options.overwrite
|
266
267
|
if options.compression_ratios is not None:
|
267
|
-
output_volume.cratios =
|
268
|
+
output_volume.cratios = [int(value) for value in convert_str_to_tuple(options.compression_ratios)]
|
268
269
|
|
269
270
|
# do volume casting
|
270
271
|
cast_volume(
|
@@ -275,6 +276,7 @@ def main(argv=None):
|
|
275
276
|
data_max=data_max,
|
276
277
|
rescale_min_percentile=rescale_min_percentile,
|
277
278
|
rescale_max_percentile=rescale_max_percentile,
|
279
|
+
remove_input_volume=options.remove,
|
278
280
|
)
|
279
281
|
exit(0)
|
280
282
|
|
@@ -8,6 +8,7 @@ from nabu.pipeline.config_validators import str2bool
|
|
8
8
|
|
9
9
|
from tomoscan.framereducer.method import ReduceMethod
|
10
10
|
|
11
|
+
reduce_methods = tuple(member.value for member in ReduceMethod)
|
11
12
|
|
12
13
|
BootstrapConfig = {
|
13
14
|
"bootstrap": {
|
@@ -162,7 +163,7 @@ MultiCorConfig = ReconstructConfig.copy()
|
|
162
163
|
MultiCorConfig.update(
|
163
164
|
{
|
164
165
|
"cor": {
|
165
|
-
"help": "
|
166
|
+
"help": "Absolute positions of the center of rotation. It must be a list of comma-separated scalars, or in the form start:stop:step, where start, stop and step can all be floating-point values.",
|
166
167
|
"default": "",
|
167
168
|
"mandatory": True,
|
168
169
|
},
|
@@ -322,6 +323,64 @@ CompareVolumesConfig = {
|
|
322
323
|
},
|
323
324
|
}
|
324
325
|
|
326
|
+
EstimateMotionConfig = {
|
327
|
+
"dataset": {
|
328
|
+
"help": "Path to the dataset.",
|
329
|
+
"default": "",
|
330
|
+
"mandatory": True,
|
331
|
+
},
|
332
|
+
"flatfield": {
|
333
|
+
"help": "Whether to perform flatfield normalization. Default is True.",
|
334
|
+
"default": "1",
|
335
|
+
"type": int,
|
336
|
+
},
|
337
|
+
"rot_center": {
|
338
|
+
"help": "Center of rotation. If not provided, will be estimated.",
|
339
|
+
"default": None,
|
340
|
+
},
|
341
|
+
"subsampling": {
|
342
|
+
"help": "For 360-degrees scan, angular subsampling for matching opposite projections. Default is 10.",
|
343
|
+
"default": 10,
|
344
|
+
"type": int,
|
345
|
+
},
|
346
|
+
"deg_xy": {
|
347
|
+
"help": "Polynomial degree in x-y for sample movement polynomial model",
|
348
|
+
"default": 2,
|
349
|
+
"type": int,
|
350
|
+
},
|
351
|
+
"deg_z": {
|
352
|
+
"help": "Polynomial degree in z (vertical) for sample movement polynomial model",
|
353
|
+
"default": 2,
|
354
|
+
"type": int,
|
355
|
+
},
|
356
|
+
"win_size": {
|
357
|
+
"help": "Size of the look-up window for half-tomography",
|
358
|
+
"default": 300,
|
359
|
+
"type": int,
|
360
|
+
},
|
361
|
+
"verbose": {
|
362
|
+
"help": "Whether to plot the movement estimation fit",
|
363
|
+
"default": 1,
|
364
|
+
},
|
365
|
+
"output_file": {
|
366
|
+
"help": "Path of the output file containing the sample translations projected in the detector reference frame. This file can be directly used in 'translation_movements_file' of nabu configuration",
|
367
|
+
"default": "correct_motion.txt",
|
368
|
+
},
|
369
|
+
"only": {
|
370
|
+
"help": "Whether to only generate motion file for horizontal or vertical movement: --only horizontal or --only vertical",
|
371
|
+
"default": "",
|
372
|
+
},
|
373
|
+
"ccd_filter_size": {
|
374
|
+
"help": "Size of conditional median filter to apply on radios. Default is zero (disabled)",
|
375
|
+
"default": 0,
|
376
|
+
"type": int,
|
377
|
+
},
|
378
|
+
"ccd_filter_threshold": {
|
379
|
+
"help": "Threshold for median filter, 'ccd_filter_size' is not zero. Default is 0.04",
|
380
|
+
"default": 0.04,
|
381
|
+
"type": float,
|
382
|
+
},
|
383
|
+
}
|
325
384
|
|
326
385
|
# Default configuration for "stitching" command
|
327
386
|
StitchingConfig = {
|
@@ -344,7 +403,7 @@ StitchingConfig = {
|
|
344
403
|
# Default configuration for "stitching-bootstrap" command
|
345
404
|
BootstrapStitchingConfig = {
|
346
405
|
"stitching-type": {
|
347
|
-
"help": f"User can provide stitching type to filter some parameters. Must be in {StitchingType
|
406
|
+
"help": f"User can provide stitching type to filter some parameters. Must be in {[sst for sst in StitchingType]}.",
|
348
407
|
"default": None,
|
349
408
|
},
|
350
409
|
"level": {
|
@@ -462,11 +521,6 @@ DiagToRotConfig = {
|
|
462
521
|
"--diag_file": dict(
|
463
522
|
required=True, help="The reconstruction file obtained by nabu-helical using the diag_zpro_run option", type=str
|
464
523
|
),
|
465
|
-
"--entry_name": dict(
|
466
|
-
required=False,
|
467
|
-
help="entry_name. Defauls is entry0000",
|
468
|
-
default="entry0000",
|
469
|
-
),
|
470
524
|
"--near": dict(
|
471
525
|
required=False,
|
472
526
|
help="This is a relative offset respect to the center of the radios. The cor will be searched around the provided value. If not given the optinal parameter original_scan must be the original nexus file; and the estimated core will be taken there. The netry_name parameter also must be provided in this case",
|
@@ -564,12 +618,12 @@ ReduceDarkFlatConfig = {
|
|
564
618
|
"required": False,
|
565
619
|
},
|
566
620
|
"dark-method": {
|
567
|
-
"help": f"Define the method to be used for computing darks. Valid methods are {
|
621
|
+
"help": f"Define the method to be used for computing darks. Valid methods are {reduce_methods}",
|
568
622
|
"default": ReduceMethod.MEAN,
|
569
623
|
"required": False,
|
570
624
|
},
|
571
625
|
"flat-method": {
|
572
|
-
"help": f"Define the method to be used for computing flats. Valid methods are {
|
626
|
+
"help": f"Define the method to be used for computing flats. Valid methods are {reduce_methods}",
|
573
627
|
"default": ReduceMethod.MEDIAN,
|
574
628
|
"required": False,
|
575
629
|
},
|
@@ -613,6 +667,45 @@ ReduceDarkFlatConfig = {
|
|
613
667
|
},
|
614
668
|
}
|
615
669
|
|
670
|
+
PCAFlatsConfig = {
|
671
|
+
"datasets": {"help": "datasets to be stitched together", "default": tuple(), "nargs": "+", "mandatory": True},
|
672
|
+
"nsigma": {
|
673
|
+
"help": "Paramter to select PCA components. Default is 3. Higher nsigma, less components.",
|
674
|
+
"default": 3.0,
|
675
|
+
"type": float,
|
676
|
+
"required": False,
|
677
|
+
},
|
678
|
+
"flat-method": {
|
679
|
+
"help": f"Define the method to be used for computing flats. Valid methods are {reduce_methods}",
|
680
|
+
"default": ReduceMethod.MEDIAN,
|
681
|
+
"required": False,
|
682
|
+
},
|
683
|
+
"dark-method": {
|
684
|
+
"help": f"Define the method to be used for computing darks. Valid methods are {reduce_methods}",
|
685
|
+
"default": ReduceMethod.MEAN,
|
686
|
+
"required": False,
|
687
|
+
},
|
688
|
+
"overwrite": {
|
689
|
+
"dest": "overwrite",
|
690
|
+
"action": "store_true",
|
691
|
+
"default": False,
|
692
|
+
"help": "Overwrite dark/flats if exists",
|
693
|
+
},
|
694
|
+
"debug": {
|
695
|
+
"dest": "debug",
|
696
|
+
"action": "store_true",
|
697
|
+
"default": False,
|
698
|
+
"help": "Set logging system in debug mode",
|
699
|
+
"required": False,
|
700
|
+
},
|
701
|
+
"output-filename": {
|
702
|
+
"aliases": ("orfl",),
|
703
|
+
"default": None,
|
704
|
+
"help": "Where to save PCA flats. If not provided will be dumped in the current folder as{scan_prefix}_PCAFlats.hdf5",
|
705
|
+
"required": False,
|
706
|
+
},
|
707
|
+
}
|
708
|
+
|
616
709
|
ShowReconstructionTimingsConfig = {
|
617
710
|
"logfile": {
|
618
711
|
"help": "Path to the log file.",
|
@@ -1,14 +1,12 @@
|
|
1
|
-
import logging
|
2
1
|
import os
|
3
2
|
import sys
|
4
3
|
import numpy as np
|
5
4
|
import re
|
6
5
|
|
7
6
|
from nabu.resources.dataset_analyzer import HDF5DatasetAnalyzer
|
8
|
-
from nabu.pipeline.estimators import CompositeCOREstimator
|
7
|
+
from nabu.pipeline.estimators import CompositeCOREstimator
|
9
8
|
from nabu.resources.nxflatfield import update_dataset_info_flats_darks
|
10
9
|
from nabu.resources.utils import extract_parameters
|
11
|
-
from nxtomo.application.nxtomo import NXtomo
|
12
10
|
from .. import version
|
13
11
|
from .cli_configs import CompositeCorConfig
|
14
12
|
from .utils import parse_params_values
|
@@ -24,7 +22,7 @@ class NumpyArrayEncoder(json.JSONEncoder):
|
|
24
22
|
|
25
23
|
|
26
24
|
def main(user_args=None):
|
27
|
-
"Application to extract with the composite cor finder the center of rotation for a scan or a series of scans"
|
25
|
+
"""Application to extract with the composite cor finder the center of rotation for a scan or a series of scans"""
|
28
26
|
|
29
27
|
if user_args is None:
|
30
28
|
user_args = sys.argv[1:]
|
@@ -31,7 +31,7 @@ from ..pipeline.estimators import oversample
|
|
31
31
|
we must bring to the pixel size
|
32
32
|
|
33
33
|
An example of collection is this :
|
34
|
-
|
34
|
+
|
35
35
|
|_____ diagnostics
|
36
36
|
| |
|
37
37
|
|__ 0
|
@@ -72,10 +72,10 @@ def transform_images(diag, ovs):
|
|
72
72
|
|
73
73
|
def detailed_merit(diag, shift):
|
74
74
|
# res will become the merit summed over all the pairs theta, theta+180
|
75
|
-
res = 0.0
|
75
|
+
# res = 0.0
|
76
76
|
|
77
77
|
# need to account for the weight also. So this will become the used weight for the pairs theta, theta+180
|
78
|
-
res_w = 0.0
|
78
|
+
# res_w = 0.0
|
79
79
|
|
80
80
|
## The following two variables are very important information to be collected.
|
81
81
|
## On the the z translation over a 360 turn
|
@@ -149,7 +149,7 @@ def build_total_merit_list(diag, oversample_factor, args):
|
|
149
149
|
# calculats the merit at all the tested extra adjustment shifts.
|
150
150
|
|
151
151
|
transform_images(diag, [oversample_factor, 1])
|
152
|
-
h_ima = diag.radios[0].shape[0]
|
152
|
+
# h_ima = diag.radios[0].shape[0]
|
153
153
|
# search_radius_v = min(oversample_factor * args.search_radius_v, h_ima - 1)
|
154
154
|
search_radius_v = oversample_factor * args.search_radius_v
|
155
155
|
|
@@ -233,7 +233,6 @@ def main(user_args=None):
|
|
233
233
|
# For each key there is a sequence of radio, the corresponding sequence of weights map, the corresponding z translation, and angles
|
234
234
|
|
235
235
|
zpix_mm = None
|
236
|
-
observed_oneturn_total_shift_zpix = None
|
237
236
|
|
238
237
|
argument_list = [
|
239
238
|
(DictToObj(h5todict(args.diag_file, os.path.join(diag_url, my_key))), oversample_factor, args)
|
@@ -244,7 +243,7 @@ def main(user_args=None):
|
|
244
243
|
with Pool(processes=ncpus) as pool:
|
245
244
|
all_res_plus_infos = pool.starmap(build_total_merit_list, argument_list)
|
246
245
|
|
247
|
-
|
246
|
+
_, zpix_mm = None, None
|
248
247
|
|
249
248
|
# needs to flatten the result of pool.map
|
250
249
|
for_all_pairs_detailed_merit_lists = []
|
@@ -31,7 +31,7 @@ from .cli_configs import DiagToRotConfig
|
|
31
31
|
The collection is not done here. Here we exploit the result of a previous collection to deduce, looking at the correlations, the cor
|
32
32
|
|
33
33
|
An example of collection is this :
|
34
|
-
|
34
|
+
|
35
35
|
|_____ diagnostics
|
36
36
|
| |
|
37
37
|
|__ 0
|
@@ -68,7 +68,8 @@ def transform_images(diag, args):
|
|
68
68
|
But beforehand it is beneficial to remove low spatial frequencies.
|
69
69
|
And we do oversampling on the fly.
|
70
70
|
|
71
|
-
Parameters
|
71
|
+
Parameters
|
72
|
+
----------
|
72
73
|
diag: object
|
73
74
|
used member of diag are radios and weights
|
74
75
|
args: object
|
@@ -196,7 +197,6 @@ def find_best_interpolating_line(args):
|
|
196
197
|
z_b = np.nanmax(all_z_transl)
|
197
198
|
|
198
199
|
best_error = np.nan
|
199
|
-
best_off_pair = None
|
200
200
|
|
201
201
|
for index_ovlp_a in index_overlap_list_a:
|
202
202
|
for index_ovlp_b in index_overlap_list_b:
|
@@ -204,7 +204,7 @@ def find_best_interpolating_line(args):
|
|
204
204
|
indexes = (np.arange(all_energies.shape[0]))[~np.isnan(index_ovlps)].astype("i")
|
205
205
|
|
206
206
|
index_ovlps = index_ovlps[~np.isnan(index_ovlps)]
|
207
|
-
index_ovlps = np.
|
207
|
+
index_ovlps = np.round(index_ovlps).astype("i")
|
208
208
|
|
209
209
|
diff_enes = all_res[(indexes, index_ovlps)]
|
210
210
|
orig_enes = all_energies[(indexes, index_ovlps)]
|
@@ -313,13 +313,12 @@ def main(user_args=None):
|
|
313
313
|
and this is not enough to do correlation + interpolation between sections
|
314
314
|
"""
|
315
315
|
raise RuntimeError(message)
|
316
|
-
|
317
|
-
|
318
|
-
message = f""" The diagnostics collection has probably been run over a too thin section of the scan
|
316
|
+
elif n_pairings_with_data < 1:
|
317
|
+
message = f""" The diagnostics collection has probably been run over a too thin section of the scan
|
319
318
|
or you scan does not allow to form pairs of theta, theta+360. I only found {n_pairings_with_data}
|
320
319
|
pairings
|
321
320
|
"""
|
322
|
-
|
321
|
+
raise RuntimeError(message)
|
323
322
|
|
324
323
|
# all_merits, all_energies, all_z_transls = zip( result_list )
|
325
324
|
|
@@ -345,15 +344,15 @@ def main(user_args=None):
|
|
345
344
|
|
346
345
|
def do_height_by_height(args, overlap_list, all_diff, all_energies, all_z_transl):
|
347
346
|
# now we find the best cor for each chunk, or nan if no overlap is found
|
348
|
-
z_a = np.min(all_z_transl)
|
349
|
-
z_b = np.max(all_z_transl)
|
347
|
+
# z_a = np.min(all_z_transl)
|
348
|
+
# z_b = np.max(all_z_transl)
|
350
349
|
|
351
350
|
grouped_diff = {}
|
352
351
|
grouped_energy = {}
|
353
352
|
|
354
353
|
for diff, energy, z in zip(all_diff, all_energies, all_z_transl):
|
355
354
|
found = z
|
356
|
-
for key in grouped_diff
|
355
|
+
for key in grouped_diff:
|
357
356
|
if abs(key - z) < 2.0: # these are in pixel units
|
358
357
|
found = key
|
359
358
|
break
|
@@ -11,14 +11,26 @@ from .utils import parse_params_values
|
|
11
11
|
|
12
12
|
class DoubleFlatFieldChunks:
|
13
13
|
def __init__(
|
14
|
-
self,
|
14
|
+
self,
|
15
|
+
dataset_path,
|
16
|
+
output_file,
|
17
|
+
dataset_info=None,
|
18
|
+
chunk_size=100,
|
19
|
+
sigma=None,
|
20
|
+
do_flatfield=True,
|
21
|
+
h5_entry=None,
|
22
|
+
logger=None,
|
15
23
|
):
|
16
24
|
self.logger = LoggerOrPrint(logger)
|
17
|
-
self.dataset_info = analyze_dataset(dataset_path, extra_options={"hdf5_entry": h5_entry}, logger=logger)
|
18
|
-
self.chunk_size = min(chunk_size, self.dataset_info.radio_dims[-1])
|
19
25
|
self.do_flatfield = bool(do_flatfield)
|
20
|
-
if
|
21
|
-
|
26
|
+
if dataset_info is not None:
|
27
|
+
self.dataset_info = dataset_info
|
28
|
+
else:
|
29
|
+
self.dataset_info = analyze_dataset(dataset_path, extra_options={"hdf5_entry": h5_entry}, logger=logger)
|
30
|
+
if self.do_flatfield:
|
31
|
+
update_dataset_info_flats_darks(self.dataset_info, flatfield_mode=True)
|
32
|
+
|
33
|
+
self.chunk_size = min(chunk_size, self.dataset_info.radio_dims[-1])
|
22
34
|
self.output_file = output_file
|
23
35
|
self.sigma = sigma if sigma is not None and abs(sigma) > 1e-5 else None
|
24
36
|
|
@@ -103,6 +115,7 @@ class DoubleFlatFieldChunks:
|
|
103
115
|
)
|
104
116
|
writer.write(arr, "double_flatfield", config=self._get_config())
|
105
117
|
self.logger.info("Wrote %s" % writer.fname)
|
118
|
+
return writer.fname
|
106
119
|
|
107
120
|
|
108
121
|
def dff_cli():
|
@@ -0,0 +1,75 @@
|
|
1
|
+
from os import path
|
2
|
+
from multiprocessing.pool import ThreadPool
|
3
|
+
|
4
|
+
from ..utils import get_num_threads
|
5
|
+
from ..resources.nxflatfield import update_dataset_info_flats_darks
|
6
|
+
from ..resources.logger import LoggerOrPrint
|
7
|
+
from ..resources.dataset_analyzer import analyze_dataset
|
8
|
+
from ..preproc.ccd import CCDFilter
|
9
|
+
from ..pipeline.config_validators import convert_to_bool
|
10
|
+
from ..pipeline.estimators import TranslationsEstimator
|
11
|
+
from .utils import parse_params_values
|
12
|
+
from .cli_configs import EstimateMotionConfig
|
13
|
+
|
14
|
+
|
15
|
+
def estimate_motion():
|
16
|
+
args = parse_params_values(
|
17
|
+
EstimateMotionConfig,
|
18
|
+
parser_description="Estimate sample motion and generate 'translation_movements_file' for nabu config file. ",
|
19
|
+
)
|
20
|
+
try:
|
21
|
+
rot_center = float(args["rot_center"])
|
22
|
+
except (ValueError, TypeError):
|
23
|
+
rot_center = None
|
24
|
+
|
25
|
+
logger = LoggerOrPrint(None)
|
26
|
+
dataset_info = analyze_dataset(args["dataset"], logger=logger)
|
27
|
+
do_ff = args["flatfield"]
|
28
|
+
|
29
|
+
if do_ff:
|
30
|
+
update_dataset_info_flats_darks(dataset_info, True, loading_mode="load_if_present")
|
31
|
+
|
32
|
+
radios_filter = None
|
33
|
+
do_ccd_filter = args["ccd_filter_size"] > 0
|
34
|
+
if do_ccd_filter:
|
35
|
+
radios_filter_obj = CCDFilter(
|
36
|
+
dataset_info.radio_dims[::-1],
|
37
|
+
kernel_size=args["ccd_filter_size"],
|
38
|
+
median_clip_thresh=args["ccd_filter_threshold"],
|
39
|
+
)
|
40
|
+
|
41
|
+
def radios_filter(images):
|
42
|
+
def _apply_median_clip(img):
|
43
|
+
radios_filter_obj.median_clip_correction(img, output=img)
|
44
|
+
|
45
|
+
with ThreadPool(get_num_threads()) as tp:
|
46
|
+
tp.map(_apply_median_clip, images)
|
47
|
+
|
48
|
+
est = TranslationsEstimator(
|
49
|
+
dataset_info,
|
50
|
+
do_flatfield=do_ff,
|
51
|
+
rot_center=rot_center,
|
52
|
+
angular_subsampling=args["subsampling"],
|
53
|
+
deg_xy=args["deg_xy"],
|
54
|
+
deg_z=args["deg_z"],
|
55
|
+
shifts_estimator="phase_cross_correlation",
|
56
|
+
radios_filter=radios_filter,
|
57
|
+
extra_options={"window_size": args["win_size"]},
|
58
|
+
)
|
59
|
+
|
60
|
+
estimated_shifts_h, estimated_shifts_v, cor = est.estimate_motion()
|
61
|
+
if convert_to_bool(args["verbose"]):
|
62
|
+
err_vu = est.motion_estimator.get_max_fit_error(cor=rot_center)
|
63
|
+
logger.info("Max fit error in 'u': %.2f pix \t\t Max fit error in 'v': %.2f pix" % (err_vu[1], err_vu[0]))
|
64
|
+
est.motion_estimator.plot_detector_shifts(cor=rot_center)
|
65
|
+
est.motion_estimator.plot_movements(cor=rot_center, angles_rad=dataset_info.rotation_angles)
|
66
|
+
|
67
|
+
out_file = args["output_file"]
|
68
|
+
est.generate_translations_movements_file(filename=out_file, only=args["only"] or None)
|
69
|
+
logger.info(
|
70
|
+
f"Wrote {out_file} - use 'translation_movements_file = {path.abspath(out_file)}' in nabu configuration file to correct for sample movements in the reconstruction'"
|
71
|
+
)
|
72
|
+
|
73
|
+
|
74
|
+
if __name__ == "__main__":
|
75
|
+
estimate_motion()
|