Commit bd876bd5 authored by Lauren Adoram-Kershner's avatar Lauren Adoram-Kershner Committed by jlaura
Browse files

upping phase matcher image size from 71 to 251 (#382)

* upping phase matcher image size from 71 to 251

* upping image_size template kwarg
parent ab6fa171
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ def subpixel_phase(template, search, **kwargs):
    (y_shift, x_shift), error, diffphase = register_translation(search, template, **kwargs)
    return x_shift, y_shift, (error, diffphase)

def subpixel_template(sx, sy, dx, dy, s_img, d_img, image_size=(251, 215), template_size=(51,51), **kwargs):
def subpixel_template(sx, sy, dx, dy, s_img, d_img, image_size=(251, 251), template_size=(51,51), **kwargs):
    """
    Uses a pattern-matcher on subsets of two images determined from the passed-in keypoints and optional sizes to
    compute an x and y offset from the search keypoint to the template keypoint and an associated strength.
@@ -455,8 +455,8 @@ def subpixel_register_point(pointid, iterative_phase_kwargs={}, subpixel_templat
    session.commit()
    session.close()

def subpixel_register_points(iterative_phase_kwargs={'size': 71},
                             subpixel_template_kwargs={'image_size':(121,121)},
def subpixel_register_points(iterative_phase_kwargs={'size': 251},
                             subpixel_template_kwargs={'image_size':(251,251)},
                             cost_func=lambda x,y: 1/x**2 * y,
                             threshold=0.005):
    """
@@ -492,8 +492,8 @@ def subpixel_register_points(iterative_phase_kwargs={'size': 71},
                                subpixel_template_kwargs=subpixel_template_kwargs,
                                cost_func=cost_func)

def cluster_subpixel_register_points(iterative_phase_kwargs={'size': 71},
                                     subpixel_template_kwargs={'image_size':(121,121)},
def cluster_subpixel_register_points(iterative_phase_kwargs={'size': 251},
                                     subpixel_template_kwargs={'image_size':(251,251)},
                                     cost_func=lambda x,y: 1/x**2 * y,
                                     threshold=0.005,
                                     walltime='00:10:00',