示例#1
0
def test_fit_does_not_throw_on_normalize(fit_data):
    data, real_coefs = fit_data
    coefs = fringezernike.fit(data, rms_norm=True)
    assert coefs[8] != 0
示例#2
0
def test_fit_raises_on_too_many_terms(fit_data):
    data, real_coefs = fit_data
    with pytest.raises(ValueError):
        fringezernike.fit(data, num_terms=100)
示例#3
0
def test_fit_agrees_with_truth(fit_data):
    data, real_coefs = fit_data
    coefs = fringezernike.fit(data)
    real_coefs = np.asarray(real_coefs)
    assert coefs[8] == pytest.approx(real_coefs[8])