How to use the aotools.turbulence.phasescreen.ft_phase_screen 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 / testOpticalprop.py View on Github external
def test_two_step_fresnel():
    screen = phasescreen.ft_phase_screen(0.16, 512, 4.2 / 512, 100, 0.01)

    # Input E Field
    E = numpy.exp(1j * screen)

    E_out = opticalpropagation.twoStepFresnel(E, 500e-9, 4.2 / 512, 4.2 / 512, 10000)
github AOtools / aotools / test / testOpticalprop.py View on Github external
def test_lensAgainst():
    screen = phasescreen.ft_phase_screen(0.16, 512, 4.2 / 512, 100, 0.01)

    # Input E Field
    E = numpy.exp(1j * screen)

    E_out = opticalpropagation.lensAgainst(E, 500e-9, 4.2/512, 0.3)
github AOtools / aotools / test / testOpticalprop.py View on Github external
def test_one_step_fresnel():
    screen = phasescreen.ft_phase_screen(0.16, 512, 4.2 / 512, 100, 0.01)

    # Input E Field
    E = numpy.exp(1j * screen)

    E_out = opticalpropagation.oneStepFresnel(E, 500e-9, 4.2/512, 10000)
github AOtools / aotools / test / testOpticalprop.py View on Github external
def fresnel_comparison():
    screen = phasescreen.ft_phase_screen(0.16, 512, 4.2 / 512, 100, 0.01)

    # Input E Field
    E = numpy.exp(1j * screen)

    E_one = opticalpropagation.oneStepFresnel(E, 500e-9, 4.2 / 512, 10000)
    E_two = opticalpropagation.twoStepFresnel(E, 500e-9, 4.2 / 512, 4.2 / 512, 10000)

    assert numpy.allclose(E_one, E_two)
github AOtools / aotools / test / testOpticalprop.py View on Github external
def test_propagation_conserves_intensity():
    screen = phasescreen.ft_phase_screen(0.16, 512, 4.2 / 512, 100, 0.01)

    # Input E Field
    E = numpy.exp(1j * screen)

    Em = E * circle(150, 512)
    sum1 = (abs(Em) ** 2).sum()
    prop1 = opticalpropagation.angularSpectrum(Em, 500e-9, 4.2 / 512, 4.2 / 512, 10000.)
    sum2 = (abs(prop1) ** 2).sum()

    assert numpy.allclose(sum1, sum2)
github AOtools / aotools / test / testOpticalprop.py View on Github external
def test_propagation_round_trip():
    screen = phasescreen.ft_phase_screen(0.16, 512, 4.2 / 512, 100, 0.01)

    # Input E Field
    E = numpy.exp(1j * screen)

    prop1 = opticalpropagation.angularSpectrum(E, 500e-9, 4.2 / 512, 4.2 / 512, 10000.)
    prop2 = opticalpropagation.angularSpectrum(prop1, 500e-9, 4.2 / 512, 4.2 / 512, -10000.)

    assert numpy.allclose(E, prop2)
github AOtools / aotools / aotools / turbulence / infinitephasescreen_fried.py View on Github external
def makeInitialScrn(self):
        """
        Makes the initial screen usign FFT method that can be extended 
        """
        
        self._scrn = phasescreen.ft_phase_screen(
                self.r0, self.stencil_length, self.pixel_scale, self.L0, 1e-10
                )

        self._scrn = self._scrn[:, :self.nx_size]
github AOtools / aotools / aotools / turbulence / infinitephasescreen.py View on Github external
def make_initial_screen(self):
        """
        Makes the initial screen usign FFT method that can be extended 
        """

        self._scrn = phasescreen.ft_phase_screen(
            self.r0, self.stencil_length, self.pixel_scale, self.L0, 1e-10
        )

        self._scrn = self._scrn[:, :self.nx_size]