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.
Current official pluginsο
Domain |
Package |
Namespace |
Typical use |
|---|---|---|---|
IRIS |
|
|
2D-IRIS analysis, IRIS kernels, dataset-bound IRIS operations. |
NMR |
|
|
TopSpin/Bruker NMR reading and NMR-specific processing utilities. |
Tensor |
|
|
TensorLy-backed tensor decompositions such as CP/PARAFAC. |
Hypercomplex |
|
|
Quaternion/hypercomplex support for phase-sensitive 2D NMR. |
Carroucell |
|
|
Carroucell experiment reader for spectroscopic data. |
Install commandsο
Official plugins can be installed through SpectroChemPy extras:
pip install spectrochempy[iris]
pip install spectrochempy[nmr]
pip install spectrochempy[tensor]
pip install spectrochempy[nmr,hypercomplex] # NMR with 2D hypercomplex support
or directly:
pip install spectrochempy-iris
pip install spectrochempy-nmr
pip install spectrochempy-tensor
pip install spectrochempy-hypercomplex
pip install spectrochempy-carroucell
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. A core release and a plugin release therefore do not need to share the
same version number. For example, a stable spectrochempy 0.9.2 environment
may use spectrochempy-nmr 0.1.3.
Stable plugin packages are published on PyPI and on the main spectrocat
conda channel. Conda development builds for official plugins are currently not
published automatically; they will be re-enabled once plugin development builds
use versions distinct from stable releases.
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 lightweight package metadata such
as versions. This inspection command reads entry-point and package metadata; it
does not import optional plugin implementation modules.
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_topspin("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.
Plugin summariesο
IRISο
The spectrochempy-iris plugin provides 2D-IRIS analysis tools for
spectroscopic adsorption and diffusion studies.
pip install spectrochempy[iris]
import spectrochempy as scp
kernel = dataset.iris.kernel_matrix(kernel_type="langmuir")
analysis = scp.iris.IRIS()
NMRο
The spectrochempy-nmr plugin provides Bruker TopSpin reading and
NMR-specific workflows.
pip install spectrochempy[nmr]
import spectrochempy as scp
dataset = scp.nmr.read_topspin("path/to/fid")
Tensorο
The spectrochempy-tensor plugin provides TensorLy-backed tensor
decomposition classes. CP/PARAFAC is available now; the package layout reserves
space for future tensor methods such as Tucker and TensorTrain.
pip install spectrochempy[tensor]
import spectrochempy as scp
model = scp.tensor.CP(n_components=2)
model.fit(dataset)
Hypercomplexο
The spectrochempy-hypercomplex plugin provides quaternion/hypercomplex
support for multi-dimensional complex data, primarily used in phase-sensitive
2D NMR.
pip install spectrochempy-hypercomplex
import spectrochempy as scp
# After reading 2D NMR data, convert to hypercomplex
dataset = scp.nmr.read_topspin("path/to/ser")
dataset.hyper.set_quaternion(inplace=True)
# Extract components
rr = dataset.hyper.RR
ri = dataset.hyper.component("RI")
Carroucellο
The spectrochempy-carroucell plugin provides the Carroucell experiment
reader for spectroscopic data analysis.
pip install spectrochempy-carroucell
import spectrochempy as scp
dataset = scp.carroucell.read_carroucell("path/to/carroucell_dir")
Examples and gallery conventionο
Examples remain organized by scientific topic in the central SpectroChemPy
gallery. Plugin-dependent examples live with the plugin source and are staged
into the central gallery from the plugin examples/gallery.toml manifest.
They should be clearly marked with their required plugin, but they do not need
a separate plugin-only gallery.