6 center_mask = make_circular_aperture(mask_diameter)(image.grid)
7 mask = center_mask * ((image / np.nanstd(image)) < threshold)
10 xc = np.sum(mask * image.grid.x) / np.sum(mask)
11 yc = np.sum(mask * image.grid.y) / np.sum(mask)
12 return np.array([xc, yc])
14 return np.array([0.0, 0.0])
def measure_center_position(image, threshold=1, mask_diameter=20)