How to use the aotools.turbulence.get_tps_time_axis 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
def test_tps_fit_minimize_func():
    # Parameters
    frame_rate = 100
    n_frames = 1000
    slopes = numpy.random.random((1000, 104))
    tps, tps_err = turbulence.calc_slope_temporalps(slopes)
    args = [20., 20., 1.]
    t_axis = turbulence.get_tps_time_axis(frame_rate, n_frames)
    D = 0.5
    plot = False

    # Test code
    V, f_noise, A = args

    return test_tps_fit()
github AOtools / aotools / test / test_temporal_ps.py View on Github external
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]
    tt_t_data = t_axis_data[tps_tt_indices]
    tt_fit = 10**A * tt_t_data**(-2./3)

    # get scaling for next part of distribution so it matches up at cutof freq.
    tps_ho_indices = numpy.where((t_axis_data>f0) & (t_axis_data
github AOtools / aotools / test / test_temporal_ps.py View on Github external
def test_get_tps_time_axis():
    frame_rate = 100
    n_frames = 1000
    t_values = turbulence.get_tps_time_axis(frame_rate, n_frames)
    assert len(t_values) == 500