CellProfiler/centrosome

View on GitHub
centrosome/cpmorphology.py

Summary

Maintainability
F
2 mos
Test Coverage

File cpmorphology.py has 3566 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from __future__ import absolute_import
from __future__ import division
import logging

import numpy as np
Severity: Major
Found in centrosome/cpmorphology.py - About 1 wk to fix

    Function grey_reconstruction has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
    Open

    def grey_reconstruction(image, mask, footprint=None, offset=None):
        """Perform a morphological reconstruction of the image
        
        grey_dilate the image, constraining each pixel to have a value that is
        at most that of the mask.
    Severity: Minor
    Found in centrosome/cpmorphology.py - About 7 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 thin has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
    Open

    def thin(image, mask=None, iterations=1):
        """Thin an image to lines, preserving Euler number
        
        Implements thinning as described in algorithm # 1 from
        Guo, "Parallel Thinning with Two Subiteration Algorithms",
    Severity: Minor
    Found in centrosome/cpmorphology.py - About 4 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 skeleton_length has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
    Open

    def skeleton_length(labels, indices=None):
        """Compute the length of all skeleton branches for labeled skeletons
        
        labels - a labels matrix
        indices - the indexes of the labels to be measured. Default is all
    Severity: Minor
    Found in centrosome/cpmorphology.py - About 4 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

    Consider simplifying this complex logical expression.
    Open

        if thin_table is None:
            thin_table = np.zeros((2, 512), bool)
            for i in range(512):
                if (i & 16) == 0:
                    # All zeros -> 0
    Severity: Critical
    Found in centrosome/cpmorphology.py - About 3 hrs to fix

      Function faster_minimum_distance2 has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
      Open

      def faster_minimum_distance2(hull_a, center_a, hull_b, center_b):
          """Do the minimum distance using the bimodal property of hull ordering
          
          """
          #
      Severity: Minor
      Found in centrosome/cpmorphology.py - About 3 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 minimum_enclosing_circle has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
      Open

      def minimum_enclosing_circle(labels, indexes=None, hull_and_point_count=None):
          """Find the location of the minimum enclosing circle and its radius
          
          labels - a labels matrix
          indexes - an array giving the label indexes to be processed
      Severity: Minor
      Found in centrosome/cpmorphology.py - About 3 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 slow_minimum_distance2 has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
      Open

      def slow_minimum_distance2(hull_a, hull_b):
          """Do the minimum distance by exhaustive examination of all points"""
          d2_min = np.iinfo(int).max
          for a in hull_a:
              if within_hull(a, hull_b):
      Severity: Minor
      Found in centrosome/cpmorphology.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 regional_maximum has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

      def regional_maximum(image, mask=None, structure=None, ties_are_ok=False):
          """Return a binary mask containing only points that are regional maxima
          
          image     - image to be transformed
          mask      - mask of relevant pixels
      Severity: Minor
      Found in centrosome/cpmorphology.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 fill_labeled_holes has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

      def fill_labeled_holes(labels, mask=None, size_fn=None):
          """Fill all background pixels that are holes inside the foreground
       
          A pixel is a hole inside a foreground object if
          
      Severity: Minor
      Found in centrosome/cpmorphology.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 table_lookup has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
      Open

      def table_lookup(image, table, border_value, iterations=None):
          """Perform a morphological transform on an image, directed by its neighbors
          
          image - a binary image
          table - a 512-element table giving the transform of each pixel given
      Severity: Minor
      Found in centrosome/cpmorphology.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 euler_number has 56 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      def euler_number(labels, indexes=None):
          """Calculate the Euler number of each label
          
          labels - a label matrix
          indexes - the indexes of the labels to measure or None to
      Severity: Major
      Found in centrosome/cpmorphology.py - About 2 hrs to fix

        Function feret_diameter has 53 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        def feret_diameter(chulls, counts, indexes):
            """Return the minimum and maximum Feret diameter for each object
            
            This function takes the convex hull data, as generated by convex_hull
            and returns the minimum and maximum Feret diameter for each convex hull.
        Severity: Major
        Found in centrosome/cpmorphology.py - About 2 hrs to fix

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

          def draw_line(labels, pt0, pt1, value=1):
              """Draw a line between two points
              
              pt0, pt1 are in i,j format which is the reverse of x,y format
              Uses the Bresenham algorithm
          Severity: Minor
          Found in centrosome/cpmorphology.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

          Consider simplifying this complex logical expression.
          Open

                      value
                      if (
                          fn(i, 0, 0, 0)
                          and fn(i, 1, 0, 1)
                          and fn(i, 2, 0, 2)
          Severity: Critical
          Found in centrosome/cpmorphology.py - About 1 hr to fix

            Function convex_hull_ijv has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            def convex_hull_ijv(pixel_labels, indexes, fast=True):
                """Return the convex hull for each label using an ijv labeling
                
                pixel_labels: the labeling of the pixels in i,j,v form where
                              i & j are the coordinates of a pixel and v is
            Severity: Minor
            Found in centrosome/cpmorphology.py - About 1 hr to fix

              Function color_labels has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
              Open

              def color_labels(labels, distance_transform=False):
                  """Color a labels matrix so that no adjacent labels have the same color
                  
                  distance_transform - if true, distance transform the labels to find out
                       which objects are closest to each other.
              Severity: Minor
              Found in centrosome/cpmorphology.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 get_outline_pts has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              def get_outline_pts(labels, idxs):
                  """Get the outline points of objects in clockwise order
                  
                  Given a labels matrix of contiguously-labeled objects, trace
                  the exteriors of those objects to get the points of the outline
              Severity: Minor
              Found in centrosome/cpmorphology.py - About 1 hr to fix

                Function associate_by_distance has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                Open

                def associate_by_distance(labels_a, labels_b, distance):
                    """Find the objects that are within a given distance of each other
                    
                    Given two labels matrices and a distance, find pairs of objects that
                    are within the given distance of each other where the distance is
                Severity: Minor
                Found in centrosome/cpmorphology.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 calculate_convex_hull_areas has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                def calculate_convex_hull_areas(labels, indexes=None):
                    """Calulculate the area of the convex hull of each labeled object
                    
                    labels - a label matrix
                    indexes - None: calculate convex hull area over entire image
                Severity: Minor
                Found in centrosome/cpmorphology.py - About 1 hr to fix

                  Function pairwise_permutations has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  def pairwise_permutations(i, j):
                      """Return all permutations of a set of groups
                      
                      This routine takes two vectors:
                      i - the label of each group
                  Severity: Minor
                  Found in centrosome/cpmorphology.py - About 1 hr to fix

                    Function table_idx_from_labels has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def table_idx_from_labels(labels):
                        """Return an array of indexes into a morphology lookup table
                        labels - a labels matrix
                        
                        returns a matrix of values between 0 and 511 of indices appropriate
                    Severity: Minor
                    Found in centrosome/cpmorphology.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 convex_hull_ijv has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def convex_hull_ijv(pixel_labels, indexes, fast=True):
                        """Return the convex hull for each label using an ijv labeling
                        
                        pixel_labels: the labeling of the pixels in i,j,v form where
                                      i & j are the coordinates of a pixel and v is
                    Severity: Minor
                    Found in centrosome/cpmorphology.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 grey_reconstruction has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    def grey_reconstruction(image, mask, footprint=None, offset=None):
                        """Perform a morphological reconstruction of the image
                        
                        grey_dilate the image, constraining each pixel to have a value that is
                        at most that of the mask.
                    Severity: Minor
                    Found in centrosome/cpmorphology.py - About 1 hr to fix

                      Function find_neighbors has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      def find_neighbors(labels):
                          """Find the set of objects that touch each object in a labels matrix
                          
                          Construct a "list", per-object, of the objects 8-connected adjacent
                          to that object.
                      Severity: Minor
                      Found in centrosome/cpmorphology.py - About 1 hr to fix

                        Function is_local_maximum has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        def is_local_maximum(image, labels, footprint):
                            """Return a boolean array of points that are local maxima
                            
                            image - intensity image
                            labels - find maxima only within labels. Zero is reserved for background.
                        Severity: Minor
                        Found in centrosome/cpmorphology.py - About 1 hr to fix

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

                          def ellipse_from_second_moments_ijv(
                              i, j, image, labels, indexes, wants_compactness=False
                          ):
                              """Calculate measurements of ellipses equivalent to the second moments of labels
                              
                          Severity: Minor
                          Found in centrosome/cpmorphology.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 feret_diameter has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def feret_diameter(chulls, counts, indexes):
                              """Return the minimum and maximum Feret diameter for each object
                              
                              This function takes the convex hull data, as generated by convex_hull
                              and returns the minimum and maximum Feret diameter for each convex hull.
                          Severity: Minor
                          Found in centrosome/cpmorphology.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 ellipse_from_second_moments_ijv has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

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

                            Avoid deeply nested control flow statements.
                            Open

                                                if neighbor_value < current_value:
                                                    mask_value = values[neighbor + image_stride]
                                                    # Only do neighbors less than the mask value
                                                    if neighbor_value < mask_value:
                                                        # Raise the neighbor to the mask value if
                            Severity: Major
                            Found in centrosome/cpmorphology.py - About 45 mins to fix

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

                              def find_visible(hull, observer, background):
                                  """Given an observer location, find the first and last visible
                                     points in the hull
                                     
                                     The observer at "observer" is looking at the hull whose most distant
                              Severity: Minor
                              Found in centrosome/cpmorphology.py - About 45 mins to fix

                              Cognitive Complexity

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

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

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

                              Further reading

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

                              def label_skeleton(skeleton):
                                  """Label a skeleton so that each edge has a unique label
                                  
                                  This operation produces a labels matrix where each edge between
                                  two branchpoints has a different label. If the skeleton has been
                              Severity: Minor
                              Found in centrosome/cpmorphology.py - About 45 mins to fix

                              Cognitive Complexity

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

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

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

                              Further reading

                              Avoid deeply nested control flow statements.
                              Open

                                                  for adjacent_i, adjacent_j in (
                                                      (ii - 1, jj),
                                                      (ii, jj - 1),
                                                      (ii + 1, jj),
                                                      (ii, jj + 1),
                              Severity: Major
                              Found in centrosome/cpmorphology.py - About 45 mins to fix

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

                                def binary_shrink(image, iterations=-1):
                                    """Shrink an image by repeatedly removing pixels which have partners
                                       above, to the left, to the right and below until the image doesn't change
                                       
                                       image - binary image to be manipulated
                                Severity: Minor
                                Found in centrosome/cpmorphology.py - About 45 mins to fix

                                Cognitive Complexity

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

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

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

                                Further reading

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

                                def lines_intersect(pt1_p, pt2_p, pt1_q, pt2_q):
                                    """Return true if two line segments intersect
                                    pt1_p, pt2_p - endpoints of first line segment
                                    pt1_q, pt2_q - endpoints of second line segment
                                    """
                                Severity: Minor
                                Found in centrosome/cpmorphology.py - About 45 mins to fix

                                Cognitive Complexity

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

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

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

                                Further reading

                                Avoid deeply nested control flow statements.
                                Open

                                                    if neighbor < 0:
                                                        raise IndexError(
                                                            "Index out of bounds: %d, current=%d, current_value=%d"
                                                            % (neighbor, np.unravel_index(current, dims), current_value)
                                                        )
                                Severity: Major
                                Found in centrosome/cpmorphology.py - About 45 mins to fix

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

                                  def polygon_lines_to_mask(pt0i, pt0j, pt1i, pt1j, shape):
                                  Severity: Minor
                                  Found in centrosome/cpmorphology.py - About 35 mins to fix

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

                                    def get_line_pts(pt0i, pt0j, pt1i, pt1j):
                                        """Retrieve the coordinates of the points along lines
                                        
                                        pt0i, pt0j - the starting coordinates of the lines (1-d nparray)
                                        pt1i, pt1j - the ending coordinates of the lines (1-d nparray)
                                    Severity: Minor
                                    Found in centrosome/cpmorphology.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 grey_erosion has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    def grey_erosion(image, radius=None, mask=None, footprint=None):
                                        """Perform a grey erosion with masking"""
                                        if footprint is None:
                                            if radius is None:
                                                footprint = np.ones((3, 3), bool)
                                    Severity: Minor
                                    Found in centrosome/cpmorphology.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 spur has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    def spur(image, mask=None, iterations=1):
                                        """Remove spur pixels from an image
                                        
                                        0 0 0    0 0 0
                                        0 1 0 -> 0 0 0
                                    Severity: Minor
                                    Found in centrosome/cpmorphology.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 calculate_convex_hull_areas has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    def calculate_convex_hull_areas(labels, indexes=None):
                                        """Calulculate the area of the convex hull of each labeled object
                                        
                                        labels - a label matrix
                                        indexes - None: calculate convex hull area over entire image
                                    Severity: Minor
                                    Found in centrosome/cpmorphology.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 binary_shrink_old has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    def binary_shrink_old(image, iterations=-1):
                                        """Shrink an image by repeatedly removing pixels which have partners
                                           above, to the left, to the right and below until the image doesn't change
                                           
                                           image - binary image to be manipulated
                                    Severity: Minor
                                    Found in centrosome/cpmorphology.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 grey_dilation has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    def grey_dilation(image, radius=None, mask=None, footprint=None):
                                        """Perform a grey dilation with masking"""
                                        if footprint is None:
                                            if radius is None:
                                                footprint = np.ones((3, 3), bool)
                                    Severity: Minor
                                    Found in centrosome/cpmorphology.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 d2_min
                                    Severity: Major
                                    Found in centrosome/cpmorphology.py - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

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

                                        Avoid too many return statements within this function.
                                        Open

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

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

                                              if len(count_t) > 0:
                                                  last_n = np.max(count_t)
                                                  diff_i_t = diff_i[mask]
                                                  diff_j_t = diff_j[mask]
                                                  remainder = diff_j_t * 2 - diff_i_t
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 3 days to fix
                                          centrosome/cpmorphology.py on lines 1165..1201

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

                                          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

                                              if len(count_t) > 0:
                                                  last_n = np.max(count_t)
                                                  diff_i_t = diff_i[mask]
                                                  diff_j_t = diff_j[mask]
                                                  remainder = diff_i_t * 2 - diff_j_t
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 3 days to fix
                                          centrosome/cpmorphology.py on lines 1121..1157

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

                                          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

                                                      x = (
                                                          np.sum(ss0 ** 2, 1) * (ss1[:, Y] - vv[:, Y])
                                                          + np.sum(ss1 ** 2, 1) * (vv[:, Y] - ss0[:, Y])
                                                          + np.sum(vv ** 2, 1) * (ss0[:, Y] - ss1[:, Y])
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 day to fix
                                          centrosome/cpmorphology.py on lines 1675..1678

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

                                          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

                                                      y = (
                                                          np.sum(ss0 ** 2, 1) * (vv[:, X] - ss1[:, X])
                                                          + np.sum(ss1 ** 2, 1) * (ss0[:, X] - vv[:, X])
                                                          + np.sum(vv ** 2, 1) * (ss1[:, X] - ss0[:, X])
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 day to fix
                                          centrosome/cpmorphology.py on lines 1670..1673

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

                                          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

                                                  binary_shrink_ulr_table = erode_table | (
                                                      make_table(
                                                          False,
                                                          np.array([[0, 0, 0], [1, 1, 0], [0, 0, 0]], bool),
                                                          np.array([[0, 0, 0], [1, 1, 1], [0, 0, 0]], bool),
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 3 other locations - About 7 hrs to fix
                                          centrosome/cpmorphology.py on lines 368..377
                                          centrosome/cpmorphology.py on lines 380..389
                                          centrosome/cpmorphology.py on lines 392..401

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

                                          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

                                                  binary_shrink_llt_table = erode_table | (
                                                      make_table(
                                                          False,
                                                          np.array([[0, 0, 0], [0, 1, 0], [0, 1, 0]], bool),
                                                          np.array([[0, 1, 0], [0, 1, 0], [0, 1, 0]], bool),
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 3 other locations - About 7 hrs to fix
                                          centrosome/cpmorphology.py on lines 356..365
                                          centrosome/cpmorphology.py on lines 368..377
                                          centrosome/cpmorphology.py on lines 380..389

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

                                          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

                                                  binary_shrink_urb_table = erode_table | (
                                                      make_table(
                                                          False,
                                                          np.array([[0, 1, 0], [0, 1, 0], [0, 0, 0]], bool),
                                                          np.array([[0, 1, 0], [0, 1, 0], [0, 1, 0]], bool),
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 3 other locations - About 7 hrs to fix
                                          centrosome/cpmorphology.py on lines 356..365
                                          centrosome/cpmorphology.py on lines 380..389
                                          centrosome/cpmorphology.py on lines 392..401

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

                                          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

                                                  binary_shrink_lrl_table = erode_table | (
                                                      make_table(
                                                          False,
                                                          np.array([[0, 0, 0], [0, 1, 1], [0, 0, 0]], bool),
                                                          np.array([[0, 0, 0], [1, 1, 1], [0, 0, 0]], bool),
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 3 other locations - About 7 hrs to fix
                                          centrosome/cpmorphology.py on lines 356..365
                                          centrosome/cpmorphology.py on lines 368..377
                                          centrosome/cpmorphology.py on lines 392..401

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

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

                                          def clean(image, mask=None, iterations=1):
                                              """Remove isolated pixels
                                              
                                              0 0 0     0 0 0
                                              0 1 0 ->  0 0 0
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 6 other locations - About 7 hrs to fix
                                          centrosome/cpmorphology.py on lines 3468..3484
                                          centrosome/cpmorphology.py on lines 3548..3565
                                          centrosome/cpmorphology.py on lines 3606..3622
                                          centrosome/cpmorphology.py on lines 3637..3653
                                          centrosome/cpmorphology.py on lines 3732..3745
                                          centrosome/cpmorphology.py on lines 3848..3868

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

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

                                          def fill4(image, mask=None, iterations=1):
                                              """Fill 4-connected black pixels
                                              
                                              x 1 x     x 1 x
                                              1 0 1 ->  1 1 1
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 6 other locations - About 7 hrs to fix
                                          centrosome/cpmorphology.py on lines 3468..3484
                                          centrosome/cpmorphology.py on lines 3495..3514
                                          centrosome/cpmorphology.py on lines 3548..3565
                                          centrosome/cpmorphology.py on lines 3606..3622
                                          centrosome/cpmorphology.py on lines 3732..3745
                                          centrosome/cpmorphology.py on lines 3848..3868

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

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

                                          def majority(image, mask=None, iterations=1):
                                              """A pixel takes the value of the majority of its neighbors
                                              
                                              """
                                              global majority_table
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 6 other locations - About 7 hrs to fix
                                          centrosome/cpmorphology.py on lines 3468..3484
                                          centrosome/cpmorphology.py on lines 3495..3514
                                          centrosome/cpmorphology.py on lines 3548..3565
                                          centrosome/cpmorphology.py on lines 3606..3622
                                          centrosome/cpmorphology.py on lines 3637..3653
                                          centrosome/cpmorphology.py on lines 3848..3868

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

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

                                          def thicken(image, mask=None, iterations=1):
                                              """Thicken the objects in an image where doing so does not connect them
                                              
                                              0 0 0    ? ? ?
                                              0 0 0 -> ? 1 ?
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 6 other locations - About 7 hrs to fix
                                          centrosome/cpmorphology.py on lines 3468..3484
                                          centrosome/cpmorphology.py on lines 3495..3514
                                          centrosome/cpmorphology.py on lines 3548..3565
                                          centrosome/cpmorphology.py on lines 3606..3622
                                          centrosome/cpmorphology.py on lines 3637..3653
                                          centrosome/cpmorphology.py on lines 3732..3745

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

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

                                          def diag(image, mask=None, iterations=1):
                                              """4-connect pixels that are 8-connected
                                              
                                              0 0 0     0 0 ?
                                              0 0 1 ->  0 1 1
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 6 other locations - About 7 hrs to fix
                                          centrosome/cpmorphology.py on lines 3468..3484
                                          centrosome/cpmorphology.py on lines 3495..3514
                                          centrosome/cpmorphology.py on lines 3606..3622
                                          centrosome/cpmorphology.py on lines 3637..3653
                                          centrosome/cpmorphology.py on lines 3732..3745
                                          centrosome/cpmorphology.py on lines 3848..3868

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

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

                                          def fill(image, mask=None, iterations=1):
                                              """Fill isolated black pixels
                                              
                                              1 1 1     1 1 1
                                              1 0 1 ->  1 1 1
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 6 other locations - About 7 hrs to fix
                                          centrosome/cpmorphology.py on lines 3468..3484
                                          centrosome/cpmorphology.py on lines 3495..3514
                                          centrosome/cpmorphology.py on lines 3548..3565
                                          centrosome/cpmorphology.py on lines 3637..3653
                                          centrosome/cpmorphology.py on lines 3732..3745
                                          centrosome/cpmorphology.py on lines 3848..3868

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

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

                                          def bridge(image, mask=None, iterations=1):
                                              """Fill in pixels that bridge gaps.
                                              
                                              1 0 0    1 0 0
                                              0 0 0 -> 0 1 0
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 6 other locations - About 7 hrs to fix
                                          centrosome/cpmorphology.py on lines 3495..3514
                                          centrosome/cpmorphology.py on lines 3548..3565
                                          centrosome/cpmorphology.py on lines 3606..3622
                                          centrosome/cpmorphology.py on lines 3637..3653
                                          centrosome/cpmorphology.py on lines 3732..3745
                                          centrosome/cpmorphology.py on lines 3848..3868

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

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                          def hbreak(image, mask=None, iterations=1):
                                              """Remove horizontal breaks
                                              
                                              1 1 1     1 1 1
                                              0 1 0 ->  0 0 0 (this case only)
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 7 hrs to fix
                                          centrosome/cpmorphology.py on lines 3695..3711
                                          centrosome/cpmorphology.py on lines 3761..3777

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

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                          def vbreak(image, mask=None, iterations=1):
                                              """Remove horizontal breaks
                                              
                                              1 1 1     1 1 1
                                              0 1 0 ->  0 0 0 (this case only)
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 7 hrs to fix
                                          centrosome/cpmorphology.py on lines 3666..3682
                                          centrosome/cpmorphology.py on lines 3761..3777

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

                                          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

                                                      n2 = (
                                                          (ipat[0, 1] or ipat[0, 2])
                                                          + (ipat[1, 2] or ipat[2, 2])
                                                          + (ipat[2, 1] or ipat[2, 0])
                                                          + (ipat[1, 0] or ipat[0, 0])
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 7 hrs to fix
                                          centrosome/cpmorphology.py on lines 3913..3917

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

                                          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

                                                      n1 = (
                                                          (ipat[0, 0] or ipat[0, 1])
                                                          + (ipat[0, 2] or ipat[1, 2])
                                                          + (ipat[2, 2] or ipat[2, 1])
                                                          + (ipat[2, 0] or ipat[1, 0])
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 7 hrs to fix
                                          centrosome/cpmorphology.py on lines 3919..3923

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

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                          def remove(image, mask=None, iterations=1):
                                              """Turn 1 pixels to 0 if their 4-connected neighbors are all 0
                                              
                                              ? 1 ?     ? 1 ?
                                              1 1 1  -> 1 0 1
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 7 hrs to fix
                                          centrosome/cpmorphology.py on lines 3666..3682
                                          centrosome/cpmorphology.py on lines 3695..3711

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

                                          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 branchpoints(image, mask=None):
                                              """Remove all pixels from an image except for branchpoints
                                              
                                              image - a skeletonized image
                                              mask -  a mask of pixels excluded from consideration
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 7 hrs to fix
                                          centrosome/cpmorphology.py on lines 3576..3595

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

                                          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 endpoints(image, mask=None):
                                              """Remove all pixels from an image except for endpoints
                                              
                                              image - a skeletonized image
                                              mask -  a mask of pixels excluded from consideration
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 7 hrs to fix
                                          centrosome/cpmorphology.py on lines 3379..3398

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

                                          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

                                          vbreak_table = make_table(
                                              True,
                                              np.array([[0, 0, 0], [0, 1, 0], [0, 0, 0]], bool),
                                              np.array([[0, 0, 0], [0, 1, 0], [0, 0, 0]], bool),
                                          ) & [
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 6 hrs to fix
                                          centrosome/cpmorphology.py on lines 3657..3662

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

                                          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

                                          hbreak_table = make_table(
                                              True,
                                              np.array([[0, 0, 0], [0, 1, 0], [0, 0, 0]], bool),
                                              np.array([[0, 0, 0], [0, 1, 0], [0, 0, 0]], bool),
                                          ) & [
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 6 hrs to fix
                                          centrosome/cpmorphology.py on lines 3686..3691

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

                                          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

                                                  if np.dot(b - b_next, a - b_next) > 0 and np.dot(b_next - b, a - b) > 0:
                                                      # do the edge if better than the vertex
                                                      d2a = distance2_to_line(b, a, a_next)
                                                  else:
                                                      # try the next vertex of a
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 5 hrs to fix
                                          centrosome/cpmorphology.py on lines 1985..1988

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

                                          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

                                                  if np.dot(a - a_next, b - a_next) > 0 and np.dot(a_next - a, b - a) > 0:
                                                      d2b = distance2_to_line(a, b, b_next)
                                                  else:
                                                      d2b = np.sum((b_next - a) ** 2)
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 5 hrs to fix
                                          centrosome/cpmorphology.py on lines 1979..1984

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

                                          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

                                                      if np.any(s0_is_obtuse):
                                                          #
                                                          # The index of the obtuse S0
                                                          #
                                                          v_obtuse_s0_indexes = v_obtuse_indexes[s0_is_obtuse]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 4 hrs to fix
                                          centrosome/cpmorphology.py on lines 1730..1747

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

                                          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

                                                      if np.any(s1_is_obtuse):
                                                          #
                                                          # The index of the obtuse S1
                                                          #
                                                          v_obtuse_s1_indexes = v_obtuse_indexes[s1_is_obtuse]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 4 hrs to fix
                                          centrosome/cpmorphology.py on lines 1709..1725

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

                                          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

                                              strel = (
                                                  ((i + j) <= dradius)
                                                  & ((i + j) >= -dradius)
                                                  & ((i - j) <= dradius)
                                                  & ((i - j) >= -dradius)
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 4 hrs to fix
                                          centrosome/cpmorphology.py on lines 448..452

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

                                          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

                                              strel = (
                                                  ((i + j) <= radius)
                                                  & ((i + j) >= -radius)
                                                  & ((i - j) <= radius)
                                                  & ((i - j) >= -radius)
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 4 hrs to fix
                                          centrosome/cpmorphology.py on lines 498..502

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

                                          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

                                                  while y != y1:
                                                      if remainder >= 0:
                                                          x += step_x
                                                          remainder -= diff_y * 2
                                                      y += step_y
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 4 hrs to fix
                                          centrosome/cpmorphology.py on lines 1047..1053

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

                                          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

                                                  while x != x1:
                                                      if remainder >= 0:
                                                          y += step_y
                                                          remainder -= diff_x * 2
                                                      x += step_x
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 4 hrs to fix
                                          centrosome/cpmorphology.py on lines 1038..1044

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

                                          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

                                                      thin_table[1, i] = (pat[2, 1] or pat[2, 0] or not pat[0, 0]) and pat[1, 0]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 3 hrs to fix
                                          centrosome/cpmorphology.py on lines 3928..3928

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

                                          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

                                                      thin_table[0, i] = (pat[0, 1] or pat[0, 2] or not pat[2, 2]) and pat[1, 2]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 3 hrs to fix
                                          centrosome/cpmorphology.py on lines 3929..3929

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

                                          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

                                                  dot_vs1s0 = np.sum(s01 * vs1, 1) / np.sqrt(
                                                      np.sum(s01 ** 2, 1) * np.sum(vs1 ** 2, 1)
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 3 hrs to fix
                                          centrosome/cpmorphology.py on lines 1594..1595

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

                                          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

                                                  dot_vs0s1 = np.sum(s10 * vs0, 1) / np.sqrt(
                                                      np.sum(s01 ** 2, 1) * np.sum(vs0 ** 2, 1)
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 3 hrs to fix
                                          centrosome/cpmorphology.py on lines 1589..1590

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

                                          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

                                                      dc = distance2_to_line(
                                                          chull_pts[chull_idx + antipode_idx, :],
                                                          chull_pts[chull_idx + vertex_idx, :],
                                                          chull_pts[chull_idx + vertex_idx + 1, :],
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 3 hrs to fix
                                          centrosome/cpmorphology.py on lines 4917..4920

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

                                          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

                                                      dn = distance2_to_line(
                                                          chull_pts[chull_idx + next_antipode_idx, :],
                                                          chull_pts[chull_idx + vertex_idx, :],
                                                          chull_pts[chull_idx + vertex_idx + 1, :],
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 3 hrs to fix
                                          centrosome/cpmorphology.py on lines 4907..4910

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

                                          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

                                                  binary_shrink_top_right &= make_table(
                                                      False,
                                                      np.array([[0, 0, 0], [0, 1, 0], [0, 0, 1]], bool),
                                                      np.array([[1, 1, 1], [1, 1, 0], [1, 0, 1]], bool),
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 236..239
                                          centrosome/cpmorphology.py on lines 241..244
                                          centrosome/cpmorphology.py on lines 246..249
                                          centrosome/cpmorphology.py on lines 256..259
                                          centrosome/cpmorphology.py on lines 272..275
                                          centrosome/cpmorphology.py on lines 277..280
                                          centrosome/cpmorphology.py on lines 282..285
                                          centrosome/cpmorphology.py on lines 287..290
                                          centrosome/cpmorphology.py on lines 292..295

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

                                          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

                                                  binary_shrink_top_right &= make_table(
                                                      False,
                                                      np.array([[0, 0, 0], [1, 1, 0], [0, 0, 0]], bool),
                                                      np.array([[0, 0, 1], [1, 1, 1], [0, 0, 1]], bool),
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 236..239
                                          centrosome/cpmorphology.py on lines 246..249
                                          centrosome/cpmorphology.py on lines 251..254
                                          centrosome/cpmorphology.py on lines 256..259
                                          centrosome/cpmorphology.py on lines 272..275
                                          centrosome/cpmorphology.py on lines 277..280
                                          centrosome/cpmorphology.py on lines 282..285
                                          centrosome/cpmorphology.py on lines 287..290
                                          centrosome/cpmorphology.py on lines 292..295

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

                                          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

                                              if not mask is None:
                                                  not_mask = np.logical_not(mask)
                                                  big_image[iradius:-iradius, iradius:-iradius][not_mask] = 1
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 3037..3039

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

                                          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

                                              if not mask is None:
                                                  not_mask = np.logical_not(mask)
                                                  big_image[iradius:-iradius, iradius:-iradius][not_mask] = 0
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 3008..3010

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

                                          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

                                                  binary_shrink_bottom_left &= make_table(
                                                      False,
                                                      np.array([[0, 0, 0], [0, 1, 1], [0, 0, 0]], bool),
                                                      np.array([[1, 0, 0], [1, 1, 1], [1, 0, 0]], bool),
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 236..239
                                          centrosome/cpmorphology.py on lines 241..244
                                          centrosome/cpmorphology.py on lines 246..249
                                          centrosome/cpmorphology.py on lines 251..254
                                          centrosome/cpmorphology.py on lines 256..259
                                          centrosome/cpmorphology.py on lines 272..275
                                          centrosome/cpmorphology.py on lines 282..285
                                          centrosome/cpmorphology.py on lines 287..290
                                          centrosome/cpmorphology.py on lines 292..295

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

                                          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

                                                  binary_shrink_top_right &= make_table(
                                                      False,
                                                      np.array([[0, 0, 0], [0, 1, 0], [1, 0, 0]], bool),
                                                      np.array([[1, 1, 1], [0, 1, 1], [1, 0, 1]], bool),
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 241..244
                                          centrosome/cpmorphology.py on lines 246..249
                                          centrosome/cpmorphology.py on lines 251..254
                                          centrosome/cpmorphology.py on lines 256..259
                                          centrosome/cpmorphology.py on lines 272..275
                                          centrosome/cpmorphology.py on lines 277..280
                                          centrosome/cpmorphology.py on lines 282..285
                                          centrosome/cpmorphology.py on lines 287..290
                                          centrosome/cpmorphology.py on lines 292..295

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

                                          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

                                                  binary_shrink_bottom_left &= make_table(
                                                      False,
                                                      np.array([[1, 1, 0], [0, 1, 1], [0, 0, 0]], bool),
                                                      np.array([[0, 1, 0], [1, 1, 1], [1, 0, 0]], bool),
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 236..239
                                          centrosome/cpmorphology.py on lines 241..244
                                          centrosome/cpmorphology.py on lines 246..249
                                          centrosome/cpmorphology.py on lines 251..254
                                          centrosome/cpmorphology.py on lines 256..259
                                          centrosome/cpmorphology.py on lines 272..275
                                          centrosome/cpmorphology.py on lines 277..280
                                          centrosome/cpmorphology.py on lines 287..290
                                          centrosome/cpmorphology.py on lines 292..295

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

                                          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

                                                  binary_shrink_bottom_left &= make_table(
                                                      False,
                                                      np.array([[0, 0, 1], [0, 1, 0], [0, 0, 0]], bool),
                                                      np.array([[1, 0, 1], [1, 1, 0], [1, 1, 1]], bool),
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 236..239
                                          centrosome/cpmorphology.py on lines 241..244
                                          centrosome/cpmorphology.py on lines 246..249
                                          centrosome/cpmorphology.py on lines 251..254
                                          centrosome/cpmorphology.py on lines 256..259
                                          centrosome/cpmorphology.py on lines 277..280
                                          centrosome/cpmorphology.py on lines 282..285
                                          centrosome/cpmorphology.py on lines 287..290
                                          centrosome/cpmorphology.py on lines 292..295

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

                                          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

                                                  binary_shrink_bottom_left &= make_table(
                                                      False,
                                                      np.array([[1, 0, 0], [0, 1, 0], [0, 0, 0]], bool),
                                                      np.array([[1, 0, 1], [0, 1, 1], [1, 1, 1]], bool),
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 236..239
                                          centrosome/cpmorphology.py on lines 241..244
                                          centrosome/cpmorphology.py on lines 246..249
                                          centrosome/cpmorphology.py on lines 251..254
                                          centrosome/cpmorphology.py on lines 256..259
                                          centrosome/cpmorphology.py on lines 272..275
                                          centrosome/cpmorphology.py on lines 277..280
                                          centrosome/cpmorphology.py on lines 282..285
                                          centrosome/cpmorphology.py on lines 292..295

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

                                          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

                                                  binary_shrink_top_right &= make_table(
                                                      False,
                                                      np.array([[0, 0, 0], [0, 1, 0], [1, 1, 1]], bool),
                                                      np.array([[1, 1, 1], [1, 1, 0], [0, 1, 1]], bool),
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 236..239
                                          centrosome/cpmorphology.py on lines 241..244
                                          centrosome/cpmorphology.py on lines 246..249
                                          centrosome/cpmorphology.py on lines 251..254
                                          centrosome/cpmorphology.py on lines 272..275
                                          centrosome/cpmorphology.py on lines 277..280
                                          centrosome/cpmorphology.py on lines 282..285
                                          centrosome/cpmorphology.py on lines 287..290
                                          centrosome/cpmorphology.py on lines 292..295

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

                                          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

                                                  binary_shrink_bottom_left &= make_table(
                                                      False,
                                                      np.array([[1, 1, 1], [0, 1, 0], [0, 0, 0]], bool),
                                                      np.array([[1, 1, 0], [0, 1, 1], [1, 1, 1]], bool),
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 236..239
                                          centrosome/cpmorphology.py on lines 241..244
                                          centrosome/cpmorphology.py on lines 246..249
                                          centrosome/cpmorphology.py on lines 251..254
                                          centrosome/cpmorphology.py on lines 256..259
                                          centrosome/cpmorphology.py on lines 272..275
                                          centrosome/cpmorphology.py on lines 277..280
                                          centrosome/cpmorphology.py on lines 282..285
                                          centrosome/cpmorphology.py on lines 287..290

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

                                          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

                                                  binary_shrink_top_right &= make_table(
                                                      False,
                                                      np.array([[0, 0, 0], [1, 1, 0], [0, 1, 1]], bool),
                                                      np.array([[0, 0, 1], [1, 1, 1], [0, 1, 0]], bool),
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 9 other locations - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 236..239
                                          centrosome/cpmorphology.py on lines 241..244
                                          centrosome/cpmorphology.py on lines 251..254
                                          centrosome/cpmorphology.py on lines 256..259
                                          centrosome/cpmorphology.py on lines 272..275
                                          centrosome/cpmorphology.py on lines 277..280
                                          centrosome/cpmorphology.py on lines 282..285
                                          centrosome/cpmorphology.py on lines 287..290
                                          centrosome/cpmorphology.py on lines 292..295

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

                                          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

                                                  first = np.hstack([[True], (i[:-1] != i[1:]) | (j[:-1] != j[1:])])
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 106..106

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

                                          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

                                                  first = np.hstack([[True], (i[:-1] != i[1:]) | (j[:-1] != j[1:])])
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 100..100

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

                                          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

                                                  binary_shrink_top_right = make_table(
                                                      False,
                                                      np.array([[0, 0, 0], [0, 1, 0], [0, 1, 0]], bool),
                                                      np.array([[1, 1, 1], [0, 1, 0], [0, 1, 0]], bool),
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 267..270

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

                                          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

                                                  binary_shrink_bottom_left = make_table(
                                                      False,
                                                      np.array([[0, 1, 0], [0, 1, 0], [0, 0, 0]], bool),
                                                      np.array([[0, 1, 0], [0, 1, 0], [1, 1, 1]], bool),
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 231..234

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

                                          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

                                                  (l0[:, 0] - l1[:, 0]) * (l0[:, 1] - pt[:, 1])
                                                  - (l0[:, 0] - pt[:, 0]) * (l0[:, 1] - l1[:, 1])
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 2136..2136

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

                                          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

                                              | make_table(
                                                  True,
                                                  np.array([[0, 0, 0], [1, 0, 0], [0, 1, 0]]),
                                                  np.array([[0, 0, 0], [1, 1, 0], [1, 1, 0]]),
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 3 other locations - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 3535..3538
                                          centrosome/cpmorphology.py on lines 3530..3533
                                          centrosome/cpmorphology.py on lines 3520..3528

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

                                          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

                                              | make_table(
                                                  True,
                                                  np.array([[0, 1, 0], [0, 0, 1], [0, 0, 0]]),
                                                  np.array([[0, 1, 1], [0, 1, 1], [0, 0, 0]]),
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 3 other locations - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 3540..3543
                                          centrosome/cpmorphology.py on lines 3535..3538
                                          centrosome/cpmorphology.py on lines 3520..3528

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

                                          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

                                              | make_table(
                                                  True,
                                                  np.array([[0, 0, 0], [0, 0, 1], [0, 1, 0]]),
                                                  np.array([[0, 0, 0], [0, 1, 1], [0, 1, 1]]),
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 3 other locations - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 3540..3543
                                          centrosome/cpmorphology.py on lines 3530..3533
                                          centrosome/cpmorphology.py on lines 3520..3528

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

                                          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

                                              make_table(
                                                  True,
                                                  np.array([[0, 0, 0], [0, 1, 0], [0, 0, 0]], bool),
                                                  np.array([[0, 0, 0], [0, 1, 0], [0, 0, 0]], bool),
                                              )
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 3 other locations - About 2 hrs to fix
                                          centrosome/cpmorphology.py on lines 3540..3543
                                          centrosome/cpmorphology.py on lines 3535..3538
                                          centrosome/cpmorphology.py on lines 3530..3533

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

                                          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.sum(pattern_of(i)) != 2 or ((i & (2 ** 0 + 2 ** 1 + 2 ** 2 + 2 ** 3)) == 0))
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 3801..3801

                                          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

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

                                                  (np.sum(pattern_of(i)) != 2 or ((i & (2 ** 0 + 2 ** 1 + 2 ** 2 + 2 ** 3)) != 0))
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 3790..3790

                                          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

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

                                              border = np.hstack((labels[0, :], labels[:, 0], labels[-1, :], labels[:, -1]))
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 78..79

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

                                          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

                                              to_do = np.unique(
                                                  np.hstack((labels[0, :], labels[:, 0], labels[-1, :], labels[:, -1]))
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 5145..5145

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

                                          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

                                              di = i[labels > 0] - ci[labels[labels > 0] - 1]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 4766..4766

                                          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

                                                      right_is_worse = (dist[consider_me] > dist[n_plus_one_consider]) | (
                                                          sign[consider_me] != sign[n_plus_one_consider]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 874..875

                                          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

                                              dj = j[labels > 0] - cj[labels[labels > 0] - 1]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 4765..4765

                                          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

                                                      left_is_worse = (dist[consider_me] > dist[n_minus_one_consider]) | (
                                                          sign[consider_me] != sign[n_minus_one_consider]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 877..878

                                          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

                                              within_hull[:, 1] = scind.sum(hull_nd[:, 2], hull_nd[:, 0], indexes_nd) / counts_nd
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 2733..2733

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

                                          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

                                              within_hull[:, 0] = scind.sum(hull_nd[:, 1], hull_nd[:, 0], indexes_nd) / counts_nd
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 2734..2734

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

                                          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

                                                      indexer[0, :] |= 2 ** 0 + 2 ** 1 + 2 ** 2
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 3290..3290

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

                                          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

                                                      indexer[:, 0] |= 2 ** 0 + 2 ** 3 + 2 ** 6
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 3292..3292

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

                                          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

                                                      indexer[-1, :] |= 2 ** 6 + 2 ** 7 + 2 ** 8
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 3289..3289

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

                                          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

                                                      indexer[:, -1] |= 2 ** 2 + 2 ** 5 + 2 ** 8
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 3291..3291

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

                                          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[-iradius : (iradius + 1), -iradius : (iradius + 1)]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 430..430
                                          centrosome/cpmorphology.py on lines 488..488

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

                                          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[-iradius : (iradius + 1), -iradius : (iradius + 1)]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 430..430
                                          centrosome/cpmorphology.py on lines 446..446

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

                                          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[-iradius : iradius + 1, -iradius : iradius + 1]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 446..446
                                          centrosome/cpmorphology.py on lines 488..488

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

                                          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

                                                  new_counts = scipy.sparse.coo_matrix(
                                                      (v, (a[:, 0], v * 0)), shape=(len(indexes), 1)
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 735..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 45.

                                          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_counts = scipy.sparse.coo_matrix(
                                                  (v, (a[:, 0], v * 0)), shape=(len(indexes), 1)
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 762..763

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

                                          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, big_mask[i : i + image.shape[0], j : j + image.shape[1]]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/filter.py on lines 1294..1294

                                          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

                                                  iend = (i == 1 and labels.shape[0] - 1) or labels.shape[0]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 2644..2644

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

                                              v_count = fixup_scipy_ndimage_result(
                                                  scind.sum(
                                                      np.ones(v_label.shape), v_label, np.arange(max_label, dtype=np.int32) + 1
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/filter.py on lines 674..675

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

                                              y_off = -int(np.round(np.finfo(float).eps + np.sin(angle) * length / 2))
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 467..467

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

                                              x_off = int(np.round(np.finfo(float).eps + np.cos(angle) * length / 2))
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 469..469

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

                                                      jend = (j == 1 and labels.shape[1] - 1) or labels.shape[1]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 2641..2641

                                          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

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

                                              if not mask is None:
                                                  not_mask = np.logical_not(mask)
                                                  final_image[not_mask] = image[not_mask]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 2986..2988

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

                                          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

                                              if not mask is None:
                                                  not_mask = np.logical_not(mask)
                                                  final_image[not_mask] = image[not_mask]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 2964..2966

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

                                          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

                                                      a = hull_a[indexer_a[ii] : indexer_a[ii] + point_counts_a[ii], 1:]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 1823..1823

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

                                          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

                                                      b = hull_b[indexer_b[jj] : indexer_b[jj] + point_counts_b[jj], 1:]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 1822..1822

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

                                          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

                                              y, x = np.mgrid[0 : labels.shape[0], 0 : labels.shape[1]]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 7 other locations - About 1 hr to fix
                                          centrosome/bg_compensate.py on lines 447..447
                                          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/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

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

                                                      indexer[:-1, 1:] += image[1:, :-1] * 2 ** 6
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 3 other locations - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 3275..3275
                                          centrosome/cpmorphology.py on lines 3277..3277
                                          centrosome/cpmorphology.py on lines 3285..3285

                                          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 : labels.shape[0], 0 : labels.shape[1]]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.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/filter.py on lines 1626..1626
                                          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

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

                                              i, j = np.mgrid[0 : skeleton.shape[0], 0 : skeleton.shape[1]]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.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 5176..5176
                                          centrosome/filter.py on lines 1626..1626
                                          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

                                          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/cpmorphology.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 4259..4259
                                          centrosome/cpmorphology.py on lines 5176..5176
                                          centrosome/filter.py on lines 1626..1626
                                          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

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

                                                      indexer[1:, :-1] += image[:-1, 1:] * 2 ** 2
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 3 other locations - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 3275..3275
                                          centrosome/cpmorphology.py on lines 3283..3283
                                          centrosome/cpmorphology.py on lines 3285..3285

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

                                                      indexer[:-1, :-1] += image[1:, 1:] * 2 ** 8
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 3 other locations - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 3275..3275
                                          centrosome/cpmorphology.py on lines 3277..3277
                                          centrosome/cpmorphology.py on lines 3283..3283

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

                                                      indexer[1:, 1:] += image[:-1, :-1] * 2 ** 0
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 3 other locations - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 3277..3277
                                          centrosome/cpmorphology.py on lines 3283..3283
                                          centrosome/cpmorphology.py on lines 3285..3285

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

                                                      [index & 2 ** 6, index & 2 ** 7, index & 2 ** 8],
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 3304..3304
                                          centrosome/cpmorphology.py on lines 3305..3305

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

                                                      [index & 2 ** 3, index & 2 ** 4, index & 2 ** 5],
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 3304..3304
                                          centrosome/cpmorphology.py on lines 3306..3306

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

                                                          ss0[:, X] * (ss1[:, Y] - vv[:, Y])
                                                          + ss1[:, X] * (vv[:, Y] - ss0[:, Y])
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 1668..1668
                                          centrosome/cpmorphology.py on lines 1666..1666

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

                                                      [index & 2 ** 0, index & 2 ** 1, index & 2 ** 2],
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 3305..3305
                                          centrosome/cpmorphology.py on lines 3306..3306

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

                                                          + vv[:, X] * (ss0[:, Y] - ss1[:, Y])
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 1666..1667
                                          centrosome/cpmorphology.py on lines 1666..1666

                                          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

                                              i = np.hstack([labels[:-1, :].flatten(), labels[:, :-1].flatten()])
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 93..93

                                          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

                                              j = np.hstack([labels[1:, :].flatten(), labels[:, 1:].flatten()])
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 92..92

                                          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

                                              hull_nd[hull_nd[:, 2] >= within_hull_per_pixel[:, 1], 2] += 1
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 2755..2755

                                          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

                                              hull_nd[hull_nd[:, 1] >= within_hull_per_pixel[:, 0], 1] += 1
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 2756..2756

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

                                                  j_next = (j + hull_b.shape[0] - 1) % hull_b.shape[0]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 3 other locations - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 1969..1969
                                          centrosome/cpmorphology.py on lines 2002..2002
                                          centrosome/cpmorphology.py on lines 2111..2111

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

                                          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

                                              result = np.zeros((y_center * 2 + 1, x_center * 2 + 1), bool)
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 472..472
                                          centrosome/cpmorphology.py on lines 537..537

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

                                          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

                                              strel = np.zeros((y_center * 2 + 1, x_center * 2 + 1), bool)
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 517..517
                                          centrosome/cpmorphology.py on lines 537..537

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

                                          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

                                              j_next = (j + hull_b.shape[0] - 1) % hull_b.shape[0]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 3 other locations - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 2002..2002
                                          centrosome/cpmorphology.py on lines 2020..2020
                                          centrosome/cpmorphology.py on lines 2111..2111

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

                                          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

                                                  i_next = (i + hull.shape[0] - 1) % hull.shape[0]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 3 other locations - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 1969..1969
                                          centrosome/cpmorphology.py on lines 2002..2002
                                          centrosome/cpmorphology.py on lines 2020..2020

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

                                          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

                                              result = np.zeros((center_y * 2 + 1, center_x * 2 + 1), bool)
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 472..472
                                          centrosome/cpmorphology.py on lines 517..517

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

                                          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

                                                      j_next = (j + hull_b.shape[0] - 1) % hull_b.shape[0]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 3 other locations - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 1969..1969
                                          centrosome/cpmorphology.py on lines 2020..2020
                                          centrosome/cpmorphology.py on lines 2111..2111

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

                                          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

                                              if len(indexes) == 0:
                                                  return np.zeros((0, 2), int), np.zeros((0,), int)
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 674..675

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

                                          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

                                              if len(indexes) == 0:
                                                  return np.zeros((0, 3), int), np.zeros((0,), int)
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 637..638

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

                                          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

                                              onset = scipy.sparse.coo_matrix(
                                                  (weights, (labels - 1, lo)), (maxlabel, 3 * resolution)
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 4793..4794

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

                                          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

                                              offset = scipy.sparse.coo_matrix(
                                                  (weights, (labels - 1, hi)), (maxlabel, 3 * resolution)
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 4790..4791

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

                                          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 opening(image, radius=None, mask=None, footprint=None):
                                              """Do a morphological opening
                                              
                                              image - pixel image to operate on
                                              radius - use a structuring element with the given radius. If no radius,
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 3184..3193

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 38.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                          def closing(image, radius=None, mask=None, footprint=None):
                                              """Do a morphological closing
                                              
                                              image - pixel image to operate on
                                              radius - use a structuring element with the given radius. If no structuring
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 1 other location - About 1 hr to fix
                                          centrosome/cpmorphology.py on lines 3172..3181

                                          Duplicated Code

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

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

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

                                          Tuning

                                          This issue has a mass of 38.

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

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

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

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

                                          Refactorings

                                          Further Reading

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

                                                  neighbors = v_neighbor[v_index[i] : v_index[i] + v_count[i]]
                                          Severity: Major
                                          Found in centrosome/cpmorphology.py and 3 other locations - About 55 mins to fix
                                          centrosome/lapjv.py on lines 176..176
                                          centrosome/lapjv.py on lines 226..226
                                          centrosome/lapjv.py on lines 312..312

                                          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

                                                      indexer[:, :-1] += image[:, 1:] * 2 ** 5
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 55 mins to fix
                                          centrosome/cpmorphology.py on lines 3279..3279

                                          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

                                                      indexer[1:, :] += image[:-1, :] * 2 ** 1
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 55 mins to fix
                                          centrosome/cpmorphology.py on lines 3284..3284

                                          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

                                                      indexer[:-1, :] += image[1:, :] * 2 ** 7
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 55 mins to fix
                                          centrosome/cpmorphology.py on lines 3276..3276

                                          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

                                                      indexer[:, 1:] += image[:, :-1] * 2 ** 3
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 55 mins to fix
                                          centrosome/cpmorphology.py on lines 3281..3281

                                          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

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

                                              for ioff, joff in (
                                                  (-1, -1),
                                                  (-1, 0),
                                                  (-1, 1),
                                                  (0, -1),
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 45 mins to fix
                                          centrosome/cpmorphology.py on lines 3987..3987

                                          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

                                              for i, j in ((-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 1), (1, -1), (1, 0), (1, 1)):
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 45 mins to fix
                                          centrosome/cpmorphology.py on lines 4282..4290

                                          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

                                                  i = i + ((prashker[:, 0].astype(int) // 2 ** j) % 2) * 2 ** j
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 40 mins to fix
                                          centrosome/cpmorphology.py on lines 2608..2608

                                          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

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

                                                  i = i + ((prashker[:, 0].astype(int) // 2 ** j) % 2) * 2 ** (j + 1)
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 40 mins to fix
                                          centrosome/cpmorphology.py on lines 2605..2605

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

                                                  if image.shape[0] < 3 or image.shape[1] < 3:
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 40 mins to fix
                                          centrosome/cpmorphology.py on lines 1903..1903

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

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

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

                                              if hull_a.shape[0] < 3 or hull_b.shape[0] < 3:
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 40 mins to fix
                                          centrosome/cpmorphology.py on lines 3272..3272

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

                                              index_of_label[indexes] = np.array(list(range(indexes.shape[0])))
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 35 mins to fix
                                          centrosome/cpmorphology.py on lines 1528..1529
                                          centrosome/cpmorphology.py on lines 2715..2715

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

                                              index_of_label_nd[indexes_nd] = np.array(list(range(indexes_nd.shape[0])))
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 35 mins to fix
                                          centrosome/cpmorphology.py on lines 1528..1529
                                          centrosome/cpmorphology.py on lines 2687..2687

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

                                              m[0, 2] = np.bincount(labels, j * j * image)
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 35 mins to fix
                                          centrosome/cpmorphology.py on lines 2276..2276
                                          centrosome/cpmorphology.py on lines 2277..2277

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

                                              m[1, 1] = np.bincount(labels, i * j * image)
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 35 mins to fix
                                          centrosome/cpmorphology.py on lines 2277..2277
                                          centrosome/cpmorphology.py on lines 2278..2278

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

                                                  anti_indexes_to_consider[labels_to_consider] = np.array(
                                                      list(range(labels_to_consider.shape[0]))
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 35 mins to fix
                                          centrosome/cpmorphology.py on lines 2687..2687
                                          centrosome/cpmorphology.py on lines 2715..2715

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

                                              m[2, 0] = np.bincount(labels, i * i * image)
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 2 other locations - About 35 mins to fix
                                          centrosome/cpmorphology.py on lines 2276..2276
                                          centrosome/cpmorphology.py on lines 2278..2278

                                          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

                                              within_label_index = (
                                                  np.array(list(range(hull_nd.shape[0]))) - hull_index_per_pixel_nd
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 35 mins to fix
                                          centrosome/cpmorphology.py on lines 800..800

                                          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

                                                      finish_idx = np.array(list(range(a_to_finish.shape[0]))) - finish_idx_bases
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 35 mins to fix
                                          centrosome/cpmorphology.py on lines 2726..2727

                                          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

                                              i, j = np.mgrid[0 : len(radii_a), 0 : len(radii_b)]
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 35 mins to fix
                                          centrosome/bg_compensate.py on lines 122..122

                                          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

                                                          off_i_max = min(image.shape[0], image.shape[0] + off_i)
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 30 mins to fix
                                          centrosome/cpmorphology.py on lines 4478..4478

                                          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

                                                          off_j_max = min(image.shape[1], image.shape[1] + off_j)
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 30 mins to fix
                                          centrosome/cpmorphology.py on lines 4474..4474

                                          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

                                                          src_j_max = min(image.shape[1], image.shape[1] - off_j)
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 30 mins to fix
                                          centrosome/cpmorphology.py on lines 4472..4472

                                          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

                                                          src_i_max = min(image.shape[0], image.shape[0] - off_i)
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 30 mins to fix
                                          centrosome/cpmorphology.py on lines 4476..4476

                                          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

                                              d_start = np.sum((point - hull[0, :]) ** 2)
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 30 mins to fix
                                          centrosome/cpmorphology.py on lines 2063..2063

                                          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

                                              d_end = np.sum((point - hull[-1, :]) ** 2)
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 30 mins to fix
                                          centrosome/cpmorphology.py on lines 2062..2062

                                          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

                                              v2_idx = np.hstack((v2_idx, indexer.counts[0][indexer.rev_idx[extras[:, 1]]]))
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 30 mins to fix
                                          centrosome/cpmorphology.py on lines 5009..5009

                                          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

                                              needs_modulo = v2_idx == indexer.counts[0][indexer.rev_idx[antipodes[:, 1]]] - 1
                                          Severity: Minor
                                          Found in centrosome/cpmorphology.py and 1 other location - About 30 mins to fix
                                          centrosome/cpmorphology.py on lines 4975..4975

                                          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