How to use the aotools.functions function in aotools

To help you get started, we’ve selected a few aotools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AOtools / aotools / test / test_zernike.py View on Github external
def test_phaseFromZernikes():
    phase_map = functions.phaseFromZernikes([1, 2, 3, 4, 5], 32)
    assert(phase_map.shape == (32, 32))
github AOtools / aotools / test / test_functions.py View on Github external
def test_gaussian2d():
    gaussian = functions.gaussian2d(10, 3, 10.)
    assert gaussian.shape == (10, 10)
github AOtools / aotools / test / test_zernike.py View on Github external
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])
github AOtools / aotools / test / test_functions.py View on Github external
def test_aziAvg():
    data = numpy.random.rand(32, 32)
    azi = functions.aziAvg(data)
    print(azi.shape)
    assert azi.shape == (16,)