finalized the test_sub and test_sub_value in the test_spectrum.py