tomopy/tomopy

View on GitHub

Showing 176 of 354 total issues

Function _retrieve_phase has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

def _retrieve_phase(tomo, phase_filter, px, py, prj, pad):
Severity: Minor
Found in source/tomopy/prep/phase.py - About 45 mins to fix

    Function distortion_correction_proj has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def distortion_correction_proj(tomo, xcenter, ycenter, list_fact,
    Severity: Minor
    Found in source/tomopy/prep/alignment.py - About 45 mins to fix

      Function c_vector has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def c_vector(tomo, center, recon1, recon2, theta, **kwargs):
      Severity: Minor
      Found in source/tomopy/util/extern/recon.py - About 45 mins to fix

        Function _rs_large has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def _rs_large(sinogram, snr, size, matindex, drop_ratio=0.1, norm=True):
        Severity: Minor
        Found in source/tomopy/prep/stripe.py - About 45 mins to fix

          Function _calc_proj_cnrs has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def _calc_proj_cnrs(imgs,
          Severity: Minor
          Found in source/tomopy/prep/alignment.py - About 45 mins to fix

            Function _search_coarse has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def _search_coarse(sino, smin, smax, ratio, drop, ncore=None):
            Severity: Minor
            Found in source/tomopy/recon/rotation.py - About 45 mins to fix

              Function _calculate_metric has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

              def _calculate_metric(shift_col, sino1, sino2, sino3, mask):
                  """
                  Metric calculation.
                  """
                  shift_col = 1.0 * np.squeeze(shift_col)
              Severity: Minor
              Found in source/tomopy/recon/rotation.py - About 45 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 _rs_filter has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def _rs_filter(sinogram, window, listsign, size, dim, pad):
              Severity: Minor
              Found in source/tomopy/prep/stripe.py - About 45 mins to fix

                Function pad has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def pad(arr, axis, npad=None, mode='constant', ncore=None, **kwargs):
                Severity: Minor
                Found in source/tomopy/misc/morph.py - About 45 mins to fix

                  Function find_ctest_token has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def find_ctest_token():
                      """
                      Add authentification token if it exists
                      """
                      token_string = os.environ.get("CTEST_TOKEN")
                  Severity: Minor
                  Found in benchmarking/__init__.py - About 45 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 build_name_append has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def build_name_append(item, separate=True, prefix="[", suffix="]", check=True, reset=False):
                  Severity: Minor
                  Found in benchmarking/__init__.py - About 45 mins to fix

                    Function c_accel_sirt has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def c_accel_sirt(tomo, center, recon, theta, **kwargs):
                    Severity: Minor
                    Found in source/tomopy/util/extern/accel.py - About 35 mins to fix

                      Function astra has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def astra(tomo, center, recon, theta, **kwargs):
                      Severity: Minor
                      Found in source/tomopy/recon/wrappers.py - About 35 mins to fix

                        Function c_fbp has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def c_fbp(tomo, center, recon, theta, **kwargs):
                        Severity: Minor
                        Found in source/tomopy/util/extern/recon.py - About 35 mins to fix

                          Function c_ospml_hybrid has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def c_ospml_hybrid(tomo, center, recon, theta, **kwargs):
                          Severity: Minor
                          Found in source/tomopy/util/extern/recon.py - About 35 mins to fix

                            Function c_osem has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def c_osem(tomo, center, recon, theta, **kwargs):
                            Severity: Minor
                            Found in source/tomopy/util/extern/recon.py - About 35 mins to fix

                              Function _rs_fit has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              def _rs_fit(sinogram, order, win2d, matsign, pad):
                              Severity: Minor
                              Found in source/tomopy/prep/stripe.py - About 35 mins to fix

                                Function remove_stripe_based_fitting has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                def remove_stripe_based_fitting(tomo,
                                Severity: Minor
                                Found in source/tomopy/prep/stripe.py - About 35 mins to fix

                                  Function remove_stripe_ti has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  def remove_stripe_ti(tomo, nblock=0, alpha=1.5, ncore=None, nchunk=None):
                                  Severity: Minor
                                  Found in source/tomopy/prep/stripe.py - About 35 mins to fix

                                    Function ifft2 has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        def ifft2(x, s=None, axes=(-2,-1), overwrite_input=False, extra_info=None):
                                    Severity: Minor
                                    Found in source/tomopy/util/misc.py - About 35 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language