Releases: chandrasekarnarayana/foodspec
foodspec
🟩 foodspec v0.2.0 — First Public Release (Foundational Version)
A headless, reproducible Python toolkit for Raman/FTIR spectroscopy in food science
We are pleased to announce foodspec v0.2.0, the first stable public release of a research-grade, reproducible Python toolkit for Raman, FTIR, and NIR spectral analysis in food science.
This version establishes a solid and extensible foundation for spectral preprocessing, chemometrics, ML workflows, and CLI-driven reproducibility.
It is designed to support forthcoming protocol publications, benchmarking, and collaborative method development.
Note: This is a foundational release intended to publish the package name on PyPI, allow collaborators to install/test, and stabilize the core API.
Public-dataset integrations and full benchmark workflows will be added in the next phase (v0.3+).
🎯 Scope & Goals of v0.2.0
- Deliver a stable, installable package for collaborators and early adopters
- Provide robust data models, preprocessing, and analysis workflows
- Establish a structured documentation system covering concepts, workflows, and reference guides
- Implement a fully functional CLI interface for reproducible pipelines
- Finalize architectural foundations for the upcoming MethodsX protocol paper
- Maintain high test coverage and continuous integration
✨ Key Features in v0.2.0
🧬 Unified Spectral Data Structures
FoodSpectrumSetfor 1D Raman/FTIR/NIR spectraHyperSpectralCubefor 2D/3D hyperspectral imaging workflows- Built-in validation (shapes, wavenumber axes, metadata, NaNs)
- High-integrity HDF5 storage with JSON metadata
These form the reproducibility backbone for future protocol work.
🔧 Comprehensive Preprocessing Suite
All major vibrational spectroscopy preprocessing tools are supported:
- ALS and rubberband baseline correction
- Savitzky–Golay smoothing and derivatives
- SNV and MSC scatter correction
- Area / vector / internal-peak normalization
- Wavenumber cropping and spectral alignment
- FTIR/Raman-specific utilities (ATR correction, atmospheric removal, cosmic-ray handling)
Every transformer follows a fit/transform API compatible with scikit-learn pipelines.
🧪 Feature Extraction & Chemometrics
Core chemometric tools implemented and tested:
- PCA (scores, loadings, explained variance)
- PLS & PLS-DA
- ML models: SVM, Random Forest, Logistic Regression, KNN
- Ratio extraction, peak integration, band analysis
- Cosine/correlation fingerprint similarity
- Cross-validation, metrics utilities, and standardized reporting tools
This release fully supports classical chemometrics; deep workflows are planned for v0.4+.
🚀 Command-Line Interface (CLI)
A full suite of reproducible CLI workflows is available:
foodspec about
foodspec preprocess
foodspec csv-to-library
foodspec oil-auth
foodspec heating
foodspec qc
foodspec mixture
foodspec hyperspectral
foodspec protocol-benchmarks
foodspec reproduce-methodsx
Workflows automatically generate:
run_metadata.jsonmetrics.json- plots and diagnostics
- Markdown reports
Enabling zero-code reproducibility for research groups.
🗂 Model Registry
Save and load pipelines, models, and preprocessors:
from foodspec.registry import save_model, load_modelIncludes versioning, timestamps, environment metadata, and CLI provenance.
📚 Documentation (Phase-1 Complete)
Documentation site:
🔗 https://chandrasekarnarayana.github.io/foodspec/
Included:
- Installation & quickstart (Python + CLI)
- Preprocessing guide for Raman/FTIR
- Workflows: oil authentication, heating, mixture, QC, hyperspectral
- Keyword index
- ML models & metrics interpretation
- Stats tests (conceptual + SciPy examples)
- Reporting guidelines for scientific publications
- Troubleshooting & FAQ
- API reference via mkdocstrings
- Early domain templates (meat/microbial)
- Protocol/reproducibility framework (MethodsX mapping)
Documentation pages are complete structurally, but several sections (public datasets, notebooks, full benchmarks) will be expanded in the next release cycle.
🧪 Quality & Testing
- 129 tests covering preprocessors, IO, ML, CLI workflows, hyperspectral, validators, and reporting
- ~91% coverage (target ≥80%)
- All workflows tested with synthetic datasets
- CI via GitHub Actions (tests + docs build)
- Stable API expected for all v0.2.x releases
This release is ready for academic and research use.
🚧 Limitations / Phase-2 Items (v0.3 planned)
The following will be added in upcoming releases:
- ✔ Public dataset loaders (FTIR oil dataset, Raman oil dataset, NIR milk dataset, HSI food dataset)
- ✔ Jupyter notebooks with full reproducible pipelines
- ✔ Benchmark automation with real public datasets
- ✔ Complete MethodsX protocol reproduction
- ✔ Advanced hyperspectral workflows
- ✔ Deep-learning support (
foodspec[deep]) - ✔ Expanded documentation in conceptual and tutorial areas
📦 Installation
pip install foodspecMinimum Python version: 3.10+.
Optional components (future release):
pip install "foodspec[deep]"🗺 Roadmap
v0.3 — Public Benchmarking Release
- Download tools
- Dataset loaders
- Full preprocessing + ML notebooks
- Benchmark reproducibility suite
v0.4 — Protocol Integration
- Complete MethodsX protocol workflows
- Publication-ready figures
- Advanced spectral processing
v1.0 — Stable Release
- Finalized API
- Extensive examples
- Full instrument-general workflows
- MethodsX protocol paper publication
📢 Citation
Chandrasekar S. N et al. FoodSpec: A Reproducible Python Toolkit for Raman and FTIR Spectroscopy in Food Science. Version 0.2.0, 2025. GitHub: https://github.com/chandrasekarnarayana/foodspec
🙏 Acknowledgements
This release reflects the combined strength of the scientific Python ecosystem, open-source contributors, and the global food spectroscopy research community. The FoodSpec project would not have been possible without the generous guidance, technical insight, and collaborative spirit of several individuals.
I extend my sincere gratitude to:
-
Dr. Jhinuk Gupta
Department of Food and Nutritional Sciences, SSSIHL, Andhra Pradesh, India -
Dr. Sai Muthukumar V
Department of Physics, SSSIHL, Andhra Pradesh, India -
Ms. Amrita Shaw
Department of Food and Nutritional Sciences, SSSIHL, Andhra Pradesh, India -
Deepak L. N. Kallepalli
Cognievolve AI Inc., Canada & HCL Technologies Ltd., Bangalore, India
We hope FoodSpec empowers researchers to build transparent, reproducible, and high-quality Raman/FTIR workflows, accelerating progress in food spectroscopy worldwide. This release is only the beginning, and we look forward to expanding the toolkit with more datasets, methods, and validated protocols in the releases to come.