Ejemplo n.º 1
0
def test_spectrum_crop_outside_wave_limits():
    s = Spectrum([1, 2, 3, 4, 5], [0.1, 1, 100, 1, 0.1])
    s.crop(2, 10)
    assert np.array_equal(s.wave, [2, 3, 4, 5])
    assert np.array_equal(s.value, [1, 100, 1, 0.1])
Ejemplo n.º 2
0
def test_spectrum_crop():
    s = Spectrum([1, 2, 3, 4, 5], [0.1, 1, 100, 1, 0.1])
    s.crop(2, 5)
    assert np.array_equal(s.wave, [2, 3, 4, 5])
    assert np.array_equal(s.value, [1, 100, 1, 0.1])