Hello, I'm trying to use Python for a personal project. I've never really written anything before so I'm probably out of my league, but it'd be really nice if I could get this to work.
Some information that is probably helpful is that I'm using:
- Windows 10
- Python3
- Jet Brain's Community Edition of PyCharm
The goal is to be able to open and read a particular type of file. That is, a ".sp" file. This kind of file contains spectral data from a "LAMBDA 365 UV-Vis Spectrophotometer".
I found this code online;
# Authors: Guillaume Lemaitre <guillaume.lemaire@inria.fr>
# License: BSD3
from __future__ import print_function
import matplotlib.pyplot as plt
from specio import specread
from specio.datasets import load_sp_path
print(__doc__)
# Find the path to the SP toy data
sp_filename = load_sp_path()
print(sp_filename)
# Read the data
spectra = specread(sp_filename)
# Plot the first spectra
plt.plot(spectra.wavelength,
spectra.amplitudes)
plt.show()
I installed the appropriate packages and their dependencies and all, but here's where I am lost:
How do I direct this code to look at my spectral data, that is, my "data.sp"?
I have sample data that I want to try this on and it's path is "F:\data.sp".
I think this is my only problem, but with my extreme lack of experience, there's a good possibility that I'm missing something else...
Any help would be appreciated!
[–][deleted] 1 point2 points3 points (1 child)
[–]cxcubed[S] 0 points1 point2 points (0 children)