Official plugins#
SpectroChemPy can be extended by plugins. Some plugins are maintained as part of the SpectroChemPy project and are considered official plugins. They use the same plugin discovery mechanism as third-party plugins, but their API, examples, tests, and documentation are coordinated with the main project.
Official plugins should feel like part of SpectroChemPy once installed. They are not loaded manually: import SpectroChemPy, then use the documented namespace.
See the reader catalog for file formats, reader functions, and their required plugins.
Current official plugins#
Domain |
Package |
Namespace |
Typical use |
|---|---|---|---|
IRIS |
|
|
2D-IRIS analysis, IRIS kernels, dataset-bound IRIS operations. |
NMR |
|
|
NMR file readers and processing tools. |
Tensor |
|
|
TensorLy-backed tensor decompositions such as CP/PARAFAC. |
Carroucell |
|
|
Carroucell experiment reader for spectroscopic data. |
PerkinElmer |
|
|
PerkinElmer |
Install commands#
Official plugins can be installed through SpectroChemPy extras:
python -m pip install "spectrochempy[iris]"
python -m pip install "spectrochempy[nmr]"
python -m pip install "spectrochempy[tensor]"
The PerkinElmer plugin does not have a dedicated extra in the core distribution. Install its package directly:
python -m pip install spectrochempy-perkinelmer
or directly:
pip install spectrochempy-iris
pip install spectrochempy-nmr
pip install spectrochempy-tensor
pip install spectrochempy-carroucell
pip install spectrochempy-perkinelmer
Once installed, plugins are discovered automatically. No explicit plugin loading call is required in user code.
Versions and compatibility#
Official plugins are versioned independently from the SpectroChemPy core package. See the NMR installation guide for the supported core and plugin combinations for NMR.
Stable plugin packages are published on PyPI and on the main spectrocat
conda channel. Conda development builds are not published; users who need
unreleased plugin changes should install the plugin from a source checkout.
Inspect installed plugins#
Use scp.plugins() to see which official plugins are installed and which
plugin namespaces are available:
import spectrochempy as scp
scp.plugins()
Use scp.plugins(verbose=True) to include installed versions.
API convention#
The recommended form is namespaced:
import spectrochempy as scp
analysis = scp.iris.IRIS()
model = scp.tensor.CP(n_components=2)
dataset = scp.nmr.read("path/to/fid")
Dataset accessors are reserved for operations that act on an existing dataset:
kernel = dataset.iris.kernel_matrix(kernel_type="langmuir")
Some official plugins may expose limited root-level compatibility aliases, such
as scp.IRIS. New examples should prefer the namespaced form,
scp.iris.IRIS or scp.tensor.CP.
Generated plugin-owned public API pages are collected in Plugin public API reference.
Plugin summaries#
The table above is the quick reference. The dedicated plugin pages below provide the user-facing details:
IRIS plugin for 2D-IRIS workflows and the
scp.iris/dataset.irisAPIsNMR plugin for NMR readers and NMR-specific processing workflows
Tensor plugin for TensorLy-backed tensor decompositions such as CP/PARAFAC
Carroucell plugin for carroucell experiment directory imports
PerkinElmer plugin for PerkinElmer
.spIR file reading
Examples and gallery convention#
See Plugin examples for examples in the core gallery and links to the NMR gallery.