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_encircled_energy_func():
data = numpy.random.rand(32, 32)
x, y = image_processing.encircled_energy(data, eeDiameter=False)
print(y.min(), y.max())
assert len(x) == len(y)
assert numpy.max(y) <= 1
assert numpy.min(y) >= 0
def test_image_contrast():
image = numpy.random.random((20, 20))
contrast = image_processing.image_contrast(image)
assert type(contrast) == float
def test_brightestPxl_single():
img = numpy.random.random((10, 10))
com = image_processing.brightestPxl(img, 0.3)
assert(com.shape[0] == 2)