Skip to content

Instantly share code, notes, and snippets.

def distance(point1,point2):
return sqrt((point1[0]-point2[0])**2 + (point1[1]-point2[1])**2)
def gaussianLP(D0,imgShape):
base = np.zeros(imgShape[:2])
rows, cols = imgShape[:2]
center = (rows/2,cols/2)
for x in range(cols):
for y in range(rows):
base[y,x] = exp(((-distance((y,x),center)**2)/(2*(D0**2))))
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def FrontierSimplePower12(x):
if x <= 500:
return 53
else:
return 53 + (x-500)*(0.1286+0.038447)
def constellation(x):
rate = 0.074
return 3.42+(0.038447+rate)*x