Commit aca6ca84 authored by Zhang, Chen's avatar Zhang, Chen
Browse files

follow naming convention

parent d2410fef
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -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:
+16 −17
Original line number Diff line number Diff line
@@ -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.

@@ -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,
@@ -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)
@@ -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