Public Lab Wiki documentation



Spectral Workbench exporting

This is a revision from May 14, 2013 14:51. View all revisions
2 | 6 | | #4213

How to get data out of Spectral Workbench

There are CSV, XML, and JSON exports available for any spectrum, even those which haven't yet been calibrated. They are available on the "show spectrum" pages such as: https://spectralworkbench.org/spectra/show/913

Look in the "Details" section, above the social sharing badges, as in this screenshot:

Spectral Workbench exports

Bulk queries

You can download data in bulk on the Tag page, which includes links to recent spectra in XML or JSON format on a per-tag basis. For example:

https://spectralworkbench.org/tag/laser.json https://spectralworkbench.org/tag/cfl.xml

It only displays the most recent 24, but you can go back by "page" using:

https://spectralworkbench.org/tag/cfl.xml?page=3 https://spectralworkbench.org/tag/cfl.xml?page=4 https://spectralworkbench.org/tag/cfl.xml?page=5

CSV format description

The CSV output is a 5 column comma separated text file. The first row contains text headers. Subsequent rows contain data in increasing wavelength order.

Column 1 contains the wavelength in nm.

Column 2 contains the average reflectance/transmittance/emissivity as a raw value integer in the range [0,255] as read. This value has not been converted to physical units and does not distinguish between reflectance and emissivity.

Columns 3, 4, and 5 are in the same format as column 2 and represent the red, green, and blue channels as read from the spectrum image.