Federated spectral signature library with Kentucky-focused collections
Project description
speclib
Federated spectral signature library with Kentucky-focused collections
Overview
speclib aggregates reflectance spectra from major public spectral libraries into a unified, searchable platform. It provides a Python package for researchers, a static web viewer for discovery, and an optional self-hosted API for power users.
The library federates spectra from USGS Spectral Library v7, ECOSTRESS, ASTER/JPL, and EMIT L2B, with a dedicated Kentucky chapter seeded with invasive species spectral data from Lyons et al. (2024).
Features
- Federated ingestion from USGS splib07, ECOSTRESS, ASTER/JPL, and EMIT L2B
- Dual storage — HDF5 archival backend + Parquet query layer
- Export to .esl (Esri), .sli (ENVI), SPECPR binary, ASCII, JSON
- Spectral resampling to Landsat, Sentinel-2, AVIRIS, EMIT, and custom sensors
- Static web viewer on GitHub Pages with D3.js interactive spectral plots
- Optional FastAPI server with REST API and Jinja templates
- Kentucky chapter with invasive species, mineral, and reclamation spectra
Getting Started
Prerequisites
- Python 3.11+
- pip
Installation
pip install speclib
With optional dependencies:
pip install speclib[server] # FastAPI server
pip install speclib[emit] # EMIT L2B support (netCDF4)
pip install speclib[all] # Everything including dev tools
Quick Start
from speclib import SpectralLibrary
# Load the library from an HDF5 archive
lib = SpectralLibrary.from_hdf5("speclib_archive.h5")
# Search for quartz spectra
results = lib.search("quartz", category="MINERAL")
# Plot a spectrum
results[0].plot()
# Export to Esri Spectral Library format
results[0].export("quartz.esl", format="esl")
# Resample to Landsat 8 OLI bands
resampled = results[0].resample("L8_OLI")
CLI
speclib ingest usgs --config data/upstream/usgs_splib07.yaml
speclib search "honeysuckle" --category KY_INVASIVE
speclib export usgs_mineral_quartz_a1b2c3d4 --format sli --output quartz.sli
speclib build
speclib serve
Web Viewer
Browse the spectral library at: https://chrislyonsKY.github.io/speclib/
Data Sources
| Source | License | Description |
|---|---|---|
| USGS Spectral Library v7 | US Public Domain | Minerals, rocks, soils, vegetation, manmade materials |
| ECOSTRESS Spectral Library | CC0 / Public Domain | Minerals, vegetation, soils, water, manmade |
| ASTER/JPL Spectral Library | NASA Open Data | Minerals, rocks, soils |
| EMIT L2B | NASA Open Data | Spaceborne mineral identification spectra |
| Kentucky Field Data | CC-BY-4.0 | Invasive species spectra (Lyons et al. 2024) |
Citation
@software{lyons2026speclib,
author = {Lyons, Chris},
title = {speclib: Federated Spectral Signature Library},
year = {2026},
url = {https://github.com/chrislyonsKY/speclib},
doi = {10.5281/zenodo.XXXXXXX},
license = {GPL-3.0}
}
Note: Replace
XXXXXXXwith the actual Zenodo DOI after the first release is archived.
Contributing
See CONTRIBUTING.md.
Security
See SECURITY.md for reporting vulnerabilities.
License
GPL-3.0-only — see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file speclib-1.0.0.tar.gz.
File metadata
- Download URL: speclib-1.0.0.tar.gz
- Upload date:
- Size: 44.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ce9f7c82585b6dd49b071ebcb41d8ecf0cd6fa47dfd52f7ed390f23d71396f8
|
|
| MD5 |
b2fa1c6a034d49754636ea3f26564825
|
|
| BLAKE2b-256 |
c6fedb8ce92b7eef183fe8a81fa4859484bb58e2f21b1a4bb602944ded03adac
|
Provenance
The following attestation bundles were made for speclib-1.0.0.tar.gz:
Publisher:
publish.yml on chrislyonsKY/speclib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
speclib-1.0.0.tar.gz -
Subject digest:
9ce9f7c82585b6dd49b071ebcb41d8ecf0cd6fa47dfd52f7ed390f23d71396f8 - Sigstore transparency entry: 1218395617
- Sigstore integration time:
-
Permalink:
chrislyonsKY/speclib@e864596f9bf33c42d787b575b2ebede348dff724 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/chrislyonsKY
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e864596f9bf33c42d787b575b2ebede348dff724 -
Trigger Event:
release
-
Statement type:
File details
Details for the file speclib-1.0.0-py3-none-any.whl.
File metadata
- Download URL: speclib-1.0.0-py3-none-any.whl
- Upload date:
- Size: 34.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ef29fc37c6f30633f8bd753df4e6cb0eb22dc9aaeafa4989ff29d3049c72d10
|
|
| MD5 |
e00b8ef5c9ea4336450385b37e1293e8
|
|
| BLAKE2b-256 |
e6ce11be5372f316bf22537e73c6d4b20cc7fe5769b53689883fe76c4339c468
|
Provenance
The following attestation bundles were made for speclib-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on chrislyonsKY/speclib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
speclib-1.0.0-py3-none-any.whl -
Subject digest:
1ef29fc37c6f30633f8bd753df4e6cb0eb22dc9aaeafa4989ff29d3049c72d10 - Sigstore transparency entry: 1218395688
- Sigstore integration time:
-
Permalink:
chrislyonsKY/speclib@e864596f9bf33c42d787b575b2ebede348dff724 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/chrislyonsKY
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e864596f9bf33c42d787b575b2ebede348dff724 -
Trigger Event:
release
-
Statement type: