def test_spectrum_trim_value_all_zeros():
    s = Spectrum([1, 2, 3, 4, 5], [0, 0, 0, 0, 0])
    s.trim(tol=0.0001)
    assert np.array_equal(s.wave, [1, 2, 3, 4, 5])
    assert np.array_equal(s.value, [0, 0, 0, 0, 0])
def test_spectrum_trim():
    s = Spectrum([1, 2, 3, 4, 5], [0.1, 1, 100, 1, 0.1])
    s.trim(tol=0.001)
    assert np.array_equal(s.wave, [2, 3, 4])
    assert np.array_equal(s.value, [1, 100, 1])