napari Sediment
A plugin to process hyperspectral images of sediments
This napari plugin is designed to hyper-spectral images of sediment cores. It is composed of three interfaces allowing the user to:
- import HDR images
- normalize the images using white and dark references
- mask unwanted regions
- perform spectral dimensionality reduction via minimum noise fraction analysis
- perform spatial dimensionality reduction based on pixel purity indices
- identify representative end-members by clustering pure pixels
- select relevant regions in spectra to compute absorption indices and create absorption maps
Pre-processing: Sediment widget
The sediment widget allows the user to import an HDR image and to normalize it using white and dark references. The widget also allows the user to mask unwanted regions of the images.
Documentation
You can find a detailed documentation here.
Installation
Create a conda environment and activate it. If you don't have conda installed you can for example install miniforge.
conda create -n sediment python=3.12 napari pyqt -c conda-forge
conda activate sediment
Then you can install napari-sediment use:
pip install napari-sediment
Or you can install the latest development version directly from the GitHub repository:
pip install git+https://github.com/guiwitz/napari-sediment.git
On Windows, there is sometimes an issue installing PyTorch (needed for pixel classification). In this case we recommend the following:
conda create -n sediment python=3.12 napari pyqt pytorch torchvision -c conda-forge
conda activate sediment
pip install git+https://github.com/guiwitz/napari-sediment.git
Contributing
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
License
Distributed under the terms of the BSD-3 license, "napari-sediment" is free and open source software
Authors
This plugin has been developed by Guillaume Witz at the Data Science Lab of the University of Bern in collaboration with Petra Zahajská, Institue of Geography of the University of Bern. Funding for development was provided by Prof. Martin Grosjean, Institute of Geography of the University of Bern.
Issues
If you encounter any problems, please file an issue along with a detailed description.
Version:
- 0.5.0
Last updated:
- 2025-10-29
First released:
- 2024-09-23
License:
- BSD-3-Clause
Supported data:
- Information not submitted
Save extension:
Python versions supported:
Operating system:
- Information not submitted
Requirements:
- numpy>1
- zarr==3.*
- magicgui
- qtpy
- napari-guitils
- napari-convpaint==0.6.0
- torch<2.9.0
- superqt
- natsort
- spectral
- matplotlib
- scikit-image
- scikit-learn
- PyYAML
- microfilm
- dask
- distributed
- tqdm
- cmap
- colour-science
- tox; extra == "testing"
- pytest; extra == "testing"
- pytest-cov; extra == "testing"
- pytest-qt; extra == "testing"
- napari; extra == "testing"
- pyqt5; extra == "testing"
- torch; extra == "classifier"
- torchvision; extra == "classifier"

