Welcome to Spectra's documentation!
Introduction
Spectra.jl is a Julia package designed to simplify the treatment of spectroscopic data (Raman, Infrared, Nuclear Magnetic Resonance, XAS, etc.). It provides straightforward tools for common tasks such as smoothing, baseline fitting, and peak fitting, while preserving the flexibility and power of programmatic data analysis in Julia. Spectra.jl is particularly suited for large datasets and integrates well with other Julia packages, such as JuMP for model building.
Please consult this documentation to learn how to use Spectra.jl. Check the Tips section if you encounter issues, and feel free to report problems or suggest improvements!
Starting Notes
Reading the docs is strongly recommended!
If you are new to Julia, start by reading the official documentation of Julia.
You can develop your code in text editors such as Visual Studio Code, or use interactive environments such as IJulia Jupyter notebooks or the reactive Pluto notebooks.
Spectra v2.0.0 API has evolved a lot since v1.0.0. There are breaking changes that may require to update your codes.
Installation
Cloud (JuliaHub):
- Launch a notebook on JuliaHub.
- In your first cell, run:
using Pkg Pkg.add("Spectra")
Local:
- Download Julia from the official website.
- Open the Julia REPL, press
]
to enter package mode (Pkg>
), then run:Pkg> add Spectra
Getting help
The search bar on the top left of this website is useful to search the documentation, or also you can use the function index at the end of this page for instance.
You can also use the help mode in Julia's REPL by typing
?
in the REPL, then the function name:
julia> ?
help?> function_you_want_to_know_about
- If you encounter issues or have suggestions, open an issue on GitHub with details about your setup and steps to reproduce any errors.
Contributing
Contributions are welcome! You can fork the project, submit pull requests, or open issues for bugs and feature requests. The feature set is not exhaustive, and community help is appreciated.
Citing Spectra
If you use Spectra.jl in your work, please cite:
LE LOSQ, C. (2016) Spectra: a Julia package for processing spectroscopic data. Zenodo. 10.5281/zenodo.53940
Index
The functions available in Spectra.jl are listed below. See the rest of the documentation for detailed usage.
Spectra.FitContext
Spectra.FitResult
Spectra.als_baseline
Spectra.arPLS_baseline
Spectra.area_peaks
Spectra.baseline
Spectra.bootsample
Spectra.bootstrap
Spectra.centroid
Spectra.correct_xshift
Spectra.create_peaks
Spectra.despiking
Spectra.drPLS_baseline
Spectra.extract_signal
Spectra.find_peaks
Spectra.fit_Optim
Spectra.fit_peaks
Spectra.fit_qNewton
Spectra.flipsp
Spectra.gaussian
Spectra.get_peak_results
Spectra.invcm_to_nm
Spectra.lorentzian
Spectra.mlexplorer
Spectra.mlregressor
Spectra.nm_to_invcm
Spectra.normal_dist
Spectra.normalise
Spectra.peakmeas
Spectra.pearson7
Spectra.plot_fit
Spectra.poly
Spectra.prepare_context
Spectra.print_params
Spectra.pseudovoigt
Spectra.resample
Spectra.rubberband_baseline
Spectra.smooth
Spectra.tlcorrection
Spectra.whittaker
Spectra.xshift_direct