Пример #1
0
def getZernCoeffs_infinite(
        nZerns=NZERNS, nScrns=NSCRNS, subScrnSize=SUBSCRNSIZE, r0=R0):

    scrn = infinitephasescreen.PhaseScreen(subScrnSize, 10./subScrnSize, r0, L0=100, nCol=4)

    Zs = circle.zernikeArray(nZerns+1, subScrnSize)
    piston = Zs[0]
    Zs = Zs[1:]
    Zs.shape = nZerns, subScrnSize*subScrnSize

    zCoeffs = numpy.zeros((nZerns, nScrns))
    for i in range(nScrns):
        if i % (nScrns / 10) == 0:
            print("{}% complete".format(100 * float(i) / nScrns))
        scrn.addRow(subScrnSize)

        subScrn = scrn.scrn.copy().reshape(subScrnSize*subScrnSize)

        zCoeffs[:, i] = (Zs*subScrn).sum(1)/piston.sum()

    return zCoeffs
Пример #2
0
def testAddRow_axis0_forward():

    scrn = infinitephasescreen.PhaseScreen(128, 4. / 64, 0.2, 50, nCol=4)
    scrn.addRow(1, axis=0)
Пример #3
0
def testMoveDiagonal2():

    scrn = infinitephasescreen.PhaseScreen(128, 4. / 64, 0.2, 50, nCol=4)
    scrn.moveScrn((0.3, -0.3))
Пример #4
0
def testMoveScrn_axis1_backward():

    scrn = infinitephasescreen.PhaseScreen(128, 4. / 64, 0.2, 50, nCol=4)
    scrn.moveScrn((0, -0.3))
Пример #5
0
def testMoveScrn_axis0_forward():

    scrn = infinitephasescreen.PhaseScreen(128, 4. / 64, 0.2, 50, nCol=4)
    scrn.moveScrn((0.3, 0))
Пример #6
0
def testAddMultipleRows():

    scrn = infinitephasescreen.PhaseScreen(128, 4. / 64, 0.2, 50, nCol=4)
    scrn.addRow(10, axis=0)
Пример #7
0
def testInitScreen():

    scrn = infinitephasescreen.PhaseScreen(128, 4. / 64, 0.2, 50, nCol=4)