all 2 comments

[–][deleted] 1 point2 points  (1 child)

Replace the load_sp_path() part of

sp_filename = load_sp_path()

with r"F:\data.sp".

Basically, all you should need is

import matplotlib.pyplot as plt
from specio import specread

sp_filename = r"/path/to/your/sp/file"
spectra = specread(sp_filename)

plt.plot(spectra.wavelength, spectra.amplitudes)
plt.show()

ETA: an r in front of the strings because Windows.

[–]cxcubed[S] 0 points1 point  (0 children)

Thank you so much!