def test_common_interface(method, center_data, freq, data):
    t, y, dy = data

    if freq is None:
        freq_expected = LombScargle(t, y, dy).autofrequency(t)
    else:
        freq_expected = freq

    expected_PLS = lombscargle_slow(t, y, dy=None, frequency=freq_expected,
                                    fit_bias=False, center_data=center_data)
    PLS = lombscargle(t, y, frequency=freq, method=method,
                      fit_bias=False, center_data=center_data)

    if method in ['fastchi2', 'fast', 'auto']:
        atol = 0.005
    else:
        atol = 0
    assert_allclose(PLS, expected_PLS, atol=atol)