Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def samplepoints():
# sample a lot of points from one error image - save computation cost
point_list = []
y,x,d = wherediff()
phasemap = gradient.get_phase(flower)
# while not enough points:
while len(point_list)0.5*rn():
# get gradient orientation info from phase map
phase = phasemap[ry,rx] # phase should be between [0,2pi)
# choose direction perpendicular to gradient
angle = (phase/math.pi*180+90)%360
# angle = 22.5