Skip to content

OpenSpecLib v0.0.1

Choose a tag to compare

@github-actions github-actions released this 15 Apr 23:48
· 34 commits to main since this release

OpenSpecLib v0.0.1

Amalgamated spectral library containing ${TOTAL} spectra from the following sources:

${SOURCES_LIST}

Artifacts

  • openspeclib-0.0.1.tar.gz — Full library (catalog + all spectral data chunks)
  • openspeclib-catalog-0.0.1.json — Catalog only (metadata index, no spectral arrays)
  • checksums.txt — SHA-256 checksums

Usage

Download and extract the full library:

tar -xzf openspeclib-0.0.1.tar.gz -C ./speclib

Use just the catalog for lightweight metadata queries (JSON):

import json
catalog = json.load(open("openspeclib-catalog-0.0.1.json"))
print(f"Total spectra: {catalog['statistics']['total_spectra']}")

Library chunks are Apache Parquet (zstd-compressed) with one row per spectrum
and dot-separated columns (e.g. material.name, spectral_data.wavelengths).
Read them directly with pyarrow:

import pyarrow.parquet as pq
table = pq.read_table("speclib/spectra/usgs_splib07/mineral.parquet")
print(table.schema)

Or query across chunks with DuckDB without loading anything into Python:

SELECT id, "material.name"
FROM 'speclib/spectra/**/*.parquet'
WHERE "spectral_data.wavelength_min" < 0.4;

See docs/data-structure.md and
schemas/library.parquet-schema.md for the
full schema specification and column reference.