What Is SpecDAL?

-a Python toolkit for processing field spectroscopy data-


SpecDAL is a Python 3.5 library for preparing and processing environmental spectroscopy data. It includes drivers for reading file formats from common portable field spectrometers as well as functions for filtering, resampling, and aggregating spectra. SpecDAL is inspired by GDAL and R-FieldSpectra. Supported file formats and functionality are always growing.

Current and Future Functionality


SpecDAL can read file formats from ASD, Spectra Vista, and Spectral Evolution spectrometers. We hope to soon have drivers for Ocean Optics, UniSpec, and Piccolo spectrometers. Current functionality includes filtering, jump correction and splicing, overlap blending, and resampling.

We hope to add the following functionality:

  • grow the list of supported file formats
  • create command line utility programs for the most common processing tasks
  • create example workflow scripts to encourage consistent processing
  • create a class model that supports the internal storage of wavelength, radiance, and other transformation models
  • develop a model transformation class to allow statistical models (e.g. plant chemistry) to be stored internally and applied in real time
  • develop functionality to seamlessly translate files between supported formats
  • begin development of Spectral Information System software with a comprehensive GUI for data visualization, analysis, and processing
  • create a non-proprietary open file format standard that allows data from different instruments to be directly exchanged and compared
  • create language bindings for other languages like R, Java, Ruby, C++

Examples


We've written a few "pipeline" scripts to suit our needs. We'll get these into the Github repo soon. Usage of pipeline scripts looks like this:

usage: pipeline_ASD_processing.py [-h] --input_directory INPUT_DIRECTORY
                                  [--subset_wavelength_range SUBSET_WAVELENGTH_RANGE SUBSET_WAVELENGTH_RANGE]
                                  [--jumpcorrection_wavelengths JUMPCORRECTION_WAVELENGTHS JUMPCORRECTION_WAVELENGTHS]
                                  [--jumpcorrection_stablezone JUMPCORRECTION_STABLEZONE]
                                  --grouping_output_name
                                  GROUPING_OUTPUT_NAME --grouping_pattern
                                  GROUPING_PATTERN [--recursive]

optional arguments:
  -h, --help    show this help message and exit
  --input_directory INPUT_DIRECTORY
  --subset_wavelength_range SUBSET_WAVELENGTH_RANGE SUBSET_WAVELENGTH_RANGE
  --jumpcorrection_wavelengths JUMPCORRECTION_WAVELENGTHS JUMPCORRECTION_WAVELENGTHS
  --jumpcorrection_stablezone JUMPCORRECTION_STABLEZONE
  --grouping_output_name GROUPING_OUTPUT_NAME
  --grouping_pattern GROUPING_PATTERN
                     e.g. *-X OR *_X for leaf level averaging
  --recursive

Installation


We do not yet have a proper installer, but you can clone the SpecDAL Github repo.

Collaborators & Related Projects