nabu 2024.1.2__tar.gz → 2024.1.3__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.1.2/nabu.egg-info → nabu-2024.1.3}/PKG-INFO +22 -2
- nabu-2024.1.3/doc/doc_config.py +32 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/__init__.py +1 -1
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/rings_cuda.py +25 -10
- {nabu-2024.1.2 → nabu-2024.1.3/nabu.egg-info}/PKG-INFO +22 -2
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu.egg-info/SOURCES.txt +33 -2
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu.egg-info/top_level.txt +0 -1
- nabu-2024.1.3/sandbox/align_test.py +61 -0
- nabu-2024.1.3/sandbox/app.py +123 -0
- nabu-2024.1.3/sandbox/binning_cython.py +37 -0
- nabu-2024.1.3/sandbox/circ_sm.py +195 -0
- nabu-2024.1.3/sandbox/composite_image.py +90 -0
- nabu-2024.1.3/sandbox/convert_id15.py +148 -0
- nabu-2024.1.3/sandbox/do_test_ctf.py +40 -0
- nabu-2024.1.3/sandbox/esrf_envs.py +36 -0
- nabu-2024.1.3/sandbox/fbp_polar.py +39 -0
- nabu-2024.1.3/sandbox/fbp_tilt.py +340 -0
- nabu-2024.1.3/sandbox/interleaved.py +129 -0
- nabu-2024.1.3/sandbox/interp_sinos_halftomo.py +31 -0
- nabu-2024.1.3/sandbox/linear_interp.py +14 -0
- nabu-2024.1.3/sandbox/merge_recs.py +56 -0
- nabu-2024.1.3/sandbox/moduleutils.py +50 -0
- nabu-2024.1.3/sandbox/nbreconstruct.py +246 -0
- nabu-2024.1.3/sandbox/pag_margin.py +38 -0
- nabu-2024.1.3/sandbox/parse.py +132 -0
- nabu-2024.1.3/sandbox/plot.py +49 -0
- nabu-2024.1.3/sandbox/proj3D.py +75 -0
- nabu-2024.1.3/sandbox/rec_bm05.py +71 -0
- nabu-2024.1.3/sandbox/rec_thread.py +133 -0
- nabu-2024.1.3/sandbox/shift_bilinear2.py +42 -0
- nabu-2024.1.3/sandbox/sinotilt.py +181 -0
- nabu-2024.1.3/sandbox/sysutils.py +63 -0
- nabu-2024.1.3/sandbox/test_mp_queue.py +73 -0
- nabu-2024.1.3/sandbox/tilt.py +251 -0
- nabu-2024.1.3/sandbox/utils.py +54 -0
- nabu-2024.1.3/sandbox/vo.py +204 -0
- nabu-2024.1.3/sandbox/workers.py +123 -0
- nabu-2024.1.3/sandbox/xrdrec_pyFAI_data.py +212 -0
- nabu-2024.1.2/nabu/thirdparty/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/LICENSE +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/README.md +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/doc/conf.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/doc/create_conf_doc.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/doc/get_mathjax.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/bootstrap.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/bootstrap_stitching.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/cast_volume.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/cli_configs.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/compare_volumes.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/composite_cor.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/correct_rot.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/create_distortion_map_from_poly.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/diag_to_pix.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/diag_to_rot.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/double_flatfield.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/generate_header.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/histogram.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/multicor.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/nx_z_splitter.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/parse_reconstruction_log.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/prepare_weights_double.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/reconstruct.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/reconstruct_helical.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/reduce_dark_flat.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/rotate.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/shrink_dataset.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/stitching.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/tests/test_reduce_dark_flat.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/utils.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/app/validator.py +0 -0
- {nabu-2024.1.2/nabu/app/tests → nabu-2024.1.3/nabu/cuda}/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/convolution.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/fft.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/kernel.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/medfilt.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/padding.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/processing.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/src/ElementOp.cu +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/src/backproj.cu +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/src/backproj_polar.cu +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/src/boundary.h +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/src/convolution.cu +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/src/dfi_fftshift.cu +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/src/flatfield.cu +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/src/fourier_wavelets.cu +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/src/halftomo.cu +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/src/helical_padding.cu +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/src/histogram.cu +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/src/interpolation.cu +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/src/medfilt.cu +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/src/normalization.cu +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/src/padding.cu +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/src/proj.cu +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/src/rotation.cu +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/src/transpose.cu +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/tests/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/cuda/utils.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/estimation/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/estimation/alignment.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/estimation/cor.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/estimation/cor_sino.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/estimation/distortion.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/estimation/focus.py +0 -0
- {nabu-2024.1.2/nabu/cuda → nabu-2024.1.3/nabu/estimation/tests}/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/estimation/tests/test_alignment.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/estimation/tests/test_cor.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/estimation/tests/test_focus.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/estimation/tests/test_tilt.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/estimation/tests/test_translation.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/estimation/tilt.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/estimation/translation.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/estimation/utils.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/io/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/io/cast_volume.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/io/detector_distortion.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/io/reader.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/io/reader_helical.py +0 -0
- {nabu-2024.1.2/nabu/estimation → nabu-2024.1.3/nabu/io}/tests/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/io/tests/test_cast_volume.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/io/tests/test_detector_distortion.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/io/tests/test_writers.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/io/tiffwriter_zmm.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/io/utils.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/io/writer.py +0 -0
- {nabu-2024.1.2/nabu/io/tests → nabu-2024.1.3/nabu/misc}/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/binning.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/fftshift.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/filters.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/fourier_filters.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/histogram.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/histogram_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/kernel_base.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/padding.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/padding_base.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/processing_base.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/rotation.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/rotation_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/tests/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/tests/test_binning.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/tests/test_interpolation.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/transpose.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/unsharp.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/unsharp_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/unsharp_opencl.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/misc/utils.py +0 -0
- {nabu-2024.1.2/nabu/misc → nabu-2024.1.3/nabu/opencl}/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/opencl/fft.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/opencl/kernel.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/opencl/memcpy.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/opencl/padding.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/opencl/processing.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/opencl/src/ElementOp.cl +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/opencl/src/backproj.cl +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/opencl/src/fftshift.cl +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/opencl/src/halftomo.cl +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/opencl/src/padding.cl +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/opencl/src/roll.cl +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/opencl/src/transpose.cl +0 -0
- {nabu-2024.1.2/nabu/opencl → nabu-2024.1.3/nabu/opencl/tests}/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/opencl/utils.py +0 -0
- {nabu-2024.1.2/nabu/opencl/tests → nabu-2024.1.3/nabu/pipeline}/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/config.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/config_validators.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/datadump.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/dataset_validator.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/detector_distortion_provider.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/estimators.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/fallback_utils.py +0 -0
- {nabu-2024.1.2/nabu/pipeline → nabu-2024.1.3/nabu/pipeline/fullfield}/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/fullfield/chunked.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/fullfield/chunked_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/fullfield/computations.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/fullfield/dataset_validator.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/fullfield/nabu_config.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/fullfield/processconfig.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/fullfield/reconstruction.py +0 -0
- {nabu-2024.1.2/nabu/pipeline/fullfield → nabu-2024.1.3/nabu/pipeline/helical}/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/helical/dataset_validator.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/helical/fbp.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/helical/filtering.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/helical/gridded_accumulator.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/helical/helical_chunked_regridded.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/helical/helical_chunked_regridded_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/helical/helical_reconstruction.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/helical/helical_utils.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/helical/nabu_config.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/helical/processconfig.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/helical/span_strategy.py +0 -0
- {nabu-2024.1.2/nabu/pipeline/helical → nabu-2024.1.3/nabu/pipeline/helical/tests}/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/helical/tests/test_accumulator.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/helical/tests/test_pipeline_elements_full.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/helical/tests/test_strategy.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/helical/utils.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/helical/weight_balancer.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/params.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/processconfig.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/tests/test_chunk_reader.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/tests/test_estimators.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/utils.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/pipeline/writer.py +0 -0
- {nabu-2024.1.2/nabu/pipeline/helical/tests → nabu-2024.1.3/nabu/pipeline/xrdct}/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/alignment.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/ccd.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/ccd_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/ctf.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/ctf_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/distortion.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/double_flatfield.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/double_flatfield_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/double_flatfield_variable_region.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/flatfield.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/flatfield_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/flatfield_variable_region.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/phase.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/phase_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/shift.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/shift_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/tests/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/tests/test_ccd_corr.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/tests/test_ctf.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/tests/test_double_flatfield.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/tests/test_flatfield.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/tests/test_paganin.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/preproc/tests/test_vshift.py +0 -0
- {nabu-2024.1.2/nabu/pipeline/xrdct → nabu-2024.1.3/nabu/processing}/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/convolution_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/fft_base.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/fft_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/fft_opencl.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/fftshift.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/histogram.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/histogram_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/kernel_base.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/medfilt_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/muladd.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/muladd_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/padding_base.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/padding_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/padding_opencl.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/processing_base.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/roll_opencl.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/rotation.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/rotation_cuda.py +0 -0
- {nabu-2024.1.2/nabu/processing → nabu-2024.1.3/nabu/processing/tests}/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/tests/test_fft.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/tests/test_fftshift.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/tests/test_histogram.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/tests/test_medfilt.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/tests/test_muladd.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/tests/test_padding.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/tests/test_roll.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/tests/test_rotation.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/tests/test_transpose.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/tests/test_unsharp.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/transpose.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/unsharp.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/unsharp_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/processing/unsharp_opencl.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/cone.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/fbp.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/fbp_base.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/fbp_opencl.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/filtering.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/filtering_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/filtering_opencl.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/projection.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/reconstructor.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/reconstructor_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/rings.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/sinogram.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/sinogram_cuda.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/sinogram_opencl.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/tests/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/tests/test_cone.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/tests/test_deringer.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/tests/test_fbp.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/tests/test_filtering.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/tests/test_halftomo.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/tests/test_projector.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/tests/test_reconstructor.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/reconstruction/tests/test_sino_normalization.py +0 -0
- {nabu-2024.1.2/nabu/processing/tests → nabu-2024.1.3/nabu/resources}/__init__.py +0 -0
- {nabu-2024.1.2/nabu/resources → nabu-2024.1.3/nabu/resources/cli}/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/resources/cor.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/resources/dataset_analyzer.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/resources/gpu.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/resources/logger.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/resources/nxflatfield.py +0 -0
- {nabu-2024.1.2/nabu/resources/cli → nabu-2024.1.3/nabu/resources/templates}/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/resources/templates/bm05_pag.conf +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/resources/templates/id16_ctf.conf +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/resources/templates/id16_holo.conf +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/resources/templates/id19_pag.conf +0 -0
- {nabu-2024.1.2/nabu/resources/templates → nabu-2024.1.3/nabu/resources/tests}/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/resources/tests/test_nxflatfield.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/resources/tests/test_units.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/resources/utils.py +0 -0
- {nabu-2024.1.2/nabu/resources/tests → nabu-2024.1.3/nabu/stitching}/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/stitching/alignment.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/stitching/config.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/stitching/definitions.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/stitching/frame_composition.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/stitching/overlap.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/stitching/sample_normalization.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/stitching/slurm_utils.py +0 -0
- {nabu-2024.1.2/nabu/stitching → nabu-2024.1.3/nabu/stitching/tests}/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/stitching/tests/test_alignment.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/stitching/tests/test_config.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/stitching/tests/test_frame_composition.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/stitching/tests/test_overlap.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/stitching/tests/test_sample_normalization.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/stitching/tests/test_slurm_utils.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/stitching/tests/test_utils.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/stitching/tests/test_z_stitching.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/stitching/utils.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/stitching/z_stitching.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/tests.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/testutils.py +0 -0
- {nabu-2024.1.2/nabu/stitching/tests → nabu-2024.1.3/nabu/thirdparty}/__init__.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/thirdparty/algotom_convert_sino.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/thirdparty/pore3d_deringer_munch.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/thirdparty/tomocupy_remove_stripe.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/thirdparty/tomopy_phase.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/thirdparty/tomwer_load_flats_darks.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu/utils.py +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu.egg-info/dependency_links.txt +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu.egg-info/entry_points.txt +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/nabu.egg-info/requires.txt +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/pyproject.toml +0 -0
- {nabu-2024.1.2 → nabu-2024.1.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nabu
|
3
|
-
Version: 2024.1.
|
3
|
+
Version: 2024.1.3
|
4
4
|
Summary: Nabu - Tomography software
|
5
5
|
Author-email: Pierre Paleo <pierre.paleo@esrf.fr>, Henri Payno <henri.payno@esrf.fr>, Alessandro Mirone <mirone@esrf.fr>, Jérôme Lesaint <jerome.lesaint@esrf.fr>
|
6
6
|
Maintainer-email: Pierre Paleo <pierre.paleo@esrf.fr>
|
@@ -48,9 +48,29 @@ Classifier: Topic :: Scientific/Engineering :: Physics
|
|
48
48
|
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
|
49
49
|
Requires-Python: >=3.7
|
50
50
|
Description-Content-Type: text/markdown
|
51
|
+
License-File: LICENSE
|
52
|
+
Requires-Dist: numpy>1.9.0
|
53
|
+
Requires-Dist: scipy
|
54
|
+
Requires-Dist: h5py>=3.0
|
55
|
+
Requires-Dist: silx>=0.15.0
|
56
|
+
Requires-Dist: tomoscan>=2.0.4
|
57
|
+
Requires-Dist: psutil
|
58
|
+
Requires-Dist: pytest
|
59
|
+
Requires-Dist: tifffile
|
51
60
|
Provides-Extra: full
|
61
|
+
Requires-Dist: scikit-image; extra == "full"
|
62
|
+
Requires-Dist: PyWavelets; extra == "full"
|
63
|
+
Requires-Dist: glymur; extra == "full"
|
64
|
+
Requires-Dist: pycuda; extra == "full"
|
65
|
+
Requires-Dist: scikit-cuda; extra == "full"
|
66
|
+
Requires-Dist: pycudwt; extra == "full"
|
67
|
+
Requires-Dist: sluurp>=0.3; extra == "full"
|
68
|
+
Requires-Dist: pyvkfft; extra == "full"
|
52
69
|
Provides-Extra: doc
|
53
|
-
|
70
|
+
Requires-Dist: sphinx; extra == "doc"
|
71
|
+
Requires-Dist: cloud_sptheme; extra == "doc"
|
72
|
+
Requires-Dist: myst-parser; extra == "doc"
|
73
|
+
Requires-Dist: nbsphinx; extra == "doc"
|
54
74
|
|
55
75
|
# Nabu
|
56
76
|
|
@@ -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)
|
@@ -174,10 +174,15 @@ class CudaMunchDeringer(MunchDeringer):
|
|
174
174
|
self._fft_plans[level].ifft(d_coeffs_f, output=d_coeffs)
|
175
175
|
|
176
176
|
def _destripe_2D(self, d_sino, output):
|
177
|
+
if not (d_sino.flags.c_contiguous):
|
178
|
+
sino = self.cuda_processing.allocate_array("_d_sino", d_sino.shape, np.float32)
|
179
|
+
sino[:] = d_sino[:]
|
180
|
+
else:
|
181
|
+
sino = d_sino
|
177
182
|
if self.padding is not None:
|
178
|
-
|
183
|
+
sino = self.padder.pad(sino)
|
179
184
|
# set the "image" for DWT (memcpy D2D)
|
180
|
-
self._d_sino.set(
|
185
|
+
self._d_sino.set(sino)
|
181
186
|
# perform forward DWT
|
182
187
|
self.cudwt.forward()
|
183
188
|
for i in range(self.cudwt.levels):
|
@@ -256,9 +261,10 @@ class CudaSinoMeanDeringer(SinoMeanDeringer):
|
|
256
261
|
filename=get_cuda_srcfile("normalization.cu"),
|
257
262
|
signature="PPiii",
|
258
263
|
)
|
259
|
-
self._mean_kernel_block = (32, 1,
|
260
|
-
self._mean_kernel_grid = [updiv(
|
261
|
-
self._mean_kernel_args = [self.d_sino_profile, np.int32(self.n_x), np.int32(self.n_angles), np.int32(
|
264
|
+
self._mean_kernel_block = (32, 1, 1)
|
265
|
+
self._mean_kernel_grid = [updiv(self.sinos_shape[-1], self._mean_kernel_block[0]), 1, 1]
|
266
|
+
self._mean_kernel_args = [self.d_sino_profile, np.int32(self.n_x), np.int32(self.n_angles), np.int32(1)]
|
267
|
+
|
262
268
|
self._mean_kernel_kwargs = {
|
263
269
|
"grid": self._mean_kernel_grid,
|
264
270
|
"block": self._mean_kernel_block,
|
@@ -270,9 +276,11 @@ class CudaSinoMeanDeringer(SinoMeanDeringer):
|
|
270
276
|
signature="PPiii",
|
271
277
|
options=["-DGENERIC_OP=%d" % (3 if self.mode == "divide" else 1)],
|
272
278
|
)
|
273
|
-
self._op_kernel_block = (16, 16,
|
274
|
-
self._op_kernel_grid = [updiv(a, b) for a, b in zip(self.sinos_shape[::-1], self._op_kernel_block)]
|
275
|
-
|
279
|
+
self._op_kernel_block = (16, 16, 1)
|
280
|
+
self._op_kernel_grid = [updiv(a, b) for a, b in zip(self.sinos_shape[1:][::-1], self._op_kernel_block[:-1])] + [
|
281
|
+
1
|
282
|
+
]
|
283
|
+
self._op_kernel_args = [self.d_sino_profile, np.int32(self.n_x), np.int32(self.n_angles), np.int32(1)]
|
276
284
|
self._op_kernel_kwargs = {
|
277
285
|
"grid": self._op_kernel_grid,
|
278
286
|
"block": self._op_kernel_block,
|
@@ -312,9 +320,16 @@ class CudaSinoMeanDeringer(SinoMeanDeringer):
|
|
312
320
|
if output is not None:
|
313
321
|
raise NotImplementedError
|
314
322
|
#
|
315
|
-
|
323
|
+
if not (sino.flags.c_contiguous):
|
324
|
+
d_sino = self.processing.allocate_array("d_sino", sino.shape, np.float32)
|
325
|
+
d_sino[:] = sino[:]
|
326
|
+
else:
|
327
|
+
d_sino = sino
|
328
|
+
self._mean_kernel(d_sino, *self._mean_kernel_args, **self._mean_kernel_kwargs)
|
316
329
|
self._apply_filter(self.d_sino_profile)
|
317
|
-
self._op_kernel(
|
330
|
+
self._op_kernel(d_sino, *self._op_kernel_args, **self._op_kernel_kwargs)
|
331
|
+
if not (sino.flags.c_contiguous):
|
332
|
+
sino[:] = self.processing.d_sino[:]
|
318
333
|
return sino
|
319
334
|
|
320
335
|
def remove_rings_sinograms(self, sinograms):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nabu
|
3
|
-
Version: 2024.1.
|
3
|
+
Version: 2024.1.3
|
4
4
|
Summary: Nabu - Tomography software
|
5
5
|
Author-email: Pierre Paleo <pierre.paleo@esrf.fr>, Henri Payno <henri.payno@esrf.fr>, Alessandro Mirone <mirone@esrf.fr>, Jérôme Lesaint <jerome.lesaint@esrf.fr>
|
6
6
|
Maintainer-email: Pierre Paleo <pierre.paleo@esrf.fr>
|
@@ -48,9 +48,29 @@ Classifier: Topic :: Scientific/Engineering :: Physics
|
|
48
48
|
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
|
49
49
|
Requires-Python: >=3.7
|
50
50
|
Description-Content-Type: text/markdown
|
51
|
+
License-File: LICENSE
|
52
|
+
Requires-Dist: numpy>1.9.0
|
53
|
+
Requires-Dist: scipy
|
54
|
+
Requires-Dist: h5py>=3.0
|
55
|
+
Requires-Dist: silx>=0.15.0
|
56
|
+
Requires-Dist: tomoscan>=2.0.4
|
57
|
+
Requires-Dist: psutil
|
58
|
+
Requires-Dist: pytest
|
59
|
+
Requires-Dist: tifffile
|
51
60
|
Provides-Extra: full
|
61
|
+
Requires-Dist: scikit-image; extra == "full"
|
62
|
+
Requires-Dist: PyWavelets; extra == "full"
|
63
|
+
Requires-Dist: glymur; extra == "full"
|
64
|
+
Requires-Dist: pycuda; extra == "full"
|
65
|
+
Requires-Dist: scikit-cuda; extra == "full"
|
66
|
+
Requires-Dist: pycudwt; extra == "full"
|
67
|
+
Requires-Dist: sluurp>=0.3; extra == "full"
|
68
|
+
Requires-Dist: pyvkfft; extra == "full"
|
52
69
|
Provides-Extra: doc
|
53
|
-
|
70
|
+
Requires-Dist: sphinx; extra == "doc"
|
71
|
+
Requires-Dist: cloud_sptheme; extra == "doc"
|
72
|
+
Requires-Dist: myst-parser; extra == "doc"
|
73
|
+
Requires-Dist: nbsphinx; extra == "doc"
|
54
74
|
|
55
75
|
# Nabu
|
56
76
|
|
@@ -3,6 +3,7 @@ README.md
|
|
3
3
|
pyproject.toml
|
4
4
|
doc/conf.py
|
5
5
|
doc/create_conf_doc.py
|
6
|
+
doc/doc_config.py
|
6
7
|
doc/get_mathjax.py
|
7
8
|
nabu/__init__.py
|
8
9
|
nabu/tests.py
|
@@ -40,7 +41,6 @@ nabu/app/shrink_dataset.py
|
|
40
41
|
nabu/app/stitching.py
|
41
42
|
nabu/app/utils.py
|
42
43
|
nabu/app/validator.py
|
43
|
-
nabu/app/tests/__init__.py
|
44
44
|
nabu/app/tests/test_reduce_dark_flat.py
|
45
45
|
nabu/cuda/__init__.py
|
46
46
|
nabu/cuda/convolution.py
|
@@ -296,4 +296,35 @@ nabu/thirdparty/algotom_convert_sino.py
|
|
296
296
|
nabu/thirdparty/pore3d_deringer_munch.py
|
297
297
|
nabu/thirdparty/tomocupy_remove_stripe.py
|
298
298
|
nabu/thirdparty/tomopy_phase.py
|
299
|
-
nabu/thirdparty/tomwer_load_flats_darks.py
|
299
|
+
nabu/thirdparty/tomwer_load_flats_darks.py
|
300
|
+
sandbox/align_test.py
|
301
|
+
sandbox/app.py
|
302
|
+
sandbox/binning_cython.py
|
303
|
+
sandbox/circ_sm.py
|
304
|
+
sandbox/composite_image.py
|
305
|
+
sandbox/convert_id15.py
|
306
|
+
sandbox/do_test_ctf.py
|
307
|
+
sandbox/esrf_envs.py
|
308
|
+
sandbox/fbp_polar.py
|
309
|
+
sandbox/fbp_tilt.py
|
310
|
+
sandbox/interleaved.py
|
311
|
+
sandbox/interp_sinos_halftomo.py
|
312
|
+
sandbox/linear_interp.py
|
313
|
+
sandbox/merge_recs.py
|
314
|
+
sandbox/moduleutils.py
|
315
|
+
sandbox/nbreconstruct.py
|
316
|
+
sandbox/pag_margin.py
|
317
|
+
sandbox/parse.py
|
318
|
+
sandbox/plot.py
|
319
|
+
sandbox/proj3D.py
|
320
|
+
sandbox/rec_bm05.py
|
321
|
+
sandbox/rec_thread.py
|
322
|
+
sandbox/shift_bilinear2.py
|
323
|
+
sandbox/sinotilt.py
|
324
|
+
sandbox/sysutils.py
|
325
|
+
sandbox/test_mp_queue.py
|
326
|
+
sandbox/tilt.py
|
327
|
+
sandbox/utils.py
|
328
|
+
sandbox/vo.py
|
329
|
+
sandbox/workers.py
|
330
|
+
sandbox/xrdrec_pyFAI_data.py
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import numpy as np
|
2
|
+
from nabu.estimation.translation import DetectorTranslationAlongBeam
|
3
|
+
from tomoscan.io import HDF5File
|
4
|
+
|
5
|
+
|
6
|
+
def get_data(fname, h5_paths):
|
7
|
+
with HDF5File(fname, "r") as f:
|
8
|
+
align_data = f[h5_paths["align_data"]][()]
|
9
|
+
dark = f[h5_paths["dark"]][0]
|
10
|
+
pixel_size_um = f[h5_paths["pixel_size"]][()]
|
11
|
+
positions_mm = f[h5_paths["positions"]][()]
|
12
|
+
|
13
|
+
# Dark subtraction
|
14
|
+
align_data = align_data - dark.astype("f")
|
15
|
+
|
16
|
+
return align_data, pixel_size_um, positions_mm
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
def get_alignment(align_data, pixel_size_um, positions_mm, plot=True):
|
21
|
+
|
22
|
+
tr_calc = DetectorTranslationAlongBeam()
|
23
|
+
if plot == True:
|
24
|
+
tr_calc.verbose=True
|
25
|
+
|
26
|
+
shifts_v, shifts_h = tr_calc.find_shift(align_data, positions_mm)
|
27
|
+
|
28
|
+
# pixel_size is in microns, motor position is in mm
|
29
|
+
tilt_v_deg = np.rad2deg(np.arctan(shifts_v * pixel_size_um / 1e3))
|
30
|
+
tilt_h_deg = np.rad2deg(np.arctan(shifts_h * pixel_size_um / 1e3))
|
31
|
+
print (f"\nVertical tilt to be applied in deg (thy): {tilt_v_deg}")
|
32
|
+
print (f"Horizontal tilt to be applied in deg (thz): {tilt_h_deg}\n")
|
33
|
+
|
34
|
+
return align_data, shifts_v, shifts_h, positions_mm
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
if __name__ == "__main__":
|
42
|
+
fname = "/data/id19/inhouse/id192201/id19/sample/sample_0001/sample_0001.h5"
|
43
|
+
h5_paths = {
|
44
|
+
"align_data": "11.1/measurement/pcolinux",
|
45
|
+
"dark": "12.1/measurement/pcolinux",
|
46
|
+
"pixel_size": "11.1/instrument/pcolinux/x_pixel_size",
|
47
|
+
"positions": "11.1/measurement/hrxc"
|
48
|
+
}
|
49
|
+
align_data, pixel_size_um, positions_mm = get_data(fname, h5_paths)
|
50
|
+
# align_data, shifts_v, shifts_h, positions_mm = get_alignment(align_data, pixel_size_um, positions_mm)
|
51
|
+
|
52
|
+
D = DetectorTranslationAlongBeam()
|
53
|
+
D. verbose = True
|
54
|
+
sv, sh = D.find_shift(align_data, positions_mm)
|
55
|
+
D.verbose = False
|
56
|
+
sv, sh = D.find_shift(align_data, positions_mm)
|
57
|
+
D.verbose = True
|
58
|
+
sv, sh = D.find_shift(align_data, positions_mm)
|
59
|
+
|
60
|
+
|
61
|
+
|
@@ -0,0 +1,123 @@
|
|
1
|
+
from time import sleep
|
2
|
+
import pycuda.autoinit
|
3
|
+
import pycuda.gpuarray as garray
|
4
|
+
from nabu.resources.processconfig import ProcessConfig
|
5
|
+
from nabu.resources.tasks import build_processing_steps
|
6
|
+
|
7
|
+
from nabu.app.logger import Logger
|
8
|
+
|
9
|
+
from nabu.app.chunkreader import ChunkReaderComponent
|
10
|
+
from nabu.app.flatfield import FlatFieldComponent
|
11
|
+
from nabu.app.phase import PhaseRetrievalComponent
|
12
|
+
from nabu.app.opmap import NegativeLogComponent
|
13
|
+
from nabu.app.ccdfilter import CCDFilterComponent
|
14
|
+
from nabu.app.unsharp import UnsharpMaskComponent
|
15
|
+
from nabu.app.reconstructor import ReconstructorComponent
|
16
|
+
|
17
|
+
|
18
|
+
if __name__ == "__main__":
|
19
|
+
|
20
|
+
conf = ProcessConfig("/home/pierre/workspace/data/nabu.conf")
|
21
|
+
steps, options = build_processing_steps(conf)
|
22
|
+
dataset_infos = conf.dataset_infos
|
23
|
+
SUB_REGION = (None, None, None, 50)
|
24
|
+
|
25
|
+
logger = Logger("nabu_processing", console=True)
|
26
|
+
|
27
|
+
# Read chunk
|
28
|
+
options["read_chunk"]["sub_region"] = SUB_REGION
|
29
|
+
options["read_chunk"]["convert_float"] = True
|
30
|
+
Ch = ChunkReaderComponent(options["read_chunk"], dataset_infos, logger=logger)
|
31
|
+
Ch.execute()
|
32
|
+
radios = Ch.chunk_reader.files_data
|
33
|
+
d_radios = garray.to_gpu(radios)
|
34
|
+
|
35
|
+
# Flat-field
|
36
|
+
options["flatfield"]["sub_region"] = SUB_REGION
|
37
|
+
options["flatfield"]["use_opencl"] = False
|
38
|
+
options["flatfield"]["use_cuda"] = True
|
39
|
+
F = FlatFieldComponent(d_radios, options["flatfield"], dataset_infos, logger=logger)
|
40
|
+
F.execute()
|
41
|
+
|
42
|
+
# CCD filter
|
43
|
+
options["ccd_correction"]["use_cuda"] = True
|
44
|
+
options["ccd_correction"]["use_opencl"] = False
|
45
|
+
CCD = CCDFilterComponent(d_radios, options["ccd_correction"], dataset_infos, logger=logger)
|
46
|
+
CCD.execute()
|
47
|
+
|
48
|
+
|
49
|
+
# Phase retrieval
|
50
|
+
options["phase"]["use_cuda"] = True
|
51
|
+
options["phase"]["use_opencl"] = False
|
52
|
+
P = PhaseRetrievalComponent(radios[0].shape, options["phase"], dataset_infos, logger=logger)
|
53
|
+
P.execute(d_radios)
|
54
|
+
|
55
|
+
# Unsharp
|
56
|
+
# ~ options["unsharp_mask"]["use_cuda"] = True
|
57
|
+
# ~ options["unsharp_mask"]["use_opencl"] = False
|
58
|
+
# ~ U = UnsharpMaskComponent(radios[0].shape, options["unsharp_mask"], dataset_infos, logger=logger)
|
59
|
+
# ~ U.execute(d_radios)
|
60
|
+
|
61
|
+
# -log()
|
62
|
+
options["take_log"]["use_cuda"] = True
|
63
|
+
options["take_log"]["use_opencl"] = False
|
64
|
+
L = NegativeLogComponent(d_radios, options["take_log"], dataset_infos, logger=logger)
|
65
|
+
L.execute()
|
66
|
+
|
67
|
+
|
68
|
+
# Test
|
69
|
+
# ~ from spire.utils import ims
|
70
|
+
# ~ r = d_radios.get()
|
71
|
+
# ~ ims(r[:, 10, :])
|
72
|
+
|
73
|
+
|
74
|
+
# Reconstruction
|
75
|
+
options["reconstruction"]["use_cuda"] = True
|
76
|
+
|
77
|
+
# Test ...
|
78
|
+
if 1:
|
79
|
+
options["reconstruction"]["start_x"] = 100
|
80
|
+
options["reconstruction"]["end_x"] = -100
|
81
|
+
options["reconstruction"]["start_y"] = 100
|
82
|
+
options["reconstruction"]["end_y"] = -100
|
83
|
+
options["reconstruction"]["start_z"] = 0
|
84
|
+
options["reconstruction"]["end_z"] = SUB_REGION[-1]-1
|
85
|
+
d_rec = garray.zeros((50, 1849, 1849), "f") # y
|
86
|
+
#
|
87
|
+
else:
|
88
|
+
d_rec = garray.zeros((SUB_REGION[-1], 2048, 2048), "f")
|
89
|
+
R = ReconstructorComponent(d_radios.shape, options["reconstruction"], dataset_infos, logger=logger)
|
90
|
+
R.execute(d_radios, output=d_rec)
|
91
|
+
|
92
|
+
|
93
|
+
# Write to file
|
94
|
+
rec = d_rec.get()
|
95
|
+
import numpy as np
|
96
|
+
np.save("/home/pierre/tmp/crayon/recs_nabu_vertical.npy", rec)
|
97
|
+
|
98
|
+
"""from nabu.reconstruction.reconstructor_cuda import CudaReconstructor
|
99
|
+
R = CudaReconstructor(
|
100
|
+
radios.shape,
|
101
|
+
[0, 1],
|
102
|
+
vol_type="projections",
|
103
|
+
extra_options={"padding_mode": conf.nabu_config["reconstruction"]["padding_type"]}
|
104
|
+
)
|
105
|
+
d_recs = garray.zeros((1, 2048, 2048), "f")
|
106
|
+
R.reconstruct(d_radios, output=d_recs)
|
107
|
+
recs = d_recs.get()
|
108
|
+
ims(recs[0], cmap="gray")
|
109
|
+
# save
|
110
|
+
import numpy as np
|
111
|
+
np.save("/tmp/rec0.npy", recs[0])
|
112
|
+
"""
|
113
|
+
|
114
|
+
|
115
|
+
"""
|
116
|
+
Notes
|
117
|
+
- If the cuda backend is used at step N, it should also be used at step N+1,
|
118
|
+
|
119
|
+
|
120
|
+
otherwise we have to get() the data
|
121
|
+
|
122
|
+
"""
|
123
|
+
|
@@ -0,0 +1,37 @@
|
|
1
|
+
%%cython --compile-args=-fopenmp --link-args=-fopenmp -a
|
2
|
+
#%%cython -a
|
3
|
+
#cython: embedsignature=True, language_level=3, binding=True
|
4
|
+
#cython: boundscheck=False, wraparound=False, cdivision=True, initializedcheck=False,
|
5
|
+
## This is for developping:
|
6
|
+
## cython: profile=True, warn.undeclared=True, warn.unused=True, warn.unused_result=False, warn.unused_arg=True
|
7
|
+
|
8
|
+
import numpy as np
|
9
|
+
from cython.parallel import prange
|
10
|
+
"""
|
11
|
+
def bin2_cython(float[:, ::1] img):
|
12
|
+
cdef:
|
13
|
+
float[:, ::1] res
|
14
|
+
int i, j, Ny, Nx
|
15
|
+
|
16
|
+
shp = img.shape
|
17
|
+
Ny, Nx = (img.shape[0]//2, img.shape[1]//2)
|
18
|
+
res = np.zeros((Ny, Nx), dtype="f")
|
19
|
+
for i in prange(Ny, nogil=True):
|
20
|
+
for j in range(Nx):
|
21
|
+
res[i, j] = 0.25 * (img[2*i, 2*j] + img[2*i+1, 2*j] + img[2*i, 2*j+1] + img[2*i+1, 2*j+1])
|
22
|
+
return np.asarray(res)
|
23
|
+
"""
|
24
|
+
|
25
|
+
|
26
|
+
def bin2_cython(unsigned short[:, ::1] img):
|
27
|
+
cdef:
|
28
|
+
float[:, ::1] res
|
29
|
+
int i, j, Ny, Nx
|
30
|
+
|
31
|
+
shp = img.shape
|
32
|
+
Ny, Nx = (img.shape[0]//2, img.shape[1]//2)
|
33
|
+
res = np.zeros((Ny, Nx), dtype="f")
|
34
|
+
for i in prange(Ny, nogil=True):
|
35
|
+
for j in range(Nx):
|
36
|
+
res[i, j] = 0.25 * (img[2*i, 2*j] + img[2*i+1, 2*j] + img[2*i, 2*j+1] + img[2*i+1, 2*j+1])
|
37
|
+
return np.asarray(res)
|
@@ -0,0 +1,195 @@
|
|
1
|
+
import numpy as np
|
2
|
+
from multiprocessing.shared_memory import SharedMemory
|
3
|
+
from multiprocessing.pool import ThreadPool
|
4
|
+
from multiprocessing import Pool
|
5
|
+
from itertools import product
|
6
|
+
from functools import partial
|
7
|
+
|
8
|
+
# Constants
|
9
|
+
# Miller index of reflection
|
10
|
+
H = 0
|
11
|
+
# Miller index of reflection
|
12
|
+
K = 4
|
13
|
+
# Number of unit cells per direction
|
14
|
+
N = 32
|
15
|
+
# Defines how many points are needed to describe a single Laue fringe (2 = Nyquist frequency)
|
16
|
+
oversampling = 3
|
17
|
+
|
18
|
+
# Radius of the crystal
|
19
|
+
R = N/2
|
20
|
+
|
21
|
+
# Maximum strain at surface
|
22
|
+
e0 = 0.01
|
23
|
+
# Width of the strain profile below the surface
|
24
|
+
w = 5.
|
25
|
+
|
26
|
+
# Generate real and reciprocal space coordinates
|
27
|
+
n = np.arange(N)
|
28
|
+
m = np.arange(N)
|
29
|
+
h = np.arange(H-0.5, H+0.5, 1./(oversampling*N))
|
30
|
+
k = np.arange(K-0.5, K+0.5, 1./(oversampling*N))
|
31
|
+
|
32
|
+
|
33
|
+
# Displacement of atoms as function of the radius
|
34
|
+
def delta(radius, crystal_radius, strain_width):
|
35
|
+
"""Displacement of atoms as function of the radius"""
|
36
|
+
return 1 + np.tanh((radius - crystal_radius) / strain_width)
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
def circ_numpy_2(N, h, k):
|
41
|
+
R, C = np.indices((N, N))
|
42
|
+
radius = np.sqrt((R - N/2.)**2 + (C - N/2.)**2)
|
43
|
+
support = radius**2 <= (N/2)**2
|
44
|
+
Delta = delta(radius, N/2, w)
|
45
|
+
delta_n = e0 * (n - N/2) * Delta
|
46
|
+
delta_n_n = n + delta_n
|
47
|
+
delta_m_m = delta_n_n.T
|
48
|
+
|
49
|
+
res = np.zeros((h.size, k.size))
|
50
|
+
for hk in product(enumerate(h), enumerate(k)):
|
51
|
+
(i_h, v_h), (i_k, v_k) = hk
|
52
|
+
res[i_h, i_k] = np.abs(np.sum(
|
53
|
+
support * np.exp(2j * np.pi * (v_h*delta_n_n + v_k*delta_m_m))
|
54
|
+
))**2
|
55
|
+
return res
|
56
|
+
|
57
|
+
|
58
|
+
def compute_image_part(my_part, N, h, k):
|
59
|
+
(start_x, end_x), (start_y, end_y) = my_part
|
60
|
+
|
61
|
+
# Retrieve shared arrays
|
62
|
+
my_s_support = SharedMemory(create=False, name="support")
|
63
|
+
my_support = np.ndarray((N, N), dtype=np.float64, buffer=my_s_support.buf)
|
64
|
+
|
65
|
+
my_s_delta_n_n = SharedMemory(create=False, name="delta_n_n")
|
66
|
+
my_delta_n_n = np.ndarray((N, N), dtype=np.float64, buffer=my_s_delta_n_n.buf)
|
67
|
+
my_delta_m_m = my_delta_n_n.T
|
68
|
+
|
69
|
+
my_s_result = SharedMemory(create=False, name="result")
|
70
|
+
my_result = np.ndarray((h.size, k.size), dtype=np.float64, buffer=my_s_result.buf)
|
71
|
+
|
72
|
+
# Compute on a partial set of reciprocal coordinates
|
73
|
+
for i_h, i_k in product(range(start_y, end_y), range(start_x, end_x)):
|
74
|
+
v_h = h[i_h]
|
75
|
+
v_k = k[i_k]
|
76
|
+
my_result[i_h, i_k] = np.abs(np.sum(my_support * np.exp(2j * np.pi * (v_h*my_delta_n_n + v_k*my_delta_m_m))))**2
|
77
|
+
|
78
|
+
|
79
|
+
def circ_mp(N, h, k):
|
80
|
+
R, C = np.indices((N, N))
|
81
|
+
radius = np.sqrt((R - N/2.)**2 + (C - N/2.)**2)
|
82
|
+
# support = radius**2 <= (N/2)**2
|
83
|
+
Delta = delta(radius, N/2, w)
|
84
|
+
delta_n = e0 * (n - N/2) * Delta
|
85
|
+
# delta_n_n = n + delta_n
|
86
|
+
# delta_m_m = delta_n_n.T
|
87
|
+
|
88
|
+
parts_1D = [(0, h.size//2), (h.size//2, h.size)]
|
89
|
+
parts = list(product(parts_1D, parts_1D))
|
90
|
+
|
91
|
+
try:
|
92
|
+
# Create shared arrays
|
93
|
+
s_support = SharedMemory(create=True, size=N*N*np.dtype(np.float64).itemsize, name="support")
|
94
|
+
support = np.ndarray((N, N), dtype=np.float64, buffer=s_support.buf)
|
95
|
+
support[:] = radius**2 <= (N/2)**2
|
96
|
+
|
97
|
+
s_delta_n_n = SharedMemory(create=True, size=support.nbytes, name="delta_n_n")
|
98
|
+
delta_n_n = np.ndarray((N, N), dtype=np.float64, buffer=s_delta_n_n.buf)
|
99
|
+
delta_n_n[:] = n + delta_n
|
100
|
+
|
101
|
+
s_result = SharedMemory(
|
102
|
+
create=True, size=h.size * k.size * np.dtype(np.float64).itemsize, name="result"
|
103
|
+
)
|
104
|
+
result = np.ndarray((h.size, k.size), dtype=np.float64, buffer=s_result.buf)
|
105
|
+
result[:] = 0.
|
106
|
+
|
107
|
+
# Dispatch computations
|
108
|
+
with Pool(4) as p:
|
109
|
+
p.map(partial(compute_image_part, N=N, h=h, k=k), parts)
|
110
|
+
|
111
|
+
finally:
|
112
|
+
res = result.copy()
|
113
|
+
for s_array in [s_support, s_delta_n_n, s_result]:
|
114
|
+
s_array.unlink()
|
115
|
+
|
116
|
+
return res
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
def circ_mt(N, h, k):
|
125
|
+
R, C = np.indices((N, N))
|
126
|
+
radius = np.sqrt((R - N/2.)**2 + (C - N/2.)**2)
|
127
|
+
support = radius**2 <= (N/2)**2
|
128
|
+
Delta = delta(radius, N/2, w)
|
129
|
+
delta_n = e0 * (n - N/2) * Delta
|
130
|
+
delta_n_n = n + delta_n
|
131
|
+
delta_m_m = delta_n_n.T
|
132
|
+
|
133
|
+
parts_1D = [(0, h.size//2), (h.size//2, h.size)]
|
134
|
+
parts = list(product(parts_1D, parts_1D))
|
135
|
+
|
136
|
+
result = np.zeros((h.size, k.size), dtype=np.float64)
|
137
|
+
|
138
|
+
def compute_image_part(my_part):
|
139
|
+
(start_x, end_x), (start_y, end_y) = my_part
|
140
|
+
# Compute on a partial set of reciprocal coordinates
|
141
|
+
for i_h, i_k in product(range(start_y, end_y), range(start_x, end_x)):
|
142
|
+
v_h = h[i_h]
|
143
|
+
v_k = k[i_k]
|
144
|
+
result[i_h, i_k] = np.abs(np.sum(
|
145
|
+
support * np.exp(2j * np.pi * (v_h*delta_n_n + v_k*delta_m_m))
|
146
|
+
))**2
|
147
|
+
|
148
|
+
with ThreadPool(4) as tp:
|
149
|
+
tp.map(compute_image_part, parts)
|
150
|
+
|
151
|
+
|
152
|
+
return result
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
from matplotlib.pyplot import subplots
|
170
|
+
from matplotlib.colors import LogNorm
|
171
|
+
def display(result):
|
172
|
+
"Display the array"
|
173
|
+
fig, ax = subplots()
|
174
|
+
fig.suptitle("Bragg peak")
|
175
|
+
ax.imshow(result.T, extent=(h.min(), h.max(), k.min(), k.max()), norm=LogNorm(), origin = 'lower')
|
176
|
+
ax.set_xlabel('H');
|
177
|
+
ax.set_ylabel('K')
|
178
|
+
ax.set_title("Crystal")
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
def circ_einsum(N, h, k):
|
183
|
+
R, C = np.indices((N, N))
|
184
|
+
radius = np.sqrt((R - N/2.)**2 + (C - N/2.)**2)
|
185
|
+
support = radius**2 <= (N/2)**2
|
186
|
+
Delta = delta(radius, N/2, w)
|
187
|
+
delta_n = e0 * (n - N/2) * Delta
|
188
|
+
delta_n_n = n + delta_n
|
189
|
+
delta_m_m = delta_n_n.T
|
190
|
+
|
191
|
+
tmp1 = np.exp(2j*pi*np.einsum("i,jk", h, delta_n_n))
|
192
|
+
tmp2 = np.exp(2j*pi*np.einsum("i,jk", k, delta_m_m))
|
193
|
+
res = np.abs(np.einsum("jk,ijk,ljk->il", support, tmp1, tmp2))**2
|
194
|
+
|
195
|
+
return res
|