tomopy/tomopy

View on GitHub

Showing 354 of 354 total issues

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 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 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 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 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 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_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

                  Similar blocks of code found in 5 locations. Consider refactoring.
                  Open

                      def test_tikh(self):
                          assert_allclose(recon(self.prj, self.ang, algorithm='tikh',
                                                num_iter=4),
                                          read_file('tikh.npy'),
                  Severity: Major
                  Found in test/test_tomopy/test_recon/test_algorithm.py and 4 other locations - About 1 hr to fix
                  test/test_tomopy/test_recon/test_algorithm.py on lines 252..255
                  test/test_tomopy/test_recon/test_algorithm.py on lines 259..262
                  test/test_tomopy/test_recon/test_algorithm.py on lines 294..296
                  test/test_tomopy/test_recon/test_algorithm.py on lines 299..302

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 38.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 5 locations. Consider refactoring.
                  Open

                      def test_pml_quad(self):
                          assert_allclose(
                              recon(self.prj, self.ang, algorithm='pml_quad', num_iter=4),
                              read_file('pml_quad.npy'),
                  Severity: Major
                  Found in test/test_tomopy/test_recon/test_algorithm.py and 4 other locations - About 1 hr to fix
                  test/test_tomopy/test_recon/test_algorithm.py on lines 252..255
                  test/test_tomopy/test_recon/test_algorithm.py on lines 294..296
                  test/test_tomopy/test_recon/test_algorithm.py on lines 299..302
                  test/test_tomopy/test_recon/test_algorithm.py on lines 305..308

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 38.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 4 locations. Consider refactoring.
                  Open

                      matsortback = np.asarray([row[row[:, 0].argsort()] for row in matsort])
                  Severity: Major
                  Found in source/tomopy/prep/stripe.py and 3 other locations - About 1 hr to fix
                  source/tomopy/prep/stripe.py on lines 419..419
                  source/tomopy/prep/stripe.py on lines 424..424
                  source/tomopy/prep/stripe.py on lines 750..750

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 38.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 4 locations. Consider refactoring.
                  Open

                      matsortback = np.asarray([row[row[:, 0].argsort()] for row in matsort])
                  Severity: Major
                  Found in source/tomopy/prep/stripe.py and 3 other locations - About 1 hr to fix
                  source/tomopy/prep/stripe.py on lines 419..419
                  source/tomopy/prep/stripe.py on lines 750..750
                  source/tomopy/prep/stripe.py on lines 752..752

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 38.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  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

                    Similar blocks of code found in 5 locations. Consider refactoring.
                    Open

                        def test_pml_hybrid(self):
                            assert_allclose(
                                recon(self.prj, self.ang, algorithm='pml_hybrid', num_iter=4),
                                read_file('pml_hybrid.npy'),
                    Severity: Major
                    Found in test/test_tomopy/test_recon/test_algorithm.py and 4 other locations - About 1 hr to fix
                    test/test_tomopy/test_recon/test_algorithm.py on lines 259..262
                    test/test_tomopy/test_recon/test_algorithm.py on lines 294..296
                    test/test_tomopy/test_recon/test_algorithm.py on lines 299..302
                    test/test_tomopy/test_recon/test_algorithm.py on lines 305..308

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 38.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 5 locations. Consider refactoring.
                    Open

                        def test_tv(self):
                            assert_allclose(recon(self.prj, self.ang, algorithm='tv', num_iter=4),
                                            read_file('tv.npy'),
                    Severity: Major
                    Found in test/test_tomopy/test_recon/test_algorithm.py and 4 other locations - About 1 hr to fix
                    test/test_tomopy/test_recon/test_algorithm.py on lines 252..255
                    test/test_tomopy/test_recon/test_algorithm.py on lines 259..262
                    test/test_tomopy/test_recon/test_algorithm.py on lines 299..302
                    test/test_tomopy/test_recon/test_algorithm.py on lines 305..308

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 38.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 3 locations. Consider refactoring.
                    Open

                    def remove_dead_stripe(tomo,
                                           snr=3,
                                           size=51,
                                           norm=True,
                                           ncore=None,
                    Severity: Major
                    Found in source/tomopy/prep/stripe.py and 2 other locations - About 1 hr to fix
                    source/tomopy/prep/alignment.py on lines 919..954
                    source/tomopy/prep/stripe.py on lines 441..479

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 38.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 5 locations. Consider refactoring.
                    Open

                        def test_grad(self):
                            assert_allclose(recon(self.prj, self.ang, algorithm='grad',
                                                  num_iter=4),
                                            read_file('grad.npy'),
                    Severity: Major
                    Found in test/test_tomopy/test_recon/test_algorithm.py and 4 other locations - About 1 hr to fix
                    test/test_tomopy/test_recon/test_algorithm.py on lines 252..255
                    test/test_tomopy/test_recon/test_algorithm.py on lines 259..262
                    test/test_tomopy/test_recon/test_algorithm.py on lines 294..296
                    test/test_tomopy/test_recon/test_algorithm.py on lines 305..308

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 38.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                        matsort = np.asarray([row[row[:, 1].argsort()] for row in matcombine])
                    Severity: Major
                    Found in source/tomopy/prep/stripe.py and 3 other locations - About 1 hr to fix
                    source/tomopy/prep/stripe.py on lines 419..419
                    source/tomopy/prep/stripe.py on lines 424..424
                    source/tomopy/prep/stripe.py on lines 752..752

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 38.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 3 locations. Consider refactoring.
                    Open

                    def distortion_correction_proj(tomo, xcenter, ycenter, list_fact,
                                                    ncore=None, nchunk=None):
                        """
                        Apply distortion correction to projections using the polynomial model.
                        Coefficients are calculated using Vounwarp package :cite:`Vo:15`.
                    Severity: Major
                    Found in source/tomopy/prep/alignment.py and 2 other locations - About 1 hr to fix
                    source/tomopy/prep/stripe.py on lines 441..479
                    source/tomopy/prep/stripe.py on lines 766..803

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 38.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                        matsort = np.asarray([row[row[:, 1].argsort()] for row in matcomb])
                    Severity: Major
                    Found in source/tomopy/prep/stripe.py and 3 other locations - About 1 hr to fix
                    source/tomopy/prep/stripe.py on lines 424..424
                    source/tomopy/prep/stripe.py on lines 750..750
                    source/tomopy/prep/stripe.py on lines 752..752

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 38.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Severity
                    Category
                    Status
                    Source
                    Language