def test_leastsqnrm_populate_symmamparray():
    ''' Test of populate_symmamparray in leastsqnrm module.
        Populate the symmetric fringe amplitude array.
    '''
    amps = np.array([0.1, 0.2, 0.3, 0.2, 0.05, 0.7, 0.3, 0.1, 0.2, 0.8])
    N = 5

    arr = populate_symmamparray(amps, N=N)

    true_arr = np.array([[0.0, 0.1, 0.2, 0.3, 0.2], [0.1, 0.0, 0.05, 0.7, 0.3],
                         [0.2, 0.05, 0.0, 0.1, 0.2], [0.3, 0.7, 0.1, 0.0, 0.8],
                         [0.2, 0.3, 0.2, 0.8, 0.0]])
    assert_allclose(arr, true_arr, atol=1E-8)
def test_leastsqnrm_populate_symmamparray():
    """Test of populate_symmamparray in leastsqnrm module.
    Populate the symmetric fringe amplitude array.
    """
    amps = np.array([0.1, 0.2, 0.3, 0.2, 0.05, 0.7, 0.3, 0.1, 0.2, 0.8])
    n = 5

    arr = populate_symmamparray(amps, n=n)

    true_arr = np.array([
        [0.0, 0.1, 0.2, 0.3, 0.2],
        [0.1, 0.0, 0.05, 0.7, 0.3],
        [0.2, 0.05, 0.0, 0.1, 0.2],
        [0.3, 0.7, 0.1, 0.0, 0.8],
        [0.2, 0.3, 0.2, 0.8, 0.0],
    ])
    assert_allclose(arr, true_arr, atol=1e-8)