Commit f7c3f093 authored by Adam Paquette's avatar Adam Paquette
Browse files

Updated docstrings for compute_weights and vor.

parent 0e86daa0
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -125,8 +125,8 @@ def vor(edge, clean_keys=[], s=30):

        Parameters
        ----------
        edge : edge
               info
        edge : object
               An edge object

        clean_keys : list
                     Of strings used to apply masks to omit correspondences
@@ -136,7 +136,7 @@ def vor(edge, clean_keys=[], s=30):

        Returns
        -------
        vor : Voronoi
        vor : object
              Scipy Voronoi object

        voronoi_df : dataframe
+11 −0
Original line number Diff line number Diff line
@@ -772,6 +772,17 @@ class Edge(dict, MutableMapping):
        return total_overlap_coverage

    def compute_weights(self, clean_keys, **kwargs):
        """
        Computes a voronoi diagram for the overlap between two images
        then gets the area of each polygon resulting in a voronoi weight.
        These weights are then appended to the matches dataframe.

        Parameters
        ----------
        clean_keys : list
                     Of strings used to apply masks to omit correspondences

        """
        if self.matches is None:
            raise AttributeError('Matches have not been computed for this edge')
        voronoi = cg.vor(self, clean_keys, **kwargs)