How to use the aotools.turbulence 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_temporal_ps.py View on Github external
Uses the temporal power spectrum and time-axis data to test the validity of a coherence time. A frequency above which fitting is not performaed should also be given, as noise will be the dominant contributor above this.

    Parameters:
        tps (ndarray): Temporal power spectrum to fit
        t_axis_data (ndarray): Time axis data
        D (float): (sub-) Aperture diameter
        V (float): Integrated wind speed
        f_noise (float): Frequency above which noise dominates.
        A (float): Initial Guess of
    """
    # Parameters
    frame_rate = 100
    n_frames = 1000
    slopes = numpy.random.random((1000, 104))
    tps, error_spectra = turbulence.calc_slope_temporalps(slopes)
    t_axis_data = turbulence.get_tps_time_axis(frame_rate, n_frames)
    D = 0.5
    V = 20
    f_noise = t_axis_data[-2]
    A = 1
    tps_err = None
    plot = False

    t_values = turbulence.get_tps_time_axis(frame_rate, n_frames)

    # Start testing function
    f0 = 0.3 * V/D

    if f0f_noise or f_noise>t_axis_data.max():
        return 10**99

    tps_tt_indices = numpy.where((t_axis_data0))[0]
github AOtools / aotools / test / test_temporal_ps.py View on Github external
def test_calc_slope_temporalps():
    slopes = numpy.random.random((1000, 104))
    mean_spectra, error_spectra = turbulence.calc_slope_temporalps(slopes)
    assert len(mean_spectra) == 500
    assert len(error_spectra) == 500
github AOtools / aotools / test / test_temporal_ps.py View on Github external
Uses the temporal power spectrum and time-axis data to test the validity of a coherence time. A frequency above which fitting is not performaed should also be given, as noise will be the dominant contributor above this.

    Parameters:
        tps (ndarray): Temporal power spectrum to fit
        t_axis_data (ndarray): Time axis data
        D (float): (sub-) Aperture diameter
        V (float): Integrated wind speed
        f_noise (float): Frequency above which noise dominates.
        A (float): Initial Guess of
    """
    # Parameters
    frame_rate = 100
    n_frames = 1000
    slopes = numpy.random.random((1000, 104))
    tps, error_spectra = turbulence.calc_slope_temporalps(slopes)
    t_axis_data = turbulence.get_tps_time_axis(frame_rate, n_frames)
    D = 0.5
    V = 20
    f_noise = t_axis_data[-2]
    A = 1
    tps_err = None
    plot = False

    t_values = turbulence.get_tps_time_axis(frame_rate, n_frames)

    # Start testing function
    f0 = 0.3 * V/D

    if f0f_noise or f_noise>t_axis_data.max():
        return 10**99
github AOtools / aotools / test / testphasescreen.py View on Github external
def test_ftShScrn():
    scrn = turbulence.ft_sh_phase_screen(0.2, 512, 4.2/128, 30., 0.01)
github AOtools / aotools / test / testphasescreen.py View on Github external
def test_ftScrn():

    scrn = turbulence.ft_phase_screen(0.2, 512, 4.2/128, 30., 0.01)