eemkit 0.1.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- eemkit-0.3.0/CHANGELOG.md +127 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/CITATION.cff +13 -2
- {eemkit-0.1.0 → eemkit-0.3.0}/PKG-INFO +48 -12
- {eemkit-0.1.0 → eemkit-0.3.0}/README.md +47 -11
- {eemkit-0.1.0 → eemkit-0.3.0}/docs/api.md +38 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/docs/app-guide.md +24 -10
- eemkit-0.3.0/docs/cli.md +82 -0
- eemkit-0.3.0/docs/corrections.md +120 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/docs/gui.md +2 -3
- eemkit-0.3.0/docs/img/app/1_project.png +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/docs/img/app/2_corrections.png +0 -0
- eemkit-0.3.0/docs/img/app/3_indices.png +0 -0
- eemkit-0.3.0/docs/img/app/4a_parafac_ranks.png +0 -0
- eemkit-0.3.0/docs/img/app/4c_parafac_final.png +0 -0
- eemkit-0.3.0/docs/img/app/5a_rivers_time.png +0 -0
- eemkit-0.3.0/docs/img/app/5b_rivers_composition.png +0 -0
- eemkit-0.3.0/docs/img/app/5c_rivers_tests.png +0 -0
- eemkit-0.3.0/docs/img/app/6_export.png +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/docs/index.md +31 -15
- {eemkit-0.1.0 → eemkit-0.3.0}/docs/indices.md +8 -0
- eemkit-0.3.0/docs/instruments.md +78 -0
- eemkit-0.3.0/docs/parafac.md +190 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/pyproject.toml +3 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/__init__.py +1 -1
- eemkit-0.3.0/src/eemkit/__main__.py +7 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/absorbance.py +19 -0
- eemkit-0.3.0/src/eemkit/cli.py +234 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/corrections/__init__.py +9 -1
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/corrections/_common.py +13 -3
- eemkit-0.3.0/src/eemkit/corrections/dilution.py +124 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/corrections/inner_filter.py +1 -1
- eemkit-0.3.0/src/eemkit/corrections/instrument.py +96 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/corrections/scatter.py +13 -1
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/corrections/spectral.py +3 -1
- eemkit-0.3.0/src/eemkit/corrections/zap.py +83 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/gui/export_tab.py +8 -1
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/gui/main_window.py +1 -1
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/gui/parafac_tab.py +2 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/gui/project_tab.py +124 -3
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/indices.py +41 -9
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/io/discover.py +64 -4
- eemkit-0.3.0/src/eemkit/io/instruments.py +338 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/io/loader.py +34 -6
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/parafac/__init__.py +22 -1
- eemkit-0.3.0/src/eemkit/parafac/channels.py +159 -0
- eemkit-0.3.0/src/eemkit/parafac/compare.py +86 -0
- eemkit-0.3.0/src/eemkit/parafac/diagnostics.py +148 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/parafac/model.py +148 -6
- eemkit-0.3.0/src/eemkit/parafac/outliers.py +90 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/parafac/validation.py +13 -2
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/pipeline.py +118 -24
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/plot.py +89 -0
- eemkit-0.3.0/src/eemkit/report.py +325 -0
- eemkit-0.3.0/tests/data/eemR/README.md +20 -0
- eemkit-0.3.0/tests/data/eemR/aqualog/sample4.dat +253 -0
- eemkit-0.3.0/tests/data/eemR/eemR_DESCRIPTION.txt +27 -0
- eemkit-0.3.0/tests/data/eemR/fluoromax4/f1.dat +117 -0
- eemkit-0.3.0/tests/data/eemR/fluoromax4/f2.dat +117 -0
- eemkit-0.3.0/tests/data/eemR/fluoromax4/f3.dat +117 -0
- eemkit-0.3.0/tests/data/eemR/hitachi-f7000-fl/hitachi1.TXT +213 -0
- eemkit-0.3.0/tests/data/eemR/hitachi-f7000-fl/hitachi2.TXT +213 -0
- eemkit-0.3.0/tests/data/eemR/shimadzu/shimadzu.TXT +8145 -0
- eemkit-0.3.0/tests/test_channels.py +171 -0
- eemkit-0.3.0/tests/test_cli.py +71 -0
- eemkit-0.3.0/tests/test_dilution_zap.py +162 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/tests/test_gui.py +35 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/tests/test_indices.py +43 -0
- eemkit-0.3.0/tests/test_instruments.py +190 -0
- eemkit-0.3.0/tests/test_outliers_report.py +99 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/tests/test_parafac.py +40 -2
- eemkit-0.3.0/tests/test_parafac_compare.py +168 -0
- eemkit-0.1.0/CHANGELOG.md +0 -35
- eemkit-0.1.0/docs/corrections.md +0 -55
- eemkit-0.1.0/docs/img/app/1_project.png +0 -0
- eemkit-0.1.0/docs/img/app/3_indices.png +0 -0
- eemkit-0.1.0/docs/img/app/4a_parafac_ranks.png +0 -0
- eemkit-0.1.0/docs/img/app/4c_parafac_final.png +0 -0
- eemkit-0.1.0/docs/img/app/5a_rivers_time.png +0 -0
- eemkit-0.1.0/docs/img/app/5b_rivers_composition.png +0 -0
- eemkit-0.1.0/docs/img/app/5c_rivers_tests.png +0 -0
- eemkit-0.1.0/docs/img/app/6_export.png +0 -0
- eemkit-0.1.0/docs/parafac.md +0 -44
- eemkit-0.1.0/src/eemkit/parafac/diagnostics.py +0 -56
- {eemkit-0.1.0 → eemkit-0.3.0}/.gitignore +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/LICENSE +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/docs/absorbance.md +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/docs/campaigns.md +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/docs/data_model.md +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/docs/img/app/4b_parafac_outliers.png +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/docs/img/app/4d_parafac_by_model.png +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/docs/plotting.md +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/docs/quickstart.md +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/campaigns.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/core/__init__.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/core/dataset.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/core/grid.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/core/history.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/corrections/blank.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/corrections/crop.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/corrections/raman.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/errors.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/gui/__init__.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/gui/__main__.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/gui/campaigns_tab.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/gui/common.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/gui/corrections_tab.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/gui/indices_tab.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/gui/state.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/gui/theme.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/io/__init__.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/io/_cary_csv.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/io/cary60.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/io/cary_eclipse.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/io/pairing.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/parafac/_cp.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/src/eemkit/parafac/export.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/tests/conftest.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/tests/test_absorbance.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/tests/test_campaigns.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/tests/test_cary60.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/tests/test_cary_eclipse.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/tests/test_corrections.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/tests/test_dataset.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/tests/test_grid.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/tests/test_pairing.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/tests/test_pipeline.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/tests/test_plot.py +0 -0
- {eemkit-0.1.0 → eemkit-0.3.0}/tests/test_real_data.py +0 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes are listed here. Versions follow
|
|
4
|
+
[semantic versioning](https://semver.org/).
|
|
5
|
+
|
|
6
|
+
## 0.3.0 (2026-11-23)
|
|
7
|
+
|
|
8
|
+
A new function to check what a filter-based optical channel sees, and a fix
|
|
9
|
+
to the indices table. The values of everything that could be computed in 0.2.0
|
|
10
|
+
are unchanged.
|
|
11
|
+
|
|
12
|
+
* New: `parafac.component_signals(model, channels)`: the signal each PARAFAC
|
|
13
|
+
component gives in an LED and filter channel, for every sample (score x
|
|
14
|
+
excitation loading weighted by the LED x emission loading integrated over the
|
|
15
|
+
filter), with the share of each component and the channel's sensitivity.
|
|
16
|
+
Meant to check whether a channel (e.g. a tryptophan-like one) follows the
|
|
17
|
+
component it is meant to follow.
|
|
18
|
+
* **Fixed: one index that cannot be computed no longer stops the whole
|
|
19
|
+
index table.** In 0.2.0, `compute_indices` (and so the application, the
|
|
20
|
+
command line and `pipeline.compute_indices`) raised as soon as one index or
|
|
21
|
+
peak needed a wavelength outside the measured range: for example, on data
|
|
22
|
+
whose emission starts at 300.3 nm (the drEEM tutorial data), HIX needs
|
|
23
|
+
300 nm and no index at all was returned. Now that index is left empty
|
|
24
|
+
(NaN) with an `EEMKitWarning` giving the reason, every other index and peak
|
|
25
|
+
is computed, and the reasons are kept in
|
|
26
|
+
`df.attrs["settings"]["not_computed"]` (also in the JSON file of
|
|
27
|
+
`export_indices`). Each peak is computed on its own, so one peak outside
|
|
28
|
+
the data does not empty the others. `on_error="raise"` keeps the old,
|
|
29
|
+
strict behaviour. Values of the indices that can be computed do not
|
|
30
|
+
change.
|
|
31
|
+
* HTML report: index columns that are empty for every sample are listed with
|
|
32
|
+
their reason, instead of being left out of the summary without a word.
|
|
33
|
+
|
|
34
|
+
## 0.2.0 (2026-11-06)
|
|
35
|
+
|
|
36
|
+
Other fluorometers, diluted samples, zap, PARAFAC model comparison and
|
|
37
|
+
diagnostics, new samples on a fitted model, an HTML report and a command
|
|
38
|
+
line; benchmarked against drEEM as well as staRdom. One result changes: core
|
|
39
|
+
consistency is now computed as in drEEM (first item).
|
|
40
|
+
|
|
41
|
+
* **Changed: core consistency is now computed as the N-way toolbox's
|
|
42
|
+
`corcond` (the copy used by drEEM)**: loading vectors of each component
|
|
43
|
+
scaled to the same norm, core fitted to the observed cells only (missing
|
|
44
|
+
values left out, not filled with the model), denominator the sum of squares
|
|
45
|
+
of the core. eemkit 0.1 gave values that depended on how each component's
|
|
46
|
+
size was split between the modes; values now match drEEM 2.26.03 to 10⁻⁶ %
|
|
47
|
+
(tested). They are usually lower than before for good models (Ombrone,
|
|
48
|
+
3 components: 75.0 % instead of 85.5 %) and no longer strongly negative for
|
|
49
|
+
overfactored ones; EEMqual changes with them. The models themselves do not
|
|
50
|
+
change. Rank-1 models are now computed too, instead of set to 100.
|
|
51
|
+
* Application: the window no longer grows wider than the screen once a final
|
|
52
|
+
PARAFAC model is shown (its summary line now wraps); it fits a 1366-pixel
|
|
53
|
+
wide laptop screen.
|
|
54
|
+
* Benchmark of the PARAFAC fit against drEEM 2.26.03 (N-way and parafac3w
|
|
55
|
+
engines) on the Ombrone data: same model, Tucker congruence ≥ 0.9999.
|
|
56
|
+
* Command line: `eemkit check project.toml` reports missing files and
|
|
57
|
+
settings; `eemkit run project.toml` runs the whole chain and exports the
|
|
58
|
+
results, as the application does (also `python -m eemkit`).
|
|
59
|
+
* PARAFAC random starts run in parallel threads (`n_jobs`, default every
|
|
60
|
+
processor); the model does not depend on it.
|
|
61
|
+
* README and documentation: install from PyPI, Zenodo DOI.
|
|
62
|
+
* Shift- and shape-sensitive congruence (`shift_shape_congruence`; Wünsch et
|
|
63
|
+
al. 2019), also reported in split-half validation (`ssc_ex`, `ssc_em`).
|
|
64
|
+
* `eemqual` (Bro & Vidal 2011) and an `eemqual` column in the exploration
|
|
65
|
+
table.
|
|
66
|
+
* `compare_models`, `compare_ranks` and `component_correlations` to compare
|
|
67
|
+
PARAFAC models and their components.
|
|
68
|
+
* `project_samples`: scores of new samples on a fitted model with its spectra
|
|
69
|
+
fixed, with a flag for samples the model describes worse than any of its
|
|
70
|
+
own.
|
|
71
|
+
* PARAFAC models store each sample's data sum of squares (`data_sumsq`).
|
|
72
|
+
* Outlier diagnostics: `sample_diagnostics` (leverage, relative residual and
|
|
73
|
+
ranks per sample), `spectral_residuals` (residual by wavelength), and the
|
|
74
|
+
figures `plot.residual_eems` and `plot.spectral_residuals`.
|
|
75
|
+
* Other fluorometers: readers for Horiba Aqualog and Fluoromax, Hitachi
|
|
76
|
+
F-7000 (over-range values to missing), Shimadzu (excitation wavelengths from
|
|
77
|
+
the settings) and any text matrix; two-column absorbance files. The format
|
|
78
|
+
is set in `project.instrument` / `project.absorbance_format`, and the folder
|
|
79
|
+
scan follows it. Processing already done by the instrument software (e.g.
|
|
80
|
+
Aqualog "Sample - Blank") must be declared in `project.already_done`: it is
|
|
81
|
+
recorded, never repeated nor skipped silently. Files that do not state the
|
|
82
|
+
instrument's spectral correction are marked "unknown". Tested on the
|
|
83
|
+
example files of the R package eemR. In the application, an `Instrument`
|
|
84
|
+
box on the Project page sets the formats and the steps already done.
|
|
85
|
+
* Diluted samples: optional pairing-table columns `dilution_factor` and
|
|
86
|
+
`abs_dilution_factor`; absorbance rescaled to the EEM's dilution before the
|
|
87
|
+
inner-filter correction (`match_absorbance_dilution`), EEMs multiplied by
|
|
88
|
+
their dilution after Raman units (`correct_dilution`), CDOM metrics
|
|
89
|
+
reported for the undiluted sample.
|
|
90
|
+
* `zap`: regions listed in the project file (`[zap]`) set to NaN after Raman
|
|
91
|
+
units and recorded in the history; optional interpolation separate from the
|
|
92
|
+
scatter bands (`interpolate_missing(only=...)`).
|
|
93
|
+
* `report.html`: the whole analysis on one self-contained page (samples,
|
|
94
|
+
processing history, indices, exploration, final model, validation, outlier
|
|
95
|
+
diagnostics, settings), from `eemkit.report.write_report`, the export
|
|
96
|
+
(`report=True`), the command line and the application's Export page.
|
|
97
|
+
|
|
98
|
+
## 0.1.0 (2026-11-05)
|
|
99
|
+
|
|
100
|
+
First public release.
|
|
101
|
+
|
|
102
|
+
* Readers for Agilent Cary Eclipse 3-D EEMs and Cary 60 absorbance CSV files;
|
|
103
|
+
folder scan, pairing table draft (always excluded until checked) and
|
|
104
|
+
multi-sample `xarray` dataset on common wavelength grids.
|
|
105
|
+
* Corrections in an enforced order: instrument spectral correction,
|
|
106
|
+
absorbance blank, inner filter, blank subtraction, Raman units, scatter
|
|
107
|
+
removal with optional interpolation, crop. Every step is recorded in the
|
|
108
|
+
processing history.
|
|
109
|
+
* Fluorescence indices (FI, HIX, BIX) and Coble peaks.
|
|
110
|
+
* CDOM metrics from the absorbance spectra (`eemkit.absorbance`): a254, a350,
|
|
111
|
+
S275–295, S350–400, SR, E2:E3 and SUVA254 (with a DOC column), after a
|
|
112
|
+
680–700 nm baseline correction; low-signal values are left empty with the
|
|
113
|
+
reason.
|
|
114
|
+
* Non-negative PARAFAC with missing values, random starts, core consistency,
|
|
115
|
+
leverage, split-half validation and OpenFluor export.
|
|
116
|
+
* Comparison of campaigns, sites and rivers (`eemkit.campaigns`): replicate
|
|
117
|
+
means per site and time, design and confounding warnings, Kruskal–Wallis
|
|
118
|
+
and Dunn–Holm tests within each group, Spearman correlations with site
|
|
119
|
+
position and with covariates, PARAFAC composition; optional site and
|
|
120
|
+
covariate tables.
|
|
121
|
+
* Publication figures (`eemkit.plot`), including a Cary Eclipse colour scale.
|
|
122
|
+
* `eemkit.pipeline`: the whole chain driven by one settings file.
|
|
123
|
+
* Desktop application (`eemkit-gui`, PySide6): a sidebar of steps with their
|
|
124
|
+
status, light and dark themes, and a "Rivers and dates" page; a
|
|
125
|
+
PyInstaller recipe for a stand-alone Windows build, which ships the
|
|
126
|
+
licence texts of eemkit, Qt and every bundled package.
|
|
127
|
+
* Benchmarked against staRdom 1.1.32 on 205 river-water samples.
|
|
@@ -6,8 +6,19 @@ authors:
|
|
|
6
6
|
- family-names: Cirrone
|
|
7
7
|
given-names: Riccardo Gaetano
|
|
8
8
|
affiliation: University of Siena
|
|
9
|
-
version: 0.
|
|
10
|
-
date-released: "2026-11-
|
|
9
|
+
version: 0.3.0
|
|
10
|
+
date-released: "2026-11-23"
|
|
11
|
+
doi: 10.5281/zenodo.23982732
|
|
12
|
+
identifiers:
|
|
13
|
+
- type: doi
|
|
14
|
+
value: 10.5281/zenodo.23982732
|
|
15
|
+
description: "All versions (concept DOI); resolves to the latest release"
|
|
16
|
+
- type: doi
|
|
17
|
+
value: 10.5281/zenodo.24015024
|
|
18
|
+
description: "Version 0.2.0"
|
|
19
|
+
- type: doi
|
|
20
|
+
value: 10.5281/zenodo.23982733
|
|
21
|
+
description: "Version 0.1.0"
|
|
11
22
|
license: GPL-3.0-or-later
|
|
12
23
|
repository-code: "https://github.com/LowCostSensor/eemkit"
|
|
13
24
|
url: "https://lowcostsensor.github.io/eemkit/"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: eemkit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Excitation-emission matrix (EEM) processing and PARAFAC modelling of dissolved organic matter fluorescence
|
|
5
5
|
Project-URL: Homepage, https://github.com/LowCostSensor/eemkit
|
|
6
6
|
Project-URL: Documentation, https://lowcostsensor.github.io/eemkit/
|
|
@@ -46,6 +46,8 @@ Description-Content-Type: text/markdown
|
|
|
46
46
|
|
|
47
47
|
[](https://github.com/LowCostSensor/eemkit/actions/workflows/tests.yml)
|
|
48
48
|
[](https://lowcostsensor.github.io/eemkit/)
|
|
49
|
+
[](https://pypi.org/project/eemkit/)
|
|
50
|
+
[](https://doi.org/10.5281/zenodo.23982732)
|
|
49
51
|
[](https://github.com/LowCostSensor/eemkit/blob/main/LICENSE)
|
|
50
52
|
|
|
51
53
|
Python tools and a desktop application for fluorescence excitation-emission
|
|
@@ -58,30 +60,45 @@ step recorded so that an analysis can be repeated exactly.
|
|
|
58
60
|
## What it does
|
|
59
61
|
|
|
60
62
|
* **Import** Agilent Cary Eclipse 3-D EEMs and Cary 60 absorbance spectra
|
|
61
|
-
(CSV "ASCII with log"), with the instrument settings from the file log
|
|
63
|
+
(CSV "ASCII with log"), with the instrument settings from the file log;
|
|
64
|
+
also Horiba Aqualog and Fluoromax, Hitachi F-7000, Shimadzu and plain
|
|
65
|
+
matrix or two-column files. Processing already done by the instrument
|
|
66
|
+
software must be declared and is never repeated.
|
|
62
67
|
Samples, blanks and absorbance spectra are paired through an explicit,
|
|
63
68
|
hand-editable table: nothing is matched silently.
|
|
64
69
|
* **Correct** in a fixed, enforced order: instrument spectral correction
|
|
65
70
|
(optional), absorbance blank, inner-filter effect (Kothawala et al. 2013),
|
|
66
71
|
blank subtraction, Raman units (Lawaetz & Stedmon 2009), Rayleigh and Raman
|
|
67
72
|
scatter removal, crop. Values that depend on the measurement, such as cuvette
|
|
68
|
-
path lengths, have no defaults.
|
|
73
|
+
path lengths, have no defaults. Diluted samples are handled (absorbance
|
|
74
|
+
rescaled to the EEM's dilution, EEMs multiplied back after Raman units), and
|
|
75
|
+
regions to discard can be zapped; both are recorded.
|
|
69
76
|
* **Indices**: fluorescence index, humification and biological indices, Coble
|
|
70
77
|
peaks.
|
|
71
78
|
* **CDOM metrics** from the absorbance spectra: a254, a350, spectral slopes
|
|
72
79
|
S275–295 and S350–400, slope ratio (Helms et al. 2008), E2:E3 and SUVA254,
|
|
73
80
|
after a baseline correction; values the signal cannot support are left
|
|
74
81
|
empty with the reason.
|
|
75
|
-
* **PARAFAC** with non-negativity and missing values, random starts
|
|
76
|
-
|
|
77
|
-
|
|
82
|
+
* **PARAFAC** with non-negativity and missing values, random starts run in
|
|
83
|
+
parallel, split-half validation (Murphy et al. 2013) and export to
|
|
84
|
+
OpenFluor. Models are judged by core consistency (computed as in drEEM),
|
|
85
|
+
shift- and shape-sensitive congruence (Wünsch et al. 2019) and EEMqual (Bro
|
|
86
|
+
& Vidal 2011); models and ranks can be compared component by component.
|
|
87
|
+
* **Outliers**: leverage, residuals by sample and by wavelength, and residual
|
|
88
|
+
EEMs of the worst-fitted samples.
|
|
89
|
+
* **New samples** can be scored on a fitted model with its spectra fixed;
|
|
90
|
+
samples the model describes worse than any of its own are flagged.
|
|
78
91
|
* **Rivers, sites and dates**: any index, CDOM metric or PARAFAC component
|
|
79
92
|
compared between sampling campaigns within each river (replicates averaged
|
|
80
93
|
per site, Kruskal–Wallis and Dunn tests), along the river and against
|
|
81
94
|
covariates such as discharge or rainfall, with a warning when rivers and
|
|
82
95
|
dates cannot be separated.
|
|
83
96
|
* **Figures** for publication, and a **desktop application** (PySide6, light
|
|
84
|
-
and dark themes) that drives the whole chain without code
|
|
97
|
+
and dark themes) that drives the whole chain without code; the same chain
|
|
98
|
+
also runs from the command line (`eemkit run project.toml`).
|
|
99
|
+
* **Report**: the whole analysis on one self-contained HTML page (samples,
|
|
100
|
+
processing history, indices, PARAFAC exploration, final model, validation,
|
|
101
|
+
outliers, settings).
|
|
85
102
|
* **Provenance**: data are `xarray` datasets that carry their metadata and the
|
|
86
103
|
full processing history; one settings file drives both scripts and the
|
|
87
104
|
application.
|
|
@@ -142,7 +159,12 @@ pipeline.export_results("results", s, corrected=corrected, indices=indices,
|
|
|
142
159
|
```
|
|
143
160
|
|
|
144
161
|
Or start the application (`python -m eemkit.gui`) and open the same
|
|
145
|
-
`project.toml
|
|
162
|
+
`project.toml`, or run it from a terminal:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
eemkit check project.toml # missing files and settings
|
|
166
|
+
eemkit run project.toml # the whole chain, results in project.output_dir
|
|
167
|
+
```
|
|
146
168
|
|
|
147
169
|
Every function can also be used on its own; see the
|
|
148
170
|
[documentation](https://lowcostsensor.github.io/eemkit/).
|
|
@@ -158,6 +180,11 @@ was compared with the R package staRdom 1.1.32 (Pucher et al. 2019):
|
|
|
158
180
|
* the 3-component PARAFAC models have Tucker congruence ≥ 0.999 for every
|
|
159
181
|
excitation and emission loading.
|
|
160
182
|
|
|
183
|
+
The PARAFAC model was also compared with drEEM 2.26.03 (MATLAB; Murphy et al.
|
|
184
|
+
2013), with both its engines, the N-way toolbox and parafac3w: Tucker
|
|
185
|
+
congruence ≥ 0.9999, Fmax correlation 1.00000, same explained variance, and
|
|
186
|
+
core consistency within 0.1 %.
|
|
187
|
+
|
|
161
188
|
The scripts and the full report are in
|
|
162
189
|
[ombrone-fdom](https://github.com/LowCostSensor/ombrone-fdom).
|
|
163
190
|
|
|
@@ -176,10 +203,19 @@ to its root folder. Contributions and bug reports are welcome: see
|
|
|
176
203
|
|
|
177
204
|
## Citation
|
|
178
205
|
|
|
179
|
-
If you use eemkit, please cite it
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
206
|
+
If you use eemkit, please cite it, together with the methods it implements
|
|
207
|
+
(listed in the documentation of each step):
|
|
208
|
+
|
|
209
|
+
> Cirrone, R. G. eemkit: EEM processing and PARAFAC modelling of dissolved
|
|
210
|
+
> organic matter fluorescence. Zenodo.
|
|
211
|
+
> [doi:10.5281/zenodo.23982732](https://doi.org/10.5281/zenodo.23982732)
|
|
212
|
+
|
|
213
|
+
This DOI always points to the latest version; each release also has its own
|
|
214
|
+
DOI, listed on the Zenodo page (0.2.0:
|
|
215
|
+
[10.5281/zenodo.24015024](https://doi.org/10.5281/zenodo.24015024); 0.1.0:
|
|
216
|
+
[10.5281/zenodo.23982733](https://doi.org/10.5281/zenodo.23982733)). The
|
|
217
|
+
details are in
|
|
218
|
+
[CITATION.cff](https://github.com/LowCostSensor/eemkit/blob/main/CITATION.cff).
|
|
183
219
|
|
|
184
220
|
## License
|
|
185
221
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/LowCostSensor/eemkit/actions/workflows/tests.yml)
|
|
4
4
|
[](https://lowcostsensor.github.io/eemkit/)
|
|
5
|
+
[](https://pypi.org/project/eemkit/)
|
|
6
|
+
[](https://doi.org/10.5281/zenodo.23982732)
|
|
5
7
|
[](https://github.com/LowCostSensor/eemkit/blob/main/LICENSE)
|
|
6
8
|
|
|
7
9
|
Python tools and a desktop application for fluorescence excitation-emission
|
|
@@ -14,30 +16,45 @@ step recorded so that an analysis can be repeated exactly.
|
|
|
14
16
|
## What it does
|
|
15
17
|
|
|
16
18
|
* **Import** Agilent Cary Eclipse 3-D EEMs and Cary 60 absorbance spectra
|
|
17
|
-
(CSV "ASCII with log"), with the instrument settings from the file log
|
|
19
|
+
(CSV "ASCII with log"), with the instrument settings from the file log;
|
|
20
|
+
also Horiba Aqualog and Fluoromax, Hitachi F-7000, Shimadzu and plain
|
|
21
|
+
matrix or two-column files. Processing already done by the instrument
|
|
22
|
+
software must be declared and is never repeated.
|
|
18
23
|
Samples, blanks and absorbance spectra are paired through an explicit,
|
|
19
24
|
hand-editable table: nothing is matched silently.
|
|
20
25
|
* **Correct** in a fixed, enforced order: instrument spectral correction
|
|
21
26
|
(optional), absorbance blank, inner-filter effect (Kothawala et al. 2013),
|
|
22
27
|
blank subtraction, Raman units (Lawaetz & Stedmon 2009), Rayleigh and Raman
|
|
23
28
|
scatter removal, crop. Values that depend on the measurement, such as cuvette
|
|
24
|
-
path lengths, have no defaults.
|
|
29
|
+
path lengths, have no defaults. Diluted samples are handled (absorbance
|
|
30
|
+
rescaled to the EEM's dilution, EEMs multiplied back after Raman units), and
|
|
31
|
+
regions to discard can be zapped; both are recorded.
|
|
25
32
|
* **Indices**: fluorescence index, humification and biological indices, Coble
|
|
26
33
|
peaks.
|
|
27
34
|
* **CDOM metrics** from the absorbance spectra: a254, a350, spectral slopes
|
|
28
35
|
S275–295 and S350–400, slope ratio (Helms et al. 2008), E2:E3 and SUVA254,
|
|
29
36
|
after a baseline correction; values the signal cannot support are left
|
|
30
37
|
empty with the reason.
|
|
31
|
-
* **PARAFAC** with non-negativity and missing values, random starts
|
|
32
|
-
|
|
33
|
-
|
|
38
|
+
* **PARAFAC** with non-negativity and missing values, random starts run in
|
|
39
|
+
parallel, split-half validation (Murphy et al. 2013) and export to
|
|
40
|
+
OpenFluor. Models are judged by core consistency (computed as in drEEM),
|
|
41
|
+
shift- and shape-sensitive congruence (Wünsch et al. 2019) and EEMqual (Bro
|
|
42
|
+
& Vidal 2011); models and ranks can be compared component by component.
|
|
43
|
+
* **Outliers**: leverage, residuals by sample and by wavelength, and residual
|
|
44
|
+
EEMs of the worst-fitted samples.
|
|
45
|
+
* **New samples** can be scored on a fitted model with its spectra fixed;
|
|
46
|
+
samples the model describes worse than any of its own are flagged.
|
|
34
47
|
* **Rivers, sites and dates**: any index, CDOM metric or PARAFAC component
|
|
35
48
|
compared between sampling campaigns within each river (replicates averaged
|
|
36
49
|
per site, Kruskal–Wallis and Dunn tests), along the river and against
|
|
37
50
|
covariates such as discharge or rainfall, with a warning when rivers and
|
|
38
51
|
dates cannot be separated.
|
|
39
52
|
* **Figures** for publication, and a **desktop application** (PySide6, light
|
|
40
|
-
and dark themes) that drives the whole chain without code
|
|
53
|
+
and dark themes) that drives the whole chain without code; the same chain
|
|
54
|
+
also runs from the command line (`eemkit run project.toml`).
|
|
55
|
+
* **Report**: the whole analysis on one self-contained HTML page (samples,
|
|
56
|
+
processing history, indices, PARAFAC exploration, final model, validation,
|
|
57
|
+
outliers, settings).
|
|
41
58
|
* **Provenance**: data are `xarray` datasets that carry their metadata and the
|
|
42
59
|
full processing history; one settings file drives both scripts and the
|
|
43
60
|
application.
|
|
@@ -98,7 +115,12 @@ pipeline.export_results("results", s, corrected=corrected, indices=indices,
|
|
|
98
115
|
```
|
|
99
116
|
|
|
100
117
|
Or start the application (`python -m eemkit.gui`) and open the same
|
|
101
|
-
`project.toml
|
|
118
|
+
`project.toml`, or run it from a terminal:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
eemkit check project.toml # missing files and settings
|
|
122
|
+
eemkit run project.toml # the whole chain, results in project.output_dir
|
|
123
|
+
```
|
|
102
124
|
|
|
103
125
|
Every function can also be used on its own; see the
|
|
104
126
|
[documentation](https://lowcostsensor.github.io/eemkit/).
|
|
@@ -114,6 +136,11 @@ was compared with the R package staRdom 1.1.32 (Pucher et al. 2019):
|
|
|
114
136
|
* the 3-component PARAFAC models have Tucker congruence ≥ 0.999 for every
|
|
115
137
|
excitation and emission loading.
|
|
116
138
|
|
|
139
|
+
The PARAFAC model was also compared with drEEM 2.26.03 (MATLAB; Murphy et al.
|
|
140
|
+
2013), with both its engines, the N-way toolbox and parafac3w: Tucker
|
|
141
|
+
congruence ≥ 0.9999, Fmax correlation 1.00000, same explained variance, and
|
|
142
|
+
core consistency within 0.1 %.
|
|
143
|
+
|
|
117
144
|
The scripts and the full report are in
|
|
118
145
|
[ombrone-fdom](https://github.com/LowCostSensor/ombrone-fdom).
|
|
119
146
|
|
|
@@ -132,10 +159,19 @@ to its root folder. Contributions and bug reports are welcome: see
|
|
|
132
159
|
|
|
133
160
|
## Citation
|
|
134
161
|
|
|
135
|
-
If you use eemkit, please cite it
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
162
|
+
If you use eemkit, please cite it, together with the methods it implements
|
|
163
|
+
(listed in the documentation of each step):
|
|
164
|
+
|
|
165
|
+
> Cirrone, R. G. eemkit: EEM processing and PARAFAC modelling of dissolved
|
|
166
|
+
> organic matter fluorescence. Zenodo.
|
|
167
|
+
> [doi:10.5281/zenodo.23982732](https://doi.org/10.5281/zenodo.23982732)
|
|
168
|
+
|
|
169
|
+
This DOI always points to the latest version; each release also has its own
|
|
170
|
+
DOI, listed on the Zenodo page (0.2.0:
|
|
171
|
+
[10.5281/zenodo.24015024](https://doi.org/10.5281/zenodo.24015024); 0.1.0:
|
|
172
|
+
[10.5281/zenodo.23982733](https://doi.org/10.5281/zenodo.23982733)). The
|
|
173
|
+
details are in
|
|
174
|
+
[CITATION.cff](https://github.com/LowCostSensor/eemkit/blob/main/CITATION.cff).
|
|
139
175
|
|
|
140
176
|
## License
|
|
141
177
|
|
|
@@ -8,6 +8,24 @@
|
|
|
8
8
|
|
|
9
9
|
::: eemkit.io.cary60.mean_cycles
|
|
10
10
|
|
|
11
|
+
::: eemkit.io.instruments
|
|
12
|
+
options:
|
|
13
|
+
show_root_toc_entry: false
|
|
14
|
+
members:
|
|
15
|
+
- read_aqualog
|
|
16
|
+
- read_fluoromax
|
|
17
|
+
- read_hitachi_f7000
|
|
18
|
+
- read_shimadzu
|
|
19
|
+
- read_matrix_csv
|
|
20
|
+
- read_two_column_absorbance
|
|
21
|
+
|
|
22
|
+
::: eemkit.corrections.instrument
|
|
23
|
+
options:
|
|
24
|
+
show_root_toc_entry: false
|
|
25
|
+
members:
|
|
26
|
+
- check_declared
|
|
27
|
+
- mark_done
|
|
28
|
+
|
|
11
29
|
::: eemkit.io.discover.scan_folder
|
|
12
30
|
|
|
13
31
|
::: eemkit.io.discover.suggest_pairing
|
|
@@ -26,9 +44,12 @@
|
|
|
26
44
|
- apply_spectral_correction
|
|
27
45
|
- read_correction_file
|
|
28
46
|
- subtract_absorbance_blank
|
|
47
|
+
- match_absorbance_dilution
|
|
29
48
|
- correct_inner_filter
|
|
30
49
|
- subtract_blank
|
|
31
50
|
- normalize_raman
|
|
51
|
+
- correct_dilution
|
|
52
|
+
- zap
|
|
32
53
|
- raman_area
|
|
33
54
|
- remove_scatter
|
|
34
55
|
- interpolate_missing
|
|
@@ -68,9 +89,18 @@
|
|
|
68
89
|
- summary_table
|
|
69
90
|
- model_eem
|
|
70
91
|
- residuals
|
|
92
|
+
- project_samples
|
|
71
93
|
|
|
72
94
|
::: eemkit.parafac.validation.split_half
|
|
73
95
|
|
|
96
|
+
::: eemkit.parafac.compare
|
|
97
|
+
options:
|
|
98
|
+
show_root_toc_entry: false
|
|
99
|
+
|
|
100
|
+
::: eemkit.parafac.outliers
|
|
101
|
+
options:
|
|
102
|
+
show_root_toc_entry: false
|
|
103
|
+
|
|
74
104
|
::: eemkit.parafac.diagnostics
|
|
75
105
|
options:
|
|
76
106
|
show_root_toc_entry: false
|
|
@@ -94,3 +124,11 @@
|
|
|
94
124
|
::: eemkit.plot
|
|
95
125
|
options:
|
|
96
126
|
show_root_toc_entry: false
|
|
127
|
+
|
|
128
|
+
## Report
|
|
129
|
+
|
|
130
|
+
::: eemkit.report.write_report
|
|
131
|
+
|
|
132
|
+
## Command line
|
|
133
|
+
|
|
134
|
+
::: eemkit.cli.main
|
|
@@ -4,7 +4,7 @@ How to use the eemkit desktop application to go from Cary Eclipse and Cary 60 CS
|
|
|
4
4
|
|
|
5
5
|
The screenshots show river-water samples from the Ombrone basin, Italy, 2024 (Polvani et al. 2026, [doi:10.1016/j.envpol.2026.127858](https://doi.org/10.1016/j.envpol.2026.127858)); the data and the project file are in the [ombrone-fdom](https://github.com/LowCostSensor/ombrone-fdom) repository.
|
|
6
6
|
|
|
7
|
-
The app is a front end to the eemkit library and does no calculations of its own. Every button calls the same functions as a script using `eemkit.pipeline`, and gives the same results: on the Ombrone data, the 3-component model fitted in the app has 99.017 % explained variance,
|
|
7
|
+
The app is a front end to the eemkit library and does no calculations of its own. Every button calls the same functions as a script using `eemkit.pipeline`, and gives the same results: on the Ombrone data, the 3-component model fitted in the app has 99.017 % explained variance, 75.0 % core consistency and a split-half congruence of 0.9915, as in the scripted analysis.
|
|
8
8
|
|
|
9
9
|
Labels in this guide are written as they appear on screen, for example `Apply corrections`.
|
|
10
10
|
|
|
@@ -17,24 +17,22 @@ installer), then, in a terminal (on Windows: *PowerShell* from the Start
|
|
|
17
17
|
menu):
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
python -m pip install "eemkit[gui]
|
|
20
|
+
python -m pip install "eemkit[gui]"
|
|
21
21
|
python -m eemkit.gui
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
The first command installs eemkit from
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
as an argument:
|
|
24
|
+
The first command installs eemkit from PyPI; the `[gui]` part is needed for
|
|
25
|
+
the application. The second starts it. To open a project directly, pass the
|
|
26
|
+
file as an argument:
|
|
28
27
|
|
|
29
28
|
```bash
|
|
30
29
|
python -m eemkit.gui path/to/project.toml
|
|
31
30
|
```
|
|
32
31
|
|
|
33
|
-
To update
|
|
34
|
-
(`--upgrade` is not enough), reinstall eemkit; the other libraries stay:
|
|
32
|
+
To update to the latest release:
|
|
35
33
|
|
|
36
34
|
```bash
|
|
37
|
-
python -m pip install --
|
|
35
|
+
python -m pip install --upgrade "eemkit[gui]"
|
|
38
36
|
```
|
|
39
37
|
|
|
40
38
|
### The Ombrone example project
|
|
@@ -86,6 +84,19 @@ This page decides which files are read and how they are paired.
|
|
|
86
84
|
* `Pairing table`: the CSV file with the pairing. `Open…` opens an existing one.
|
|
87
85
|
* `Output folder`: where step 6 writes the results. It cannot be inside the data folder.
|
|
88
86
|
|
|
87
|
+
### The instrument
|
|
88
|
+
|
|
89
|
+
The `Instrument` box, on the right of the paths, says which files to read
|
|
90
|
+
(details in [Instruments and formats](instruments.md)):
|
|
91
|
+
|
|
92
|
+
* `Fluorometer`: Cary Eclipse (default), Horiba Aqualog or Fluoromax, Hitachi F-7000, Shimadzu, or a text matrix.
|
|
93
|
+
* `Absorbance`: Cary 60 (default) or a two-column file (wavelength, absorbance).
|
|
94
|
+
* `Already done by the instrument software`: tick only what the instrument software did before export (blank subtracted, inner filter corrected, Raman units). eemkit records these steps and does not repeat them; a file that says a step was done that is not ticked stops the loading, with the file header in the message.
|
|
95
|
+
* `Shimadzu excitation`: first excitation wavelength and step, which Shimadzu files do not contain (active only for Shimadzu).
|
|
96
|
+
* `Matrix layout`: which of the first row and first column holds the excitation wavelengths (active only for a text matrix).
|
|
97
|
+
|
|
98
|
+
Changing the instrument drops the data read so far: scan and load again.
|
|
99
|
+
|
|
89
100
|
### The buttons, in order
|
|
90
101
|
|
|
91
102
|
| Button | What it does |
|
|
@@ -113,6 +124,8 @@ This page decides which files are read and how they are paired.
|
|
|
113
124
|
* **Double-click** a cell to edit it. In the file columns (`eem_file`, `eem_blank_file`, `abs_file`, `abs_blank_file`) a list opens with the files of the right kind found by the scan.
|
|
114
125
|
* The `Filter rows…` box filters on every column (for example `Merse_2024-07`). Clicking a column header sorts by that column.
|
|
115
126
|
* Extra columns (river, campaign, site, replicate, notes…) become sample metadata: you find them again in the indices and in the groupings.
|
|
127
|
+
* Diluted samples: add the columns `dilution_factor` (EEM) and `abs_dilution_factor` (absorbance), final volume / sample volume, empty = undiluted. The corrections then report the undiluted sample; see [Diluted samples](corrections.md#diluted-samples).
|
|
128
|
+
* Regions to remove by hand (spikes, bad scans) are listed in the `[zap]` section of the project file; see [zap](corrections.md#removing-bad-data-by-hand-zap). The application does not edit them yet: it applies those in the file.
|
|
116
129
|
|
|
117
130
|
## 2 · Corrections
|
|
118
131
|
|
|
@@ -214,7 +227,7 @@ Settings on the left, four views of the results on the right. Work in two stages
|
|
|
214
227
|
| Column | Meaning |
|
|
215
228
|
| --- | --- |
|
|
216
229
|
| `explained_pct` | Explained variance (%) of the scaled data. |
|
|
217
|
-
| `core_consistency_pct` | CORCONDIA (Bro & Kiers 2003): close to 100 for an appropriate model,
|
|
230
|
+
| `core_consistency_pct` | CORCONDIA (Bro & Kiers 2003), computed as the N-way toolbox and drEEM do: close to 100 for an appropriate model, drops with too many components. |
|
|
218
231
|
| `sse_normalized` | Residual sum of squares. |
|
|
219
232
|
| `n_iter`, `converged` | Iterations of the best fit and whether it reached the tolerance. |
|
|
220
233
|
| `starts_at_best` | How many initialisations reached the same minimum: if few did, the solution is unstable. |
|
|
@@ -302,6 +315,7 @@ Compares campaigns, sites and rivers for any variable of the indices table or of
|
|
|
302
315
|
| `parafac_3comp_openfluor.txt` | File for OpenFluor. Check it against the current upload template before submitting it. |
|
|
303
316
|
| `parafac_3comp_model.nc` | The complete model. |
|
|
304
317
|
| `figures/` | Number-of-components diagnostics, components and leverage, as PDF and PNG, in the colours chosen in `View` → `EEM colours`. |
|
|
318
|
+
| `report.html` | One page with the whole analysis: samples, every processing step, indices, the exploratory models, the final model with its validation, outlier diagnostics (residual EEMs of the worst-fitted samples, residuals by wavelength) and the settings. The figures are inside the page, so it can be e-mailed or archived as it is. |
|
|
305
319
|
|
|
306
320
|
The `3` in the names is the number of components of the final model.
|
|
307
321
|
|
eemkit-0.3.0/docs/cli.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Command line
|
|
2
|
+
|
|
3
|
+
The `eemkit` command runs a project without the application: the same
|
|
4
|
+
settings file, the same steps, the same results. It is the way to rerun an
|
|
5
|
+
analysis on a server, in a batch script, or months later.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
eemkit check project.toml
|
|
9
|
+
eemkit run project.toml
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
If the `eemkit` command is not found (Python's `Scripts` folder is not on the
|
|
13
|
+
PATH), use `python -m eemkit` instead: `python -m eemkit run project.toml`.
|
|
14
|
+
|
|
15
|
+
## `eemkit check`
|
|
16
|
+
|
|
17
|
+
Reads the project file and reports, without processing anything:
|
|
18
|
+
|
|
19
|
+
* how many rows the pairing table has and how many are included;
|
|
20
|
+
* every file of an included row that is missing (the first ten, then a count);
|
|
21
|
+
* settings that have no default and are not set, such as the cuvette path
|
|
22
|
+
lengths;
|
|
23
|
+
* the output folder, and whether the final PARAFAC model has been chosen.
|
|
24
|
+
|
|
25
|
+
It ends with `OK` (exit status 0) or the number of problems (exit status 1).
|
|
26
|
+
|
|
27
|
+
## `eemkit run`
|
|
28
|
+
|
|
29
|
+
Runs the whole chain in the order of the application:
|
|
30
|
+
|
|
31
|
+
1. reads the included samples;
|
|
32
|
+
2. corrections up to Raman units, then scatter removal and crop;
|
|
33
|
+
3. fluorescence indices and, when absorbance spectra are paired, CDOM metrics;
|
|
34
|
+
4. the exploratory PARAFAC models for every rank in `parafac.ranks`, with
|
|
35
|
+
split-half validation (the table is printed);
|
|
36
|
+
5. the final model, if `parafac.final.rank` is set;
|
|
37
|
+
6. the export: corrected EEMs, indices, models, OpenFluor file, figures,
|
|
38
|
+
`report.html` (the whole analysis on one page), settings and processing
|
|
39
|
+
record.
|
|
40
|
+
|
|
41
|
+
| Option | Meaning |
|
|
42
|
+
| --- | --- |
|
|
43
|
+
| `-o`, `--output DIR` | Output folder; default `project.output_dir`. It may not be inside the data folder, which is read-only. |
|
|
44
|
+
| `-j`, `--jobs N` | PARAFAC random starts run at the same time; default every processor. The result does not depend on it. |
|
|
45
|
+
| `--no-explore` | Skip the exploratory models and fit only `parafac.final.rank`. |
|
|
46
|
+
| `--no-figures` | Do not write figures (they need matplotlib: `pip install "eemkit[plot]"`). |
|
|
47
|
+
| `--no-report` | Do not write `report.html` (it also needs matplotlib). |
|
|
48
|
+
|
|
49
|
+
Paths in the project file are relative to the folder that contains it.
|
|
50
|
+
Warnings are printed as they occur; an error stops the run with exit status 1
|
|
51
|
+
and a message that names the setting or the file.
|
|
52
|
+
|
|
53
|
+
Example on the Ombrone dataset (205 samples; abridged):
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
$ eemkit run config/ombrone_project.toml -o results
|
|
57
|
+
[ 0.0 s] reading the samples of the pairing table
|
|
58
|
+
[ 9.8 s] 205 samples
|
|
59
|
+
[ 9.8 s] corrections up to Raman units
|
|
60
|
+
[ 9.9 s] scatter removal and crop
|
|
61
|
+
[ 10.0 s] fluorescence indices
|
|
62
|
+
[ 10.1 s] CDOM metrics
|
|
63
|
+
warning: CDOM metrics: 40 sample(s) with values left empty (low signal); see the cdom_notes column
|
|
64
|
+
[ 10.1 s] exploratory PARAFAC models
|
|
65
|
+
[ 10.1 s] 2 components: fitting (1/12)
|
|
66
|
+
...
|
|
67
|
+
explained_pct core_consistency_pct ... split_half_min_tcc split_half_validated
|
|
68
|
+
rank
|
|
69
|
+
2 97.933 99.373 ... 0.989 True
|
|
70
|
+
3 99.016 74.868 ... 0.992 True
|
|
71
|
+
4 99.209 24.714 ... 0.175 False
|
|
72
|
+
...
|
|
73
|
+
[1214.2 s] final 3-component model (1/2)
|
|
74
|
+
[1485.1 s] split-half validation (2/2)
|
|
75
|
+
[1705.4 s] explained 99.017 %, core consistency 75.0 %, 20/20 starts at the best minimum, split-half min TCC 0.9915 (validated)
|
|
76
|
+
[1705.6 s] writing results to results
|
|
77
|
+
[1708.0 s] done: 16 files
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The exploration of six ranks with split-half validation is the slow part
|
|
81
|
+
(about 20 minutes here); once the rank is chosen, `--no-explore` reruns only
|
|
82
|
+
the final model.
|