Skip to main content

Utility package for working with spectral data cubes.

Project description

🛰️ reflspeckit

⚙️ A modern toolkit for working with any and all flavors of spectral data with a focus on applications for reflectance/emittance imaging spectroscopy


PyPI - Python Version PyPI - License PyPI - Version


🧠 What is reflspeckit?

reflspeckit is a lightweight, modular Python package designed to make analysis of spectral data cubes simple, flexible, and fun. Whether you're exploring planetary hyperspectral data, performing band analysis, or building your own spectral pipelines — this toolkit’s got you covered.


⚙️ Package Structure

reflspeckit provides two primary classes for the analysis of spectral data plus a third class specialized for large datasets:

  • 📄Spec1D - handles 1-dimensional, single spectrum data
  • 📒Spec3D - handles 3-dimensional spectral image cubes
  • 🗄️StreamingSpec3D - handles large image cubes using a streaming approach

Each class has equivalent methods, which are listed below:


🧰 Available Methods

Method Description
🚩outlier_removal Removes anomalous data in the spectral domain
🔊noise_reduction Provides filtering methods to smooth data in the spectral domain
📈polyfit Performs a least squares polynomial fit over a specified spectral region

💡 Spectral Utilities

Various spectral utilities are available through the reflspeckit.utils subpackge.

Module Description
get_nonzero If you have an empty 3D image array with the first two dimensions being pixels and the third dimension of size N, and each pixel is filled in to a certain depth, M <= N, this function returns a 2D image array that picks out all the pixel values at position M.

More utilities coming soon! As a work through my Ph.D., I will add all the various utility functions I write for spectral data processing here!


🚀 Quick Start

pip install reflspeckit
import reflspeckit as rsk

# Loading in a single spectrum
my_spectrum = rsk.Spec1d(spectrum_array, wavelength_array)
my_spectrum.remove_outliers()
myspectrum.noise_reduction(method="box_filter", filter_width=5)
print(myspectrum.filtered)  # Contains filtered spectrum

# Loading in a spectral image cube
my_cube = rsk.Spec1d(cube_array, wavelength_array)
my_cube.remove_outliers()
my_cube.noise_reduction(method="box_filter", filter_width=5)
print(myspectrum.cube)  # Sequentially replaces myspectrum.cube to save memory.

🔗 Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reflspeckit-0.1.7.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reflspeckit-0.1.7-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file reflspeckit-0.1.7.tar.gz.

File metadata

  • Download URL: reflspeckit-0.1.7.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for reflspeckit-0.1.7.tar.gz
Algorithm Hash digest
SHA256 df4fd7d00f33d23bcb1ab395c8d155919b90c2e5ce2d3a6a0899a992964f1786
MD5 5fa80233241c706d73f51e42ecd0f5b0
BLAKE2b-256 1cf07969ab97499ec850c42e1684bcc804b3f5dec66374212df4a80a64cb3e0e

See more details on using hashes here.

File details

Details for the file reflspeckit-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: reflspeckit-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for reflspeckit-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a3109782cbe29a0e4f196c72852f67f067ce22d16d37e636f3626dcf785746e9
MD5 f2568baa23d060cc572492ff23f03b4d
BLAKE2b-256 3455e732f6242f289d6deb68b0b55853a4c7ca891ddfe2711396a865c5fd89a9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page