CellProfiler/centrosome

View on GitHub
centrosome/filter.py

Summary

Maintainability
F
2 wks
Test Coverage

File filter.py has 1304 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from __future__ import absolute_import
from __future__ import division
import deprecation
import numpy as np
import scipy.ndimage as scind
Severity: Major
Found in centrosome/filter.py - About 3 days to fix

    Function canny has 74 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    def canny(image, mask, sigma, low_threshold, high_threshold):
        """Edge filter an image using the Canny algorithm.
    
        sigma - the standard deviation of the Gaussian used
        low_threshold - threshold for edges that connect to high-threshold
    Severity: Major
    Found in centrosome/filter.py - About 2 hrs to fix

      Function convex_hull_transform has 67 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      def convex_hull_transform(
          image, levels=256, mask=None, chunksize=CONVEX_HULL_CHUNKSIZE, pass_cutoff=16
      ):
          """Perform the convex hull transform of this image
      
      
      Severity: Major
      Found in centrosome/filter.py - About 2 hrs to fix

        Function convex_hull_transform has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

        def convex_hull_transform(
            image, levels=256, mask=None, chunksize=CONVEX_HULL_CHUNKSIZE, pass_cutoff=16
        ):
            """Perform the convex hull transform of this image
        
        
        Severity: Minor
        Found in centrosome/filter.py - About 2 hrs 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 stretch has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

        def stretch(image, mask=None):
            """Normalize an image to make the minimum zero and maximum one
        
            image - pixel data to be normalized
            mask  - optional mask of relevant pixels. None = don't mask
        Severity: Minor
        Found in centrosome/filter.py - About 1 hr 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 bilateral_filter has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        def bilateral_filter(
            image, mask, sigma_spatial, sigma_range, sampling_spatial=None, sampling_range=None
        ):
            """Bilateral filter of an image
        
        
        Severity: Minor
        Found in centrosome/filter.py - About 1 hr to fix

          Function gabor has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          def gabor(image, labels, frequency, theta):
              """Gabor-filter the objects in an image
          
              image - 2-d grayscale image to filter
              labels - a similarly shaped labels matrix
          Severity: Minor
          Found in centrosome/filter.py - About 1 hr to fix

            Function __init__ has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

                def __init__(
                    self,
                    observation_matrix,
                    translation_matrix,
                    state_vec=None,
            Severity: Minor
            Found in centrosome/filter.py - About 1 hr 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 poisson_equation has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
            Open

            def poisson_equation(
                image, gradient=1, max_iter=100, convergence=0.01, percentile=90.0
            ):
                """Estimate the solution to the Poisson Equation
            
            
            Severity: Minor
            Found in centrosome/filter.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 __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def __init__(
            Severity: Major
            Found in centrosome/filter.py - About 50 mins to fix

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

              def bilateral_filter(
              Severity: Minor
              Found in centrosome/filter.py - About 45 mins to fix

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

                def kalman_filter(kalman_state, old_indices, coordinates, q, r):
                Severity: Minor
                Found in centrosome/filter.py - About 35 mins to fix

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

                      def add_features(
                  Severity: Minor
                  Found in centrosome/filter.py - About 35 mins to fix

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

                    def convex_hull_transform(
                    Severity: Minor
                    Found in centrosome/filter.py - About 35 mins to fix

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

                      def poisson_equation(
                      Severity: Minor
                      Found in centrosome/filter.py - About 35 mins to fix

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

                        def canny(image, mask, sigma, low_threshold, high_threshold):
                        Severity: Minor
                        Found in centrosome/filter.py - About 35 mins to fix

                          Function map_frames has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def map_frames(self, old_indices):
                                  """Rewrite the feature indexes based on the next frame's identities
                          
                                  old_indices - for each feature in the new frame, the index of the
                                                old feature
                          Severity: Minor
                          Found in centrosome/filter.py - About 35 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 parity has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def parity(x):
                              """The parity of a permutation
                          
                              The parity of a permutation is even if the permutation can be
                              formed by an even number of transpositions and is odd otherwise.
                          Severity: Minor
                          Found in centrosome/filter.py - About 35 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 dot_n has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def dot_n(x, y):
                              """given two tensors N x I x K and N x K x J return N dot products
                          
                              If either x or y is 2-dimensional, broadcast it over all N.
                          
                          
                          Severity: Minor
                          Found in centrosome/filter.py - About 35 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 median_filter has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def median_filter(data, mask, radius, percent=50):
                              """Masked median filter with octagonal shape
                          
                              data - array of data to be median filtered.
                              mask - mask of significant pixels in data
                          Severity: Minor
                          Found in centrosome/filter.py - About 35 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

                          Avoid too many return statements within this function.
                          Open

                                      return (image - minval) / (maxval - minval)
                          Severity: Major
                          Found in centrosome/filter.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                        return image
                            Severity: Major
                            Found in centrosome/filter.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                      return image
                              Severity: Major
                              Found in centrosome/filter.py - About 30 mins to fix

                                Function kalman_filter has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                def kalman_filter(kalman_state, old_indices, coordinates, q, r):
                                    """Return the kalman filter for the features in the new frame
                                
                                    kalman_state - state from last frame
                                
                                
                                Severity: Minor
                                Found in centrosome/filter.py - About 25 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 add_features has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def add_features(
                                        self, kept_indices, new_indices, new_state_vec, new_state_cov, new_noise_var
                                    ):
                                        """Add new features to the state
                                
                                
                                Severity: Minor
                                Found in centrosome/filter.py - About 25 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 hessian has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                def hessian(
                                    image, return_hessian=True, return_eigenvalues=True, return_eigenvectors=True
                                ):
                                    """Calculate hessian, its eigenvalues and eigenvectors
                                
                                
                                Severity: Minor
                                Found in centrosome/filter.py - About 25 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

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

                                def enhance_dark_holes(image, min_radius, max_radius, mask=None):
                                    """Enhance dark holes using a rolling ball filter
                                
                                    image - grayscale 2-d image
                                    radii - a vector of radii: we enhance holes at each given radius
                                Severity: Major
                                Found in centrosome/filter.py and 1 other location - About 1 day to fix
                                centrosome/filter.py on lines 739..766

                                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 166.

                                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 2 locations. Consider refactoring.
                                Open

                                def granulometry_filter(image, min_radius, max_radius, mask=None):
                                    """Enhances bright structures within a min and max radius using a rolling ball filter
                                
                                    image - grayscale 2-d image
                                    radii - a vector of radii: we enhance holes at each given radius
                                Severity: Major
                                Found in centrosome/filter.py and 1 other location - About 1 day to fix
                                centrosome/filter.py on lines 710..736

                                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 166.

                                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

                                def hprewitt(image, mask=None):
                                    """Find the horizontal edges of an image using the Prewitt transform
                                
                                    image - image to process
                                    mask  - mask of relevant points
                                Severity: Major
                                Found in centrosome/filter.py and 3 other locations - About 1 day to fix
                                centrosome/filter.py on lines 544..565
                                centrosome/filter.py on lines 568..589
                                centrosome/filter.py on lines 628..649

                                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 125.

                                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

                                def vsobel(image, mask=None):
                                    """Find the vertical edges of an image using the Sobel transform
                                
                                    image - image to process
                                    mask  - mask of relevant points
                                Severity: Major
                                Found in centrosome/filter.py and 3 other locations - About 1 day to fix
                                centrosome/filter.py on lines 544..565
                                centrosome/filter.py on lines 604..625
                                centrosome/filter.py on lines 628..649

                                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 125.

                                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

                                def hsobel(image, mask=None):
                                    """Find the horizontal edges of an image using the Sobel transform
                                
                                    image - image to process
                                    mask  - mask of relevant points
                                Severity: Major
                                Found in centrosome/filter.py and 3 other locations - About 1 day to fix
                                centrosome/filter.py on lines 568..589
                                centrosome/filter.py on lines 604..625
                                centrosome/filter.py on lines 628..649

                                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 125.

                                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

                                def vprewitt(image, mask=None):
                                    """Find the vertical edges of an image using the Prewitt transform
                                
                                    image - image to process
                                    mask  - mask of relevant points
                                Severity: Major
                                Found in centrosome/filter.py and 3 other locations - About 1 day to fix
                                centrosome/filter.py on lines 544..565
                                centrosome/filter.py on lines 568..589
                                centrosome/filter.py on lines 604..625

                                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 125.

                                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 2 locations. Consider refactoring.
                                Open

                                def velocity_kalman_model():
                                    """Return a KalmanState set up to model objects with constant velocity
                                
                                    The observation and measurement vectors are i,j.
                                    The state vector is i,j,vi,vj
                                Severity: Major
                                Found in centrosome/filter.py and 1 other location - About 4 hrs to fix
                                centrosome/filter.py on lines 1080..1084

                                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 75.

                                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 2 locations. Consider refactoring.
                                Open

                                def reverse_velocity_kalman_model():
                                    """Return a KalmanState set up to model going backwards in time"""
                                    om = np.array([[1, 0, 0, 0], [0, 1, 0, 0]])
                                    tm = np.array([[1, 0, -1, 0], [0, 1, 0, -1], [0, 0, 1, 0], [0, 0, 0, 1]])
                                    return KalmanState(om, tm)
                                Severity: Major
                                Found in centrosome/filter.py and 1 other location - About 4 hrs to fix
                                centrosome/filter.py on lines 1069..1077

                                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 75.

                                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 2 locations. Consider refactoring.
                                Open

                                    @property
                                    def predicted_state_vec(self):
                                        """The predicted state vector for the next time point
                                
                                        From Welch eqn 1.9
                                Severity: Major
                                Found in centrosome/filter.py and 1 other location - About 3 hrs to fix
                                centrosome/filter.py on lines 967..977

                                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 64.

                                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 2 locations. Consider refactoring.
                                Open

                                    @property
                                    def predicted_obs_vec(self):
                                        """The predicted observation vector
                                
                                        The observation vector for the next step in the filter.
                                Severity: Major
                                Found in centrosome/filter.py and 1 other location - About 3 hrs to fix
                                centrosome/filter.py on lines 950..960

                                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 64.

                                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 2 locations. Consider refactoring.
                                Open

                                def prewitt(image, mask=None):
                                    """Find the edge magnitude using the Prewitt transform
                                
                                    image - image to process
                                    mask  - mask of relevant points
                                Severity: Major
                                Found in centrosome/filter.py and 1 other location - About 1 hr to fix
                                centrosome/filter.py on lines 528..541

                                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 49.

                                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 2 locations. Consider refactoring.
                                Open

                                def sobel(image, mask=None):
                                    """Calculate the absolute magnitude Sobel to find the edges
                                
                                    image - image to process
                                    mask - mask of relevant points
                                Severity: Major
                                Found in centrosome/filter.py and 1 other location - About 1 hr to fix
                                centrosome/filter.py on lines 592..601

                                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 49.

                                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 2 locations. Consider refactoring.
                                Open

                                    grid_data[
                                        (di + 0.5).astype(int), (dj + 0.5).astype(int), (dz + 0.5).astype(int)
                                Severity: Major
                                Found in centrosome/filter.py and 1 other location - About 1 hr to fix
                                centrosome/filter.py on lines 234..235

                                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 47.

                                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 2 locations. Consider refactoring.
                                Open

                                    grid_weights[
                                        (di + 0.5).astype(int), (dj + 0.5).astype(int), (dz + 0.5).astype(int)
                                Severity: Major
                                Found in centrosome/filter.py and 1 other location - About 1 hr to fix
                                centrosome/filter.py on lines 231..232

                                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 47.

                                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

                                    i, j = np.mgrid[-half_size : half_size + 1, -half_size : half_size + 1].astype(
                                Severity: Major
                                Found in centrosome/filter.py and 2 other locations - About 1 hr to fix
                                centrosome/filter.py on lines 781..781
                                centrosome/smooth.py on lines 58..58

                                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 44.

                                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

                                    x, y = np.mgrid[-crad : crad + 1, -crad : crad + 1].astype(float)
                                Severity: Major
                                Found in centrosome/filter.py and 2 other locations - About 1 hr to fix
                                centrosome/filter.py on lines 280..280
                                centrosome/smooth.py on lines 58..58

                                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 44.

                                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 2 locations. Consider refactoring.
                                Open

                                    result = result[ipad : (ipad + image.shape[0]), jpad : (jpad + image.shape[1])]
                                Severity: Major
                                Found in centrosome/filter.py and 1 other location - About 1 hr to fix
                                centrosome/cpmorphology.py on lines 4465..4465

                                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 44.

                                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 2 locations. Consider refactoring.
                                Open

                                    areas = fix(
                                        scind.sum(np.ones(image.shape), labels, np.arange(nobjects, dtype=np.int32) + 1)
                                Severity: Major
                                Found in centrosome/filter.py and 1 other location - About 1 hr to fix
                                centrosome/cpmorphology.py on lines 4015..4017

                                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 43.

                                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 8 locations. Consider refactoring.
                                Open

                                    i, j = np.mgrid[0 : image.shape[0], 0 : image.shape[1]]
                                Severity: Major
                                Found in centrosome/filter.py and 7 other locations - About 1 hr to fix
                                centrosome/bg_compensate.py on lines 447..447
                                centrosome/cpmorphology.py on lines 2312..2312
                                centrosome/cpmorphology.py on lines 4188..4188
                                centrosome/cpmorphology.py on lines 4259..4259
                                centrosome/cpmorphology.py on lines 5176..5176
                                centrosome/filter.py on lines 1976..1976
                                centrosome/smooth.py on lines 89..89

                                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 41.

                                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

                                Identical blocks of code found in 2 locations. Consider refactoring.
                                Open

                                    L[np.abs(L[:, :, 1]) > np.abs(L[:, :, 0]), :] = L[
                                Severity: Major
                                Found in centrosome/filter.py and 1 other location - About 1 hr to fix
                                centrosome/filter.py on lines 1893..1894

                                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 41.

                                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 8 locations. Consider refactoring.
                                Open

                                    i, j = np.mgrid[0 : pe.shape[0], 0 : pe.shape[1]]
                                Severity: Major
                                Found in centrosome/filter.py and 7 other locations - About 1 hr to fix
                                centrosome/bg_compensate.py on lines 447..447
                                centrosome/cpmorphology.py on lines 2312..2312
                                centrosome/cpmorphology.py on lines 4188..4188
                                centrosome/cpmorphology.py on lines 4259..4259
                                centrosome/cpmorphology.py on lines 5176..5176
                                centrosome/filter.py on lines 1626..1626
                                centrosome/smooth.py on lines 89..89

                                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 41.

                                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

                                Identical blocks of code found in 2 locations. Consider refactoring.
                                Open

                                    i, j = np.mgrid[0 : image.shape[0], 0 : image.shape[1]].astype(float)
                                Severity: Major
                                Found in centrosome/filter.py and 1 other location - About 1 hr to fix
                                centrosome/filter.py on lines 218..218

                                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 40.

                                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

                                Identical blocks of code found in 2 locations. Consider refactoring.
                                Open

                                        np.mgrid[0 : image.shape[0], 0 : image.shape[1]].astype(float)
                                Severity: Major
                                Found in centrosome/filter.py and 1 other location - About 1 hr to fix
                                centrosome/filter.py on lines 678..678

                                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 40.

                                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 2 locations. Consider refactoring.
                                Open

                                    ipad = int((result.shape[0] - image.shape[0]) / 2)
                                Severity: Minor
                                Found in centrosome/filter.py and 1 other location - About 55 mins to fix
                                centrosome/filter.py on lines 1293..1293

                                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 37.

                                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 2 locations. Consider refactoring.
                                Open

                                    jpad = int((result.shape[1] - image.shape[1]) / 2)
                                Severity: Minor
                                Found in centrosome/filter.py and 1 other location - About 55 mins to fix
                                centrosome/filter.py on lines 1292..1292

                                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 37.

                                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

                                        if state_vec is not None:
                                            self.state_vec = state_vec
                                        else:
                                            self.state_vec = np.zeros((0, self.state_len))
                                Severity: Major
                                Found in centrosome/filter.py and 2 other locations - About 50 mins to fix
                                centrosome/filter.py on lines 922..925
                                centrosome/filter.py on lines 926..929

                                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 36.

                                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

                                        if state_noise is not None:
                                            self.state_noise = state_noise
                                        else:
                                            self.state_noise = np.zeros((0, self.state_len))
                                Severity: Major
                                Found in centrosome/filter.py and 2 other locations - About 50 mins to fix
                                centrosome/filter.py on lines 914..917
                                centrosome/filter.py on lines 922..925

                                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 36.

                                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

                                        if noise_var is not None:
                                            self.noise_var = noise_var
                                        else:
                                            self.noise_var = np.zeros((0, self.state_len))
                                Severity: Major
                                Found in centrosome/filter.py and 2 other locations - About 50 mins to fix
                                centrosome/filter.py on lines 914..917
                                centrosome/filter.py on lines 926..929

                                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 36.

                                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

                                Identical blocks of code found in 2 locations. Consider refactoring.
                                Open

                                    top[i[~first], j[~first]] = (labels[1:] - labels[:-1])[~first[1:]]
                                Severity: Minor
                                Found in centrosome/filter.py and 1 other location - About 45 mins to fix
                                centrosome/filter.py on lines 1771..1771

                                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 35.

                                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 8 locations. Consider refactoring.
                                Open

                                    c_minus = c2 * w + c1 * (1 - w) <= m
                                Severity: Major
                                Found in centrosome/filter.py and 7 other locations - About 45 mins to fix
                                centrosome/filter.py on lines 400..400
                                centrosome/filter.py on lines 420..420
                                centrosome/filter.py on lines 423..423
                                centrosome/filter.py on lines 440..440
                                centrosome/filter.py on lines 443..443
                                centrosome/filter.py on lines 461..461
                                centrosome/filter.py on lines 464..464

                                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 35.

                                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 8 locations. Consider refactoring.
                                Open

                                    c_plus = c2 * w + c1 * (1 - w) <= m
                                Severity: Major
                                Found in centrosome/filter.py and 7 other locations - About 45 mins to fix
                                centrosome/filter.py on lines 400..400
                                centrosome/filter.py on lines 403..403
                                centrosome/filter.py on lines 423..423
                                centrosome/filter.py on lines 440..440
                                centrosome/filter.py on lines 443..443
                                centrosome/filter.py on lines 461..461
                                centrosome/filter.py on lines 464..464

                                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 35.

                                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 8 locations. Consider refactoring.
                                Open

                                    c_minus = c2 * w + c1 * (1 - w) <= m
                                Severity: Major
                                Found in centrosome/filter.py and 7 other locations - About 45 mins to fix
                                centrosome/filter.py on lines 400..400
                                centrosome/filter.py on lines 403..403
                                centrosome/filter.py on lines 420..420
                                centrosome/filter.py on lines 423..423
                                centrosome/filter.py on lines 440..440
                                centrosome/filter.py on lines 443..443
                                centrosome/filter.py on lines 461..461

                                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 35.

                                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 8 locations. Consider refactoring.
                                Open

                                    c_plus = c2 * w + c1 * (1 - w) <= m
                                Severity: Major
                                Found in centrosome/filter.py and 7 other locations - About 45 mins to fix
                                centrosome/filter.py on lines 400..400
                                centrosome/filter.py on lines 403..403
                                centrosome/filter.py on lines 420..420
                                centrosome/filter.py on lines 423..423
                                centrosome/filter.py on lines 440..440
                                centrosome/filter.py on lines 443..443
                                centrosome/filter.py on lines 464..464

                                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 35.

                                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 8 locations. Consider refactoring.
                                Open

                                    c_minus = c2 * w + c1 * (1 - w) <= m
                                Severity: Major
                                Found in centrosome/filter.py and 7 other locations - About 45 mins to fix
                                centrosome/filter.py on lines 400..400
                                centrosome/filter.py on lines 403..403
                                centrosome/filter.py on lines 420..420
                                centrosome/filter.py on lines 440..440
                                centrosome/filter.py on lines 443..443
                                centrosome/filter.py on lines 461..461
                                centrosome/filter.py on lines 464..464

                                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 35.

                                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 8 locations. Consider refactoring.
                                Open

                                    c_plus = c2a * w + c1a * (1.0 - w) <= m
                                Severity: Major
                                Found in centrosome/filter.py and 7 other locations - About 45 mins to fix
                                centrosome/filter.py on lines 400..400
                                centrosome/filter.py on lines 403..403
                                centrosome/filter.py on lines 420..420
                                centrosome/filter.py on lines 423..423
                                centrosome/filter.py on lines 443..443
                                centrosome/filter.py on lines 461..461
                                centrosome/filter.py on lines 464..464

                                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 35.

                                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 8 locations. Consider refactoring.
                                Open

                                    c_minus = c2 * w + c1 * (1.0 - w) <= m
                                Severity: Major
                                Found in centrosome/filter.py and 7 other locations - About 45 mins to fix
                                centrosome/filter.py on lines 400..400
                                centrosome/filter.py on lines 403..403
                                centrosome/filter.py on lines 420..420
                                centrosome/filter.py on lines 423..423
                                centrosome/filter.py on lines 440..440
                                centrosome/filter.py on lines 461..461
                                centrosome/filter.py on lines 464..464

                                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 35.

                                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

                                Identical blocks of code found in 2 locations. Consider refactoring.
                                Open

                                    bottom[i[:-1][~first[1:]] + 1, j[~first]] = (labels[1:] - labels[:-1])[~first[1:]]
                                Severity: Minor
                                Found in centrosome/filter.py and 1 other location - About 45 mins to fix
                                centrosome/filter.py on lines 1763..1763

                                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 35.

                                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 8 locations. Consider refactoring.
                                Open

                                    c_plus = c2 * w + c1 * (1 - w) <= m
                                Severity: Major
                                Found in centrosome/filter.py and 7 other locations - About 45 mins to fix
                                centrosome/filter.py on lines 403..403
                                centrosome/filter.py on lines 420..420
                                centrosome/filter.py on lines 423..423
                                centrosome/filter.py on lines 440..440
                                centrosome/filter.py on lines 443..443
                                centrosome/filter.py on lines 461..461
                                centrosome/filter.py on lines 464..464

                                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 35.

                                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 2 locations. Consider refactoring.
                                Open

                                    sums = fix(scind.sum(high_mask, labels, np.arange(count, dtype=np.int32) + 1))
                                Severity: Minor
                                Found in centrosome/filter.py and 1 other location - About 45 mins to fix
                                centrosome/haralick.py on lines 96..97

                                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 35.

                                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 2 locations. Consider refactoring.
                                Open

                                    first = np.hstack(([True], j[1:] != j[:-1]))
                                Severity: Minor
                                Found in centrosome/filter.py and 1 other location - About 40 mins to fix
                                centrosome/cpmorphology.py on lines 5188..5188

                                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 34.

                                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 10 locations. Consider refactoring.
                                Open

                                    c2 = magnitude[:-1, :-1][pts[1:, 1:]]
                                Severity: Major
                                Found in centrosome/filter.py and 9 other locations - About 35 mins to fix
                                centrosome/filter.py on lines 397..397
                                centrosome/filter.py on lines 402..402
                                centrosome/filter.py on lines 417..417
                                centrosome/filter.py on lines 437..437
                                centrosome/filter.py on lines 442..442
                                centrosome/filter.py on lines 458..458
                                centrosome/filter.py on lines 463..463
                                centrosome/filter.py on lines 520..520
                                centrosome/filter.py on lines 521..521

                                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 33.

                                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 10 locations. Consider refactoring.
                                Open

                                    c2 = magnitude[:-1, 1:][pts[1:, :-1]]
                                Severity: Major
                                Found in centrosome/filter.py and 9 other locations - About 35 mins to fix
                                centrosome/filter.py on lines 397..397
                                centrosome/filter.py on lines 402..402
                                centrosome/filter.py on lines 417..417
                                centrosome/filter.py on lines 422..422
                                centrosome/filter.py on lines 437..437
                                centrosome/filter.py on lines 442..442
                                centrosome/filter.py on lines 463..463
                                centrosome/filter.py on lines 520..520
                                centrosome/filter.py on lines 521..521

                                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 33.

                                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 10 locations. Consider refactoring.
                                Open

                                    c2 = magnitude[1:, 1:][pts[:-1, :-1]]
                                Severity: Major
                                Found in centrosome/filter.py and 9 other locations - About 35 mins to fix
                                centrosome/filter.py on lines 397..397
                                centrosome/filter.py on lines 402..402
                                centrosome/filter.py on lines 422..422
                                centrosome/filter.py on lines 437..437
                                centrosome/filter.py on lines 442..442
                                centrosome/filter.py on lines 458..458
                                centrosome/filter.py on lines 463..463
                                centrosome/filter.py on lines 520..520
                                centrosome/filter.py on lines 521..521

                                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 33.

                                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 10 locations. Consider refactoring.
                                Open

                                    c2a = magnitude[:-1, 1:][pts[1:, :-1]]
                                Severity: Major
                                Found in centrosome/filter.py and 9 other locations - About 35 mins to fix
                                centrosome/filter.py on lines 397..397
                                centrosome/filter.py on lines 402..402
                                centrosome/filter.py on lines 417..417
                                centrosome/filter.py on lines 422..422
                                centrosome/filter.py on lines 442..442
                                centrosome/filter.py on lines 458..458
                                centrosome/filter.py on lines 463..463
                                centrosome/filter.py on lines 520..520
                                centrosome/filter.py on lines 521..521

                                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 33.

                                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 10 locations. Consider refactoring.
                                Open

                                    c2 = magnitude[1:, :-1][pts[:-1, 1:]]
                                Severity: Major
                                Found in centrosome/filter.py and 9 other locations - About 35 mins to fix
                                centrosome/filter.py on lines 397..397
                                centrosome/filter.py on lines 402..402
                                centrosome/filter.py on lines 417..417
                                centrosome/filter.py on lines 422..422
                                centrosome/filter.py on lines 437..437
                                centrosome/filter.py on lines 442..442
                                centrosome/filter.py on lines 458..458
                                centrosome/filter.py on lines 520..520
                                centrosome/filter.py on lines 521..521

                                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 33.

                                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 10 locations. Consider refactoring.
                                Open

                                    c2 = magnitude[:-1, :-1][pts[1:, 1:]]
                                Severity: Major
                                Found in centrosome/filter.py and 9 other locations - About 35 mins to fix
                                centrosome/filter.py on lines 397..397
                                centrosome/filter.py on lines 417..417
                                centrosome/filter.py on lines 422..422
                                centrosome/filter.py on lines 437..437
                                centrosome/filter.py on lines 442..442
                                centrosome/filter.py on lines 458..458
                                centrosome/filter.py on lines 463..463
                                centrosome/filter.py on lines 520..520
                                centrosome/filter.py on lines 521..521

                                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 33.

                                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 10 locations. Consider refactoring.
                                Open

                                    q11 = image[1:, 1:][big_mask[:-1, :-1]]
                                Severity: Major
                                Found in centrosome/filter.py and 9 other locations - About 35 mins to fix
                                centrosome/filter.py on lines 397..397
                                centrosome/filter.py on lines 402..402
                                centrosome/filter.py on lines 417..417
                                centrosome/filter.py on lines 422..422
                                centrosome/filter.py on lines 437..437
                                centrosome/filter.py on lines 442..442
                                centrosome/filter.py on lines 458..458
                                centrosome/filter.py on lines 463..463
                                centrosome/filter.py on lines 521..521

                                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 33.

                                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 10 locations. Consider refactoring.
                                Open

                                    qm11 = image[:-1, 1:][big_mask[1:, :-1]]
                                Severity: Major
                                Found in centrosome/filter.py and 9 other locations - About 35 mins to fix
                                centrosome/filter.py on lines 397..397
                                centrosome/filter.py on lines 402..402
                                centrosome/filter.py on lines 417..417
                                centrosome/filter.py on lines 422..422
                                centrosome/filter.py on lines 437..437
                                centrosome/filter.py on lines 442..442
                                centrosome/filter.py on lines 458..458
                                centrosome/filter.py on lines 463..463
                                centrosome/filter.py on lines 520..520

                                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 33.

                                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 10 locations. Consider refactoring.
                                Open

                                    c2 = magnitude[1:, 1:][pts[:-1, :-1]]
                                Severity: Major
                                Found in centrosome/filter.py and 9 other locations - About 35 mins to fix
                                centrosome/filter.py on lines 402..402
                                centrosome/filter.py on lines 417..417
                                centrosome/filter.py on lines 422..422
                                centrosome/filter.py on lines 437..437
                                centrosome/filter.py on lines 442..442
                                centrosome/filter.py on lines 458..458
                                centrosome/filter.py on lines 463..463
                                centrosome/filter.py on lines 520..520
                                centrosome/filter.py on lines 521..521

                                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 33.

                                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 10 locations. Consider refactoring.
                                Open

                                    c2 = magnitude[1:, :-1][pts[:-1, 1:]]
                                Severity: Major
                                Found in centrosome/filter.py and 9 other locations - About 35 mins to fix
                                centrosome/filter.py on lines 397..397
                                centrosome/filter.py on lines 402..402
                                centrosome/filter.py on lines 417..417
                                centrosome/filter.py on lines 422..422
                                centrosome/filter.py on lines 437..437
                                centrosome/filter.py on lines 458..458
                                centrosome/filter.py on lines 463..463
                                centrosome/filter.py on lines 520..520
                                centrosome/filter.py on lines 521..521

                                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 33.

                                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 2 locations. Consider refactoring.
                                Open

                                        state_vec = dot_n(observation_matrix_t, new_coords[:, :, np.newaxis])[:, :, 0]
                                Severity: Minor
                                Found in centrosome/filter.py and 1 other location - About 30 mins to fix
                                centrosome/filter.py on lines 1172..1172

                                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 32.

                                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 2 locations. Consider refactoring.
                                Open

                                        xmax = min(img.shape[1] - x, img.shape[1])
                                Severity: Minor
                                Found in centrosome/filter.py and 1 other location - About 30 mins to fix
                                centrosome/filter.py on lines 1807..1807

                                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 32.

                                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 2 locations. Consider refactoring.
                                Open

                                        state_noise = dot_n(kalman_gain, difference[:, :, np.newaxis])[:, :, 0]
                                Severity: Minor
                                Found in centrosome/filter.py and 1 other location - About 30 mins to fix
                                centrosome/filter.py on lines 1221..1221

                                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 32.

                                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 2 locations. Consider refactoring.
                                Open

                                        ymax = min(img.shape[0] - y, img.shape[0])
                                Severity: Minor
                                Found in centrosome/filter.py and 1 other location - About 30 mins to fix
                                centrosome/filter.py on lines 1805..1805

                                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 32.

                                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

                                There are no issues that match your filters.

                                Category
                                Status