Loading .pre-commit-config.yaml +0 −8 Original line number Diff line number Diff line Loading @@ -29,14 +29,6 @@ repos: hooks: - id: black args: ['--line-length=119'] - repo: https://github.com/PyCQA/flake8 rev: 6.0.0 hooks: - id: flake8 exclude: | (?x)^( ^docs/conf.py )$ - repo: https://github.com/adrienverge/yamllint.git rev: v1.31.0 hooks: Loading src/imars3d/backend/corrections/beamhardening.py→src/imars3d/backend/corrections/beam_hardening.py +16 −17 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ from algotom.prep.correction import beam_hardening_correction as algotom_beam_ha logger = logging.getLogger(__name__) class beam_hardening_correction(param.Parameterized): """Imaging correction for beam hardening. Loading @@ -35,6 +36,7 @@ class beam_hardening_correction(param.Parameterized): np.ndarray The corrected image stack. """ arrays = param.Array( doc="The image stack to be corrected for beam hardening, must be normalized to 0-1.", default=None, Loading Loading @@ -72,9 +74,7 @@ class beam_hardening_correction(param.Parameterized): logger.debug(f"max_worker={self.max_workers}") if params.arrays.ndim == 2: return algotom_beam_hardening_correction( params.arrays, params.q, params.n, params.opt ) return algotom_beam_hardening_correction(params.arrays, params.q, params.n, params.opt) elif params.arrays.ndim == 3: with SharedMemoryManager() as smm: shm = smm.SharedMemory(params.arrays.nbytes) Loading @@ -95,4 +95,3 @@ class beam_hardening_correction(param.Parameterized): return np.array(rst) else: raise ValueError("The input array must be either 2D or 3D.") No newline at end of file Loading
.pre-commit-config.yaml +0 −8 Original line number Diff line number Diff line Loading @@ -29,14 +29,6 @@ repos: hooks: - id: black args: ['--line-length=119'] - repo: https://github.com/PyCQA/flake8 rev: 6.0.0 hooks: - id: flake8 exclude: | (?x)^( ^docs/conf.py )$ - repo: https://github.com/adrienverge/yamllint.git rev: v1.31.0 hooks: Loading
src/imars3d/backend/corrections/beamhardening.py→src/imars3d/backend/corrections/beam_hardening.py +16 −17 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ from algotom.prep.correction import beam_hardening_correction as algotom_beam_ha logger = logging.getLogger(__name__) class beam_hardening_correction(param.Parameterized): """Imaging correction for beam hardening. Loading @@ -35,6 +36,7 @@ class beam_hardening_correction(param.Parameterized): np.ndarray The corrected image stack. """ arrays = param.Array( doc="The image stack to be corrected for beam hardening, must be normalized to 0-1.", default=None, Loading Loading @@ -72,9 +74,7 @@ class beam_hardening_correction(param.Parameterized): logger.debug(f"max_worker={self.max_workers}") if params.arrays.ndim == 2: return algotom_beam_hardening_correction( params.arrays, params.q, params.n, params.opt ) return algotom_beam_hardening_correction(params.arrays, params.q, params.n, params.opt) elif params.arrays.ndim == 3: with SharedMemoryManager() as smm: shm = smm.SharedMemory(params.arrays.nbytes) Loading @@ -95,4 +95,3 @@ class beam_hardening_correction(param.Parameterized): return np.array(rst) else: raise ValueError("The input array must be either 2D or 3D.") No newline at end of file