Skip to main content

eemkit

tests docs License: GPL v3

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.

The eemkit desktop application: corrections of a river-water EEM

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. 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.
  • 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, core consistency, leverage and residuals, split-half validation (Murphy et al. 2013) and export to OpenFluor.
  • 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.
  • Provenance: data are xarray datasets that carry their metadata and the full processing history; one settings file drives both scripts and the application.

Install

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). A stand-alone Windows build of the application, which needs no Python, is attached to each release.

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.

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 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 (see CITATION.cff; a DOI is issued on Zenodo for every release) and the methods it implements, listed in the documentation of each step.

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.1.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 eemkit 0.1.0
File Size Uploaded Provenance Actions
eemkit-0.1.0.tar.gz 1.4 MB With provenance Details for eemkit-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for eemkit 0.1.0
File Interpreter ABI Platform Actions
eemkit-0.1.0-py3-none-any.whl Python 3 none any Details for eemkit-0.1.0-py3-none-any.whl

Total release size: 1.5 MB

Release files / eemkit-0.1.0.tar.gz

Download URL eemkit-0.1.0.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
3e5226d4ed27e3795b4a39ac41c4545804394095c15d5f932b05f3d8af4fb86b
BLAKE2b-256 checksum
How to use checksums
e0c0efcea4df666d1f643b7445739f531f14f344e9ec21db915da1c4b13fbbd7
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 Nov 5, 2026.

Transparency log

Release files / eemkit-0.1.0-py3-none-any.whl

Download URL eemkit-0.1.0-py3-none-any.whl
Size 122.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57ea28b2f1b0337b756698a174ef1c1b2bf7ab9db662ee350bce43ba83b6921c
BLAKE2b-256 checksum
How to use checksums
5ce24afdc7929eda2805668563d7c1d76eacd3f16ab842d63bf59f2d38c83aa5
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 Nov 5, 2026.

Transparency log

Security for eemkit 0.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for eemkit-0.1.0.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 Nov 5, 2026.

Transparency log

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