eemkit
Python tools and a desktop application for fluorescence excitation-emission matrices (EEMs) of dissolved organic matter: instrument import, corrections, fluorescence indices and validated PARAFAC modelling, with every processing step recorded so that an analysis can be repeated exactly.
What it does
- Import Agilent Cary Eclipse 3-D EEMs and Cary 60 absorbance spectra (CSV "ASCII with log"), with the instrument settings from the file log; also Horiba Aqualog and Fluoromax, Hitachi F-7000, Shimadzu and plain matrix or two-column files. Processing already done by the instrument software must be declared and is never repeated. Samples, blanks and absorbance spectra are paired through an explicit, hand-editable table: nothing is matched silently.
- Correct in a fixed, enforced order: instrument spectral correction (optional), absorbance blank, inner-filter effect (Kothawala et al. 2013), blank subtraction, Raman units (Lawaetz & Stedmon 2009), Rayleigh and Raman scatter removal, crop. Values that depend on the measurement, such as cuvette path lengths, have no defaults. Diluted samples are handled (absorbance rescaled to the EEM's dilution, EEMs multiplied back after Raman units), and regions to discard can be zapped; both are recorded.
- Indices: fluorescence index, humification and biological indices, Coble peaks.
- CDOM metrics from the absorbance spectra: a254, a350, spectral slopes S275–295 and S350–400, slope ratio (Helms et al. 2008), E2:E3 and SUVA254, after a baseline correction; values the signal cannot support are left empty with the reason.
- PARAFAC with non-negativity and missing values, random starts run in parallel, split-half validation (Murphy et al. 2013) and export to OpenFluor. Models are judged by core consistency (computed as in drEEM), shift- and shape-sensitive congruence (Wünsch et al. 2019) and EEMqual (Bro & Vidal 2011); models and ranks can be compared component by component.
- Outliers: leverage, residuals by sample and by wavelength, and residual EEMs of the worst-fitted samples.
- Sensor channels: which components an LED and filter channel follows
(signal and share of each component per sample), in the application, the
figures, the report and from Python (
parafac.component_signals). - New samples can be scored on a fitted model with its spectra fixed; samples the model describes worse than any of its own are flagged.
- Rivers, sites and dates: any index, CDOM metric or PARAFAC component compared between sampling campaigns within each river (replicates averaged per site, Kruskal–Wallis and Dunn tests), along the river and against covariates such as discharge or rainfall, with a warning when rivers and dates cannot be separated.
- Figures for publication, and a desktop application (PySide6, light
and dark themes) that drives the whole chain without code; the same chain
also runs from the command line (
eemkit run project.toml). - Report: the whole analysis on one self-contained HTML page (samples, processing history, indices, PARAFAC exploration, final model, validation, outliers, settings).
- Provenance: data are
xarraydatasets that carry their metadata and the full processing history; one settings file drives both scripts and the application.
Download the application (no Python needed)
Each release has a stand-alone build of the desktop application; download the file for your system from the Assets list:
| System | File | Start |
|---|---|---|
| Windows 10 or 11, 64-bit | eemkit-vX.Y.Z-windows.zip |
Unzip, double-click eemkit.exe |
| macOS, Apple silicon (M1 or later) | eemkit-vX.Y.Z-macos-arm64.zip |
Unzip, move eemkit.app to Applications |
| Linux, x86-64 (glibc 2.35 or newer) | eemkit-vX.Y.Z-linux-x86_64.tar.gz |
tar -xzf, run eemkit/eemkit |
The builds are not signed. Windows may show Windows protected your PC:
click More info, then Run anyway. macOS blocks the first start
(Gatekeeper): right-click eemkit.app and choose Open; on macOS 15 and later
open it once, then click Open Anyway in System Settings > Privacy &
Security. Linux needs a few Qt system libraries that desktops usually have
(on Debian or Ubuntu, if it does not start:
sudo apt install libxcb-cursor0 libxkbcommon-x11-0 libegl1). Details are in
the download guide.
Install with Python
You need Python 3.11 or later (on Windows, tick Add python.exe to PATH when
installing it). The [gui] part adds the desktop application and the
figures:
python -m pip install "eemkit[gui]"
Then start the application with:
python -m eemkit.gui
For the library alone, leave out [gui] (or use [plot] for figures
without the application).
To update to the latest release:
python -m pip install --upgrade "eemkit[gui]"
The development version, with changes not yet released, installs from GitHub:
python -m pip install --force-reinstall "eemkit[gui] @ https://github.com/LowCostSensor/eemkit/archive/refs/heads/main.zip"
python -m pip show eemkit tells which version is installed; the changes of
each version are in the
changelog.
Quick start
from eemkit import pipeline
s = pipeline.load_settings("project.toml") # data folder, pairing table, parameters
raw = pipeline.load(s, base=".")
after_raman = pipeline.correct_until_raman(raw, s, base=".")
corrected = pipeline.finish_corrections(after_raman, s)
indices = pipeline.compute_indices(after_raman, s)
ds = pipeline.parafac_input(corrected, s)
exploration = pipeline.explore(ds, s) # 2..7 components, split-half validation
model, split = pipeline.fit_final(ds, s) # the number of components you chose
pipeline.export_results("results", s, corrected=corrected, indices=indices,
exploration=exploration, model=model, split=split)
Or start the application (python -m eemkit.gui) and open the same
project.toml, or run it from a terminal:
eemkit check project.toml # missing files and settings
eemkit run project.toml # the whole chain, results in project.output_dir
Every function can also be used on its own; see the documentation.
Validation
On 205 river-water samples (Ombrone basin, Italy; Polvani et al. 2026) eemkit was compared with the R package staRdom 1.1.32 (Pucher et al. 2019):
- corrected EEMs agree to a median relative difference of 2.2 × 10⁻⁴ (the remainder is the numerical integration of the Raman area);
- FI, BIX and Coble peaks agree to machine precision, HIX to 3 × 10⁻⁴;
- the 3-component PARAFAC models have Tucker congruence ≥ 0.999 for every excitation and emission loading.
The PARAFAC model was also compared with drEEM 2.26.03 (MATLAB; Murphy et al. 2013), with both its engines, the N-way toolbox and parafac3w: Tucker congruence ≥ 0.9999, Fmax correlation 1.00000, same explained variance, and core consistency within 0.1 %.
The scripts and the full report are in ombrone-fdom.
Development
git clone https://github.com/LowCostSensor/eemkit
cd eemkit
pip install -e ".[dev]"
pytest
Tests that need the real dataset are skipped unless EEMKIT_TEST_DATA points
to its root folder. Contributions and bug reports are welcome: see
CONTRIBUTING.md.
Citation
If you use eemkit, please cite it, together with the methods it implements (listed in the documentation of each step):
Cirrone, R. G. eemkit: EEM processing and PARAFAC modelling of dissolved organic matter fluorescence. Zenodo. doi:10.5281/zenodo.23982732
This DOI always points to the latest version; each release also has its own DOI, listed on the Zenodo page (0.2.0: 10.5281/zenodo.24015024; 0.1.0: 10.5281/zenodo.23982733). The details are in CITATION.cff.
License
GNU General Public License v3.0 or later. See LICENSE.
References
Kothawala et al. (2013) Limnol. Oceanogr. Methods 11, 616–630 · Lawaetz & Stedmon (2009) Appl. Spectrosc. 63, 936–940 · Murphy et al. (2013) Anal. Methods 5, 6557–6566 · Polvani et al. (2026) Environ. Pollut. 396, 127858 · Pucher et al. (2019) Water 11, 2366.
Metadata
Release files for eemkit 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| eemkit-0.6.1.tar.gz | 2.0 MB | With provenance | Details for eemkit-0.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| eemkit-0.6.1-py3-none-any.whl | Python 3 | none | any | Details for eemkit-0.6.1-py3-none-any.whl |
Total release size: 2.3 MB
Release files / eemkit-0.6.1.tar.gz
| Download URL | eemkit-0.6.1.tar.gz |
|---|---|
| Size | 2.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
efadfca4c4907ae95672254dbb3db7c043e191cb3088397cdd29da44d392a0bf
|
|
BLAKE2b-256 checksum How to use checksums |
e1d0dfcc664a8b2ac2d07ba327c2b9b961fdea1c008691d814f14f0c71c879a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / eemkit-0.6.1-py3-none-any.whl
| Download URL | eemkit-0.6.1-py3-none-any.whl |
|---|---|
| Size | 211.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bbeda9c87b1ee82f5c3741d72c1c22c1d41257c29072437ae387d8697303580a
|
|
BLAKE2b-256 checksum How to use checksums |
d540580af04be407abc76e39332f0c412cc009a185d78ccb00bddc7e4a1d13ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logSecurity for eemkit 0.6.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for eemkit-0.6.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logA 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.