Code covered by the BSD License  

Highlights from
Field Spectroscopy Facility Post Processing Toolbox

4.7 | 3 ratings Rate this file 34 Downloads (last 30 days) File Size: 1.71 MB File ID: #31547 Version: 1.16

Field Spectroscopy Facility Post Processing Toolbox


Iain Robinson (view profile)


24 May 2011 (Updated )

A toolbox for importing and processing optical spectra acquired with portable spectroradiometers.

| Watch this File

File Information

The toolbox can import spectra acquired on spectroradiometers manufactured by Analytical Spectral Devices (ASD), Spectra Vista Corporation (SVC), Ocean Optics and the Field Spectroscopy Facility (FSF). It can post process spectra to calculate spectral reflectance, radiance and irradiance. It also provides functions for spectral smoothing with a Savitzky-Golay filter and the removal of the spectral regions dominated by water absorption. Field spectra may be compared with measurements made by satellite or airborne instruments by convolving the field spectra with the relative spectral response functions (bands) of these instruments.
The toolbox was developed by Iain Robinson and Alasdair MacArthur at the Field Spectroscopy Facility in Edinburgh. This work is supported by the Natural Environment Research Council.
The User Guide is available from this page:

Required Products Signal Processing Toolbox
MATLAB release MATLAB 7.8 (R2009a)
MATLAB Search Path
Other requirements The function 'sgsmooth' (Savitzky-Golay smoothing) requires the Signal Processing Toolbox.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
28 Apr 2015 Nikolaj Feidenhansl

Great script!

Just want to share one bug:
I used the script to import some Ocean Optics files (ProcSpec), but often got an error because it could not find the ps_0.xml file in the "zip" archive.
I use Spectra Suite (not the new OceanView) in scope mode.

When looking in the .Procspec files, I found that the number of the ps_*.xml file kept increasing each time i saved a new spectrum.

Changing the line from
strfind(unzippedFileNames{n}, 'ps_0.xml')
strfind(unzippedFileNames{n}, 'ps_')
solved the error.

Just to let you know.

07 Jun 2013 jean mensa

it reads,

SWIR1Gain: 0 SWIR2Gain: 0
SWIR1Offset: 0
SWIR2Offset: 0
Join1Wavelength: 0
Join2Wavelength: 0

resulting in data = 0 due to the normalization of the spectrum. The model is a FieldSpec Hand Held 2.

05 Jan 2012 zhaoowen  
30 May 2011 1.6

Spectra from ASD and SVC spectroradiometers are now imported with the 'importasd' and 'importsvc' functions respectively. Added partial support for Ocean Optics files. Added functions for radiometric calibration. Tidied up the User Guide.

24 Jul 2011 1.7

Added support for importing binary files acquired by Analytical Spectral Devices' (ASD) spectroradiometers.

05 Sep 2011 1.8

Modified the 'convolve' function to allow convolving multiple spectra to a set of spectral response functions (bands). (Previous versions could only convolve a single spectrum.)

06 Oct 2011 1.9

Fixed a bug which prevented the import of the Field Spectroscopy Facility's panel calibration data on some platforms. Thanks to Anna Hughes from Swansea University for identifying this bug.

12 Jul 2012 1.10

Improved the reliability of the 'importoceanoptics' function. This function imports files created by Ocean Optics Spectrometers in the binary (OOI) format. It now works on all platforms including Windows.

18 Jul 2012 1.11

Fixed an error that occurred in MATLAB 2012a when importing spectrum files.

16 Jul 2013 1.12

Modified the importoceanoptics function to better handle files created by Ocean Optics' SpectraSuite spectroscopy operating software. These 'processed spectrum' files contain invalid characters which must be removed from the file before parsing.

19 Jul 2013 1.13

The toolbox can now import files recorded on a Spectra Vista Corporation HR-1024i spectroradiometer. There is however an issue with 'Scan Settings'.

13 Dec 2013 1.14

Added link to documentation.

20 Nov 2014 1.15

The toolbox is now available as a MATLAB Toolbox (.mltbx) file for users of MATLAB version R2014b and later.

28 Apr 2015 1.16

This update (version 1.3.9) fixes a bug which caused the function importoceanoptics to fail to import some Ocean Optics' ProcSpec files. This bug was identified in a comment on MATLABCentral by Nikolaj Agentoft Feidenhans'l.

Contact us