Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_phaseFromZernikes():
phase_map = functions.phaseFromZernikes([1, 2, 3, 4, 5], 32)
assert(phase_map.shape == (32, 32))
def test_gaussian2d():
gaussian = functions.gaussian2d(10, 3, 10.)
assert gaussian.shape == (10, 10)
def test_zernIndex():
results = ([0, 0], [1, 1], [1, -1], [2, 0], [2, -2], [2, 2])
for i in range(1, 6):
index = functions.zernIndex(i)
assert(index == results[i-1])
def test_aziAvg():
data = numpy.random.rand(32, 32)
azi = functions.aziAvg(data)
print(azi.shape)
assert azi.shape == (16,)