Skip to main content

PARACUDA-NG

PARAmetric CUbe Data Analysis, Next Generation

PyPI Downloads conda-forge conda downloads QGIS plugin Python License Docs Stars

Documentation: https://paracuda-ng.github.io/

PARACUDA-NG is an open-source tool for analyzing spectral data and building, validating, and applying machine-learning prediction models - designed for spectroscopy and multispectral / hyperspectral remote sensing, but usable for any tabular spectral dataset.

The interface is organized as a 7-step wizard (Data → Configuration → Preprocess → Model → Validate → Execution → Apply) with a live Model Development Flow diagram, so a complete workflow - from loading spectra to applying a trained model on a multispectral or hyperspectral image - can be run without writing any code.

PARACUDA-NG main window

Features

Data Handling

  • Flexible input: load spectral data from Excel (.xlsx, .xls, .ods) or CSV
  • Data Converter: a built-in wizard that auto-detects arbitrary instrument layouts (row-wise or transposed/column-wise), handles nm/µm units, optionally merges a separate target properties (soil/vegetation) file, and exports to the PARACUDA-NG-compatible format
  • Data checks & statistics: inspect loaded data and export summary statistics
  • Multi-property selection: analyze several properties in a single run

Spectral Processing

  • Preprocessing: Continuum Removal, First Derivative, Second Derivative, Absorbance (plus optional PCA dimensionality reduction in the model pipeline)
  • Band resampling (7 methods): Linear, Nearest-Neighbour, Quadratic and Cubic-Spline interpolation, Gaussian SRF convolution, Empirical SRF integration, and Band Averaging - for harmonizing spectra to a target sensor's band configuration
  • Wavelength exclusion: drop noisy regions with custom ranges or one-click presets (water-absorption bands, noisy detector edges)
  • Custom band definitions: upload per-band FWHM or full Spectral Response Function (SRF) tables for bandwidth-aware resampling

Modeling

  • Regression models: PLS-R, SVM, Ridge, Lasso, Multiple Linear Regression, Elastic Net, Huber Regressor, Gradient Boosting, Gaussian Process, Random Forest, and XGBoost
  • Compositional modeling: ALR / CLR / ILR log-ratio transforms so predictions of sum-constrained parts (e.g. sand + silt + clay) add up to 100%
  • Hyperparameter tuning: automated optimization (Optuna) for supported models
  • Cross-validation: K-Fold, Leave-One-Out, and Leave-P-Out strategies

Uncertainty Analysis

  • Interval methods (Step ⑤ Validate): leverage-based (ASTM E1655), Faber-Kowalski error propagation, bootstrap / bagging, quantile regression forest and conformal prediction, at 90, 95 or 99 % confidence
  • Figures of merit on training, cross-validation and test sets: bias, RMSEP, SEP, RPIQ, Lin's concordance, the RMSEP² = SEP² + bias² decomposition and an optional reference-lab-error correction
  • Interval validation: PICP, mean width, PIT histograms, quantile-coverage curves, CRPS and interval score - written to the Excel workbook and the PDF report
  • Prediction uncertainty: the fitted interval model is saved with the model, so tabular and image predictions carry per-sample / per-pixel intervals, leverage and an out-of-domain flag (images get an extra uncertainty raster)
  • Stock propagation: optional GUM + Monte Carlo propagation to SOC stock with an uncertainty budget

Batch Mode

  • Multi-model comparison: train and compare multiple models automatically
  • Best-fit recommendation: suggests the best model per property from R², RMSE, and cross-validation metrics
  • Automated plots: observed-vs-predicted scatter plots, reflectance-spectra plots, and feature-importance charts (importance bars for tree models; wavelength-correlation plots for others)
  • Comprehensive reporting: Excel workbooks with per-model comparison sheets plus multi-page PDF plot reports (model file, Excel report, and PDF share one run timestamp)

Apply to Images

  • Multispectral & hyperspectral image prediction: apply a trained model across a full image cube
  • Multi-format geospatial I/O: GeoTIFF/TIFF, ENVI (.dat/.bil/.bip/.bsq + .hdr), ERDAS Imagine (.img), NITF, and PCIDSK - wavelengths/FWHM are recovered from ENVI headers, and predictions are written back in the same format with georeferencing preserved
  • Robust handling: automatic gain/offset scaling, background/no-data and bad-band masking, and memory-safe chunked processing for large scenes
  • Resampled-cube export: optionally export the resampled image (or tabular spectra) to verify the harmonization step

Interface

  • Themes: Ocean, Slate, Forest, Light-Contrast, and Dark (View → Theme)
  • Model Development Flow: a live, themed pipeline diagram that reflects your current settings and can be exported at 300 DPI
  • Built-in Help Assistant: searchable in-app guidance (Help menu)

Data Converter

Not every instrument exports data in the layout PARACUDA-NG expects. The PARACUDA-NG Data Converter (Tools → Data Converter, or the paracuda-converter command) is a three-step wizard - Load Data → Configure → Preview & Export - that auto-detects the layout of an arbitrary Excel/CSV file and converts it to the standard Names | Prop1 … PropN | WL1 … WLM format.

PARACUDA-NG Data Converter

Project Structure

PARACUDA-NG is organized into focused packages:

Path Contents
paracuda/__init__.py Package entry point -paracuda(), launch(), Paracuda
paracuda/gui/ Tkinter application, split into composable mixins
paracuda/preprocessing/ Spectral preprocessing, resampling, compositional transforms
paracuda/models/ Model training, hyperparameter tuning, batch processing
paracuda/validation/ Cross-validation
paracuda/utils/ File I/O, data converter, image processing, help assistant
paracuda/samples.py Bundled example data -load_sample(), sample_path(), view()
paracuda/data/ The example workbooks installed with the package
paracuda/theme.py Shared color themes
pyproject.toml Packaging metadata and dependency list

Installation

PARACUDA-NG is a standard Python package. Installing it pulls in every dependency (NumPy, pandas, scikit-learn, SciPy, matplotlib, XGBoost, Optuna, rasterio, spectral, Pillow, openpyxl, xlrd, odfpy) automatically:

pip install paracuda-ng

To install from a clone of this repository instead:

pip install .

Requires Python 3.10 or newer with Tkinter available (bundled with the standard python.org and Conda installers; on Debian/Ubuntu install python3-tk).

Usage

Open the GUI from Python:

import paracuda_ng

paracuda_ng()       # opens the PARACUDA-NG window

Equivalent ways to start it:

from paracuda_ng import launch
launch()

import paracuda_ng
paracuda_ng.launch()

From a terminal, the installer also puts two commands on your PATH:

paracuda             # main application
paracuda-converter   # standalone Data Converter wizard

or run the package as a module:

python -m paracuda_ng

For headless / scripted use the main window class is importable directly:

from paracuda_ng import Paracuda

Bundled Example Data

Two example workbooks are installed together with the package, so there is nothing to download before trying PARACUDA-NG out - and they double as a reference for the input layout it expects (Names | Prop1 … PropN | WL1 … WLM):

import paracuda_ng

sample = paracuda_ng.load_sample()    # DataFrame: 598 soil samples × 25 columns
paracuda_ng.view(sample)              # opens it in Excel

paracuda_ng.load_sample("unknown")    # 32 held-out samples, for the Apply step
paracuda_ng.list_samples()            # -> ['sample', 'unknown']
paracuda_ng.sample_path()             # full path, e.g. to load through the GUI

Both sets contain the sample name, eight measured soil properties (Sand, Silt, Clay, BD, pH, CaCO, OC, CarbonStock) and 16 spectral bands.

view() also accepts a DataFrame of your own - it is written to a temporary workbook and handed to whatever program opens .xlsx files on your system (Excel on Windows, or LibreOffice / Numbers elsewhere) - or the path of an existing spreadsheet:

paracuda_ng.view(my_dataframe)
paracuda_ng.view("results.xlsx")
paracuda_ng.view()                    # opens the bundled sample

Typical Workflow

A typical batch workflow:

  1. Data - load spectral data and select one or more properties
  2. Configuration / Preprocess - choose resampling, exclusions, and preprocessing
  3. Model / Validate - pick single or multiple models and a cross-validation strategy
  4. Execution - run the analysis to get an Excel report, PDF plots, and best-model recommendations, then save the trained model
  5. Apply - load a multispectral or hyperspectral image, or a new dataset, and predict with the saved model

Changelog

Version 2.0.0 adds uncertainty analysis and corrects several preprocessing, validation and integrity-test methods, so results can differ from 1.x. The desktop tool, the Python package and the QGIS plugin give bit-identical results on the same data. See the changelog on the documentation site for the full list.

License

Code in this repository is licensed under the MIT License. See the LICENSE file for details.

Citation

If you use this software in your research, please cite:

@software{ParacudaNG2026,
author = {Sharad Kumar Gupta, Jonti Evan Shepherd, Eyal Ben-Dor},
title = {PARACUDA-NG: An Open-Source Machine Learning tool for Spectroscopic Analysis},
year = {2026},
url = {https://github.com/sharadgupta27/paracuda-ng}
}

Acknowledgement

PARACUDA-NG takes its inspiration from the PARACUDA tool (based on Excel) developed by Schwartz et al. (2013) and PARACUDA II (MATLAB) by Carmon and Ben-Dor (2017).

  1. Schwartz, G. (2013). Reflectance Spectroscopy as a Rapid Tool for Quantitative Mapping of Hydrocarbons Soil Contamination (PhD dissertation). The Porter School of Environmental Studies, Tel Aviv University. Supervised by Prof. Eyal Ben-Dor and Dr. Gil Eshel.
  2. Carmon, N., and Ben-Dor, E. (2017). An advanced analytical approach for spectral-based modelling of soil properties. International Journal of Emerging Technologies and Advanced Engineering, 7, 90-97.

Commercial Use

The code is MIT-licensed, so commercial use is permitted - keeping the copyright notice is all that is required. For collaboration or support enquiries, contact: sharadgupta27@gmail.com & jontis@mail.tau.ac.il

Metadata

Release files for paracuda-ng 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for paracuda-ng 2.0.0
File Size Uploaded Provenance Actions
paracuda_ng-2.0.0.tar.gz 523.6 kB Without provenance Details for paracuda_ng-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for paracuda-ng 2.0.0
File Interpreter ABI Platform Actions
paracuda_ng-2.0.0-py3-none-any.whl Python 3 none any Details for paracuda_ng-2.0.0-py3-none-any.whl

Total release size: 1.1 MB

Release files / paracuda_ng-2.0.0.tar.gz

Download URL paracuda_ng-2.0.0.tar.gz
Size 523.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3f5b026b3d51e9bbfcf1b456061dd661b1f63abee804519b6ae94fe7d756aebd
BLAKE2b-256 checksum
How to use checksums
443cfe182c911f7076804d3b47ce396636e38536fe7164adaaaeec847821ba58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Release files / paracuda_ng-2.0.0-py3-none-any.whl

Download URL paracuda_ng-2.0.0-py3-none-any.whl
Size 527.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d0d1745773a97b8604b5e599d768b80d296a84fbefbe08f7ee912100d97f78e
BLAKE2b-256 checksum
How to use checksums
d89f481e5bbb3236921c787c4f0c1ec5dd88bcac87472d9f75aab01ee1be7d67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.7

Security for paracuda-ng 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page