tomopy/tomopy

View on GitHub

Showing 176 of 354 total issues

Function retrieve_phase has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

def retrieve_phase(
Severity: Major
Found in source/tomopy/prep/phase.py - About 1 hr to fix

    Function c_median_filt3d_float32 has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def c_median_filt3d_float32(
    Severity: Major
    Found in source/tomopy/util/extern/misc.py - About 1 hr to fix

      Function init_shared has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def init_shared(
      Severity: Major
      Found in source/tomopy/util/mproc.py - About 1 hr to fix

        Function _dist_recon has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def _dist_recon(tomo, center, recon, algorithm, args, kwargs, ncore, nchunk):
        Severity: Major
        Found in source/tomopy/recon/algorithm.py - About 1 hr to fix

          Function normalize_nf has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def normalize_nf(
          Severity: Major
          Found in source/tomopy/prep/normalize.py - About 1 hr to fix

            Function distribute_jobs has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def distribute_jobs(arr,
            Severity: Major
            Found in source/tomopy/util/mproc.py - About 1 hr to fix

              Function c_median_filt3d_uint16 has 8 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def c_median_filt3d_uint16(
              Severity: Major
              Found in source/tomopy/util/extern/misc.py - About 1 hr to fix

                Function _find_center_cost has 8 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def _find_center_cost(
                Severity: Major
                Found in source/tomopy/recon/rotation.py - About 1 hr to fix

                  Function find_center has 8 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def find_center(
                  Severity: Major
                  Found in source/tomopy/recon/rotation.py - About 1 hr to fix

                    Function c_stripes_detect3d has 8 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def c_stripes_detect3d(
                    Severity: Major
                    Found in source/tomopy/util/extern/prep.py - About 1 hr to fix

                      Function c_sample has 8 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def c_sample(
                      Severity: Major
                      Found in source/tomopy/util/extern/misc.py - About 1 hr to fix

                        Function project has 8 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def project(
                        Severity: Major
                        Found in source/tomopy/sim/project.py - About 1 hr to fix

                          Function remove_ring has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def remove_ring(
                              rec,
                              center_x=None,
                              center_y=None,
                              thresh=300.0,
                          Severity: Minor
                          Found in source/tomopy/misc/corr.py - About 55 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function trim_sinogram has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def trim_sinogram(data, center, x, y, diameter):
                              """
                              Provide sinogram corresponding to a circular region of interest
                              by trimming the complete sinogram of a compact object.
                          
                          
                          Severity: Minor
                          Found in source/tomopy/misc/morph.py - About 55 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function main has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def main(args):
                          
                              print("using tomopy: {}".format(tomopy.__file__))
                          
                              global image_quality
                          Severity: Minor
                          Found in benchmarking/phantom.py - About 55 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function remove_large_stripe has 7 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def remove_large_stripe(tomo,
                          Severity: Major
                          Found in source/tomopy/prep/stripe.py - About 50 mins to fix

                            Function _run_accel_algorithm has 7 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def _run_accel_algorithm(idx, _func, tomo, center, recon, *_args, **_kwargs):
                            Severity: Major
                            Found in source/tomopy/recon/algorithm.py - About 50 mins to fix

                              Function remove_stripe_based_interpolation has 7 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              def remove_stripe_based_interpolation(tomo,
                              Severity: Major
                              Found in source/tomopy/prep/stripe.py - About 50 mins to fix

                                Function remove_all_stripe has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                def remove_all_stripe(tomo,
                                Severity: Major
                                Found in source/tomopy/prep/stripe.py - About 50 mins to fix

                                  Function inpainter_morph has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  def inpainter_morph(
                                  Severity: Major
                                  Found in source/tomopy/misc/corr.py - About 50 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language