Commit 74799fdc authored by Adoram-Kershner, Lauren's avatar Adoram-Kershner, Lauren
Browse files

Merge branch 'docs' into 'main'

fixes: documentation env solve and build

See merge request astrogeology/autocnet!645
parents a88339d4 2b489137
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -538,7 +538,7 @@ def rv_detector(im1, im2, search_size, pattern_size=None, threshold=.999):
    RV coefficient based change detection. This computes an RV coefficient on a sliding window 
    and correlates low scores below the input threshold to expected change.  
    
    **WARNING*: The time complexity for this is `1 + (search_size - pattern_size))^2` per overlapping pixel between im1 and im2. So larger the differemce between the search and pattern size, it causes compute time to increase exponentially. 
    **WARNING**: The time complexity for this is `1 + (search_size - pattern_size))^2` per overlapping pixel between im1 and im2. So larger the differemce between the search and pattern size, it causes compute time to increase exponentially. 

    Parameters
    ----------
+5 −5
Original line number Diff line number Diff line
@@ -394,7 +394,8 @@ class Edge(dict, MutableMapping):

    def compute_homography(self, method='ransac', clean_keys=[], pid=None, maskname='homography', **kwargs):
        """
        For each edge in the (sub) graph, compute the homography
        For each edge in the (sub) graph, compute the homography.

        Parameters
        ----------
        outlier_algorithm : object
@@ -1264,9 +1265,8 @@ class NetworkEdge(Edge):

        Parameters
        ----------
        outlier_method: str
                        method used to determine outliers.
                        Current methods:
        outlier_method: {'IQR',}
                        method used to determine outliers. Options are: 
                          - interquartile range ('IQR') of line/sample shift

        Returns
+18 −9
Original line number Diff line number Diff line
@@ -1000,6 +1000,8 @@ class CandidateGraph(nx.Graph):
        """
        Computes a voronoi weight for each edge in a given graph.
        Can function as is, but is slightly optimized for complete subgraphs.

        Parameters
        ----------
        kwargs : dict
                      keyword arguments that get passed to compute_voronoi
@@ -2226,21 +2228,24 @@ class NetworkCandidateGraph(CandidateGraph):
        -----
        Here, we provide usage examples for a few, potentially common use cases.

        ## Spatial Query
        Spatial Query
        =============
        This example selects those images that intersect a given bounding polygon.  The polygon is
        specified as a Well Known Text LINESTRING with the first and last points being the same.
        The query says, select the geom (the bounding polygons in the database) that
        intersect the user provided polygon (the LINESTRING) in the given spatial reference system
        (SRID), 949900.
        (SRID), 949900. ::

            SELECT * FROM Images WHERE ST_INTERSECTS(geom, ST_Polygon(ST_GeomFromText('LINESTRING(159 10, 159 11, 160 11, 160 10, 159 10)'),949900)) = TRUE

        ## Select from a specific orbit
        Select from a specific orbit
        ============================
        This example selects those images that are from a particular orbit. In this case,
        the regex string pulls all P##_* orbits and creates a graph from them. This method
        does not guarantee that the graph is fully connected.
        does not guarantee that the graph is fully connected. ::

          SELECT * FROM Images WHERE (split_part(path, '/', 6) ~ 'P[0-9]+_.+') = True

        """

        composite_query = '''WITH i as ({}) SELECT i1.id
@@ -2647,6 +2652,7 @@ class NetworkCandidateGraph(CandidateGraph):
        distirbute_points_kwargs : dict
                                   Of arguments that are passed on the the
                                   distribute_points_in_geom argument in autocnet.cg.cg
        
        Returns
        -------
        valid : np.ndarray
@@ -2655,7 +2661,8 @@ class NetworkCandidateGraph(CandidateGraph):
        Examples
        --------
        To use this method, one can first define the spacing of ground points in the north-
        south and east-west directions using the `distribute_points_kwargs` keyword argument:
        south and east-west directions using the `distribute_points_kwargs` keyword argument::

            def ns(x):
                from math import ceil
                return ceil(round(x,1)*3)
@@ -2663,16 +2670,18 @@ class NetworkCandidateGraph(CandidateGraph):
                from math import ceil
                return ceil(round(x,1)*3)

        Next these arguments can be passed in in order to generate the grid of points:
        Next these arguments can be passed in in order to generate the grid of points::

            distribute_points_kwargs = {'nspts_func':ns, 'ewpts_func':ew, 'method':'classic'}
            valid = ncg.distribute_ground_uniform(distribute_points_kwargs=distribute_points_kwargs)

        At this point, it is possible to visualize the valid points inside of a Jupyter notebook. This
        is frequently convenient when combined with the `ncg.union` property that displays the unioned
        geometries in the NetworkCandidateGraph.

        Finally, the valid points can be propagated using apply. The code below will use the defined base
        to find the most interesting ground feature in the region of the valid point and write that point
        to the table defined by CandidateGroundPoints (autocnet.io.db.model):
        to the table defined by CandidateGroundPoints (autocnet.io.db.model)::

            base = 'mc11_oxia_palus_dir_final.cub'
            ncg.apply('matcher.ground.find_most_interesting_ground', on=valid, args=(base,))
+2 −1
Original line number Diff line number Diff line
@@ -44,10 +44,12 @@ ORDER BY measures."pointid", measures."id";
        """
        Given a set of points/measures in an autocnet database, generate an ISIS
        compliant control network.

        Parameters
        ----------
        path : str
               The full path to the output network.

        flistpath : str
                    (Optional) the path to the output filelist. By default
                    the outout filelist path is genrated programatically
@@ -56,7 +58,6 @@ ORDER BY measures."pointid", measures."id";
        sql : str
              The sql query to execute in the database.
        """
        print(sql)
        
        df = pd.read_sql(sql, engine)

+3 −2
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ from autocnet.transformation.decompose import coupled_decomposition
def decompose_and_match(self, k=2, maxiteration=3, size=18, buf_dist=3, **kwargs):
    """
    Similar to match, this method first decomposed the image into
    $4^{maxiteration}$ subimages and applys matching between each sub-image.
    $4^{maxiteration}$ subimages and applies matching between each sub-image.

    This method is potential slower than the standard match due to the
    overhead in matching, but can be significantly more accurate.  The
@@ -28,7 +28,7 @@ def decompose_and_match(self, k=2, maxiteration=3, size=18, buf_dist=3, **kwargs
    maxiteration : int
                   When using coupled decomposition, the number of recursive
                   divisions to apply.  The total number of resultant
                   sub-images will be 4 ** maxiteration.  Approximate values:
                   sub-images will be 4 ** maxiteration.  Approximate values::

                    | Number of megapixels | maxiteration |
                    |----------------------|--------------|
@@ -49,6 +49,7 @@ def decompose_and_match(self, k=2, maxiteration=3, size=18, buf_dist=3, **kwargs
               the (sub)image a point must be in order to be used as a
               partioning point.  The smaller the distance, the more likely
               percision errors can results in erroneous partitions.

    """
    def func(group):
        ratio = 0.8
Loading