Skip to main content

Project logo

sptk: The Spectral Parameters Toolkit

DOI


sptk is a Python package for investigating the ability of a multispectral imaging system to identify distinct materials and material groups through differences in reflectance spectra.

Table of Contents

About

sptk provides a simple interface for:

  • simulating the spectral response of an instrument,
  • sampling a spectral library with the instrument,
  • measuring the reconstruction error of the instrument on the spectral library,
  • evaluating the spectral parameters afforded by the instrument,
  • evaluating and ranking the ability of the spectral parmameters, and spectral parameter combinations, to separate categories of materials.

Installing

sptk is available via PyPI.

We recommend downloading a copy of the https://github.com/rbstabbins/sptk repository, and running the unit tests and working through the example notebooks.

To run the example notebooks you'll also need to download the accompanying Example Dataset, hosted in the following Zenodo repository: doi:10.5281/zenodo.10683367.

Prerequisites

First, prepare a new environment with Python=3.10.8, using your environment manager of choice.

For example, with conda:

conda env create -n sptk python=3.10.8

and activate the environment:

conda activate sptk

Currently sptk is only available via pip, so make sure you have pip installed on your environment also, e.g.:

conda install pip

Installing

Install the latest version of sptk with pip:

pip install sptk

you can also specify the version you'd like to install, e.g.:

pip install sptk=0.1

Running the Tests

The sptk/tests/ directory hosts a set of unit tests for each module of the sptk package. These have been written for the unittest unit testing framework.

The unit tests can be executed by navigating to the sptk/tests directory and running:

python -m unittest -v

The unit tests provided are comprehensive but not exhaustive. We recommend also executing the example notebooks to test and understand the software.

Running the Example Notebooks

We recommend exploring the example notebooks to become familiar with the software and the placement of directories in the repository.

Please follow the guidelines in the README.md to download the required Example Dataset for executing the example notebooks.

The sptk/tests/ directory hosts a set of unit tests for each module of the sptk package. These have been written with

Authors

The Spectral Parameters Toolkit was designed and developed by @rbstabbins.

See also the list of contributors who participated in this project.

Citing the Software

If you use sptk in your research, please provide acknowledgement to the authors with the following citation:

Roger Stabbins, & Grindrod, P. (2024). rbstabbins/sptk: Release v0.1 (v0.1). Zenodo. https://doi.org/10.5281/zenodo.10692531

Acknowledgements

The development of this software has been funded by the following grants:

  • UK Space Agency Aurora Science Programme: Geochemistry to Geology for ExoMars 2020 visible to near infrared spectral variability ST/T001747/1
  • UK Space Agency Mars Exploration Science Standard Call 2023: Exploring the Limits of Material Discrimination with CaSSIS Multiband Imaging ST/Y005910/1

Metadata

Release files for sptk 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sptk 0.1
File Size Uploaded
sptk-0.1.tar.gz 63.9 kB Details

Built distribution (wheel)

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

Total release size: 131.3 kB

Release files / sptk-0.1.tar.gz

Download URL sptk-0.1.tar.gz
Size 63.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9381e3a244cd8bc21fd7fd629c7ecf623600b3502b1c4a18c1ae152a5e976b2d
BLAKE2b-256 checksum
How to use checksums
0063613179529d14ac516938eda2149dbac878af618722cfbdf237f9e0af29d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.2 Darwin/22.6.0

Release files / sptk-0.1-py3-none-any.whl

Download URL sptk-0.1-py3-none-any.whl
Size 67.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d2ec8a62d2b863923afbf8b0374f28d827807dbdd327970946cb5ffaf27ae1c
BLAKE2b-256 checksum
How to use checksums
e3adae3631a48e96a8740684804bb5f901617a1d5f1563b9a68f2161d89c5a81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.2 Darwin/22.6.0

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

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