Desktop application¶
A stand-alone build for Windows, macOS and Linux, which needs no Python, can be downloaded from each release. With Python:
python -m pip install "eemkit[gui]"
python -m eemkit.gui # optionally followed by a project.toml
The eemkit-gui command does the same as python -m eemkit.gui when Python's
Scripts folder is on the PATH. While it loads, a start-up screen shows the
logo, the version and the institutions that support eemkit (Università degli
Studi di Siena, Università degli Studi di Palermo, National Biodiversity
Future Center, Italy); set the environment variable EEMKIT_NO_SPLASH=1 to
start without it.
The application is a front end to eemkit.pipeline: it does no processing
of its own. Its project file is the pipeline's settings TOML, so an analysis
made in the application can be rerun from a script:
from eemkit import pipeline
s = pipeline.load_settings("project.toml")
raw = pipeline.load(s, base="folder/of/project.toml")
after = pipeline.correct_until_raman(raw, s)
corrected = pipeline.finish_corrections(after, s)
Long computations run in the background with a progress bar and a Cancel button (cancellation takes effect after the current model fit). Warnings raised during a computation (for example a model that did not converge) are collected and shown with a "⚠ warnings" button in the status bar.
Steps¶
The steps are listed in a sidebar; a ✓ marks the steps whose results are ready (• when they are partly done), and a summary of the project sits below the list. The main action of each page is the coloured button.
- Project and pairing. Choose the data folder (only read, never
written), the pairing table and an output folder. Scan data folder
classifies every CSV from its header (Cary Eclipse 3-D EEM, Cary 60
absorbance, or not recognised). Draft pairing from scan proposes one row
per sample: absorbance file with the same sample name, and the only blank
in the folder. Every drafted row starts excluded and yellow, with
the reason for each choice in
pairing_notes; rows are used only after you check and include them. Cells are edited by double-click; file columns offer the files found by the scan. - Corrections. Optional instrument spectral correction (excitation and emission factor files; each file is read when chosen and its range shown), cuvette path lengths (required, no default), Raman normalisation, scatter bands, crop. Apply corrections runs the chain in the enforced order; the preview shows any sample at any step, and the factors that were applied.
- Indices and CDOM. FI, HIX, BIX and Coble peaks, and the CDOM metrics (a254, a350, spectral slopes, SR, E2:E3, SUVA254 with a DOC column), as one table plotted against any sample column (e.g. campaign) grouped by another (e.g. river).
- PARAFAC. Exploratory models for a range of components with split-half validation; the number-of-components diagnostics, the components of each model with the split-half models behind, and an outlier view (leverage vs residuals) from which samples can be left out. Then the final model.
- Rivers and dates. Comparison of campaigns, sites and rivers
for any variable of the indices table or of the final model (Fmax, share of
each component): replicate means per site and time, a warning when rivers
and dates cannot be separated, Kruskal–Wallis and Dunn tests between
campaigns within each river, correlations with the position along the
river and with covariates from optional tables. Save to output folder
writes the tables and figures in
campaigns/<variable>/. - Export. Corrected EEMs, indices, PARAFAC tables, OpenFluor file and
figures, always with
settings.tomlandprocessing_record.json(software versions and every processing step with its parameters).
When a setting changes, results that depended on it are discarded, so no tab shows results that are out of date.
View → Theme switches between a light and a dark theme, or follows the operating system; the choice is a preference of the computer, not of the project. View → EEM colours switches every EEM plot (previews, components, exported figures) between the Cary Eclipse rainbow (default) and a single-hue blue scale for print. The choice is saved in the project file.
Stand-alone build¶
packaging/eemkit-gui.spec builds a folder with an executable that runs
without a Python installation:
git clone https://github.com/LowCostSensor/eemkit && cd eemkit
pip install ".[gui]" pyinstaller
pyinstaller packaging/eemkit-gui.spec --noconfirm
With conda, build from an activated environment (conda activate ...):
conda-forge keeps the Qt DLLs in Library/bin, which PyInstaller finds only
on the PATH. On Windows use a short --distpath (Qt plugin paths exceed the
260-character limit in deep folders). The Windows build is about 160 MB. If the
application closes at start-up, the reason is written to eemkit-crash.log
in the temporary folder.
Build on each system for that system. The result is dist/eemkit (with
eemkit.exe or eemkit) on Windows and Linux, and dist/eemkit.app on macOS
(signed ad hoc, without an Apple identity). The release workflow
(.github/workflows/release.yml) does the same on GitHub for Windows, macOS
on Apple silicon and Linux, checks that each build starts, and attaches the
archives to the release; run it by hand from the Actions tab to build them
without a release.
The icons (eemkit.ico, eemkit.icns, PNGs) are in packaging/icons, made
from the logo by python packaging/icons/make_icons.py (needs Pillow), which
also writes the window icons in src/eemkit/gui/icons and the logo in
docs/img.