Read SP Perkin Elmer IR binary fileΒΆ

This example shows how to read SP file and plot the results.

../../_images/sphx_glr_plot_read_sp_001.png

Out:

/home/docs/checkouts/readthedocs.org/user_builds/specio/envs/stable/local/lib/python2.7/site-packages/specio/datasets/data/spectra.sp

# 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()

Total running time of the script: ( 0 minutes 0.060 seconds)

Gallery generated by Sphinx-Gallery