Updates on Hurricane Ida? Join us for Open Call every Tuesday at 2pm Central Time Click here for call-in details!

Public Lab Wiki documentation

Spectral Workbench usage

6 | 53 | | #598


SpectralWorkbench.org is a web-based software suite for collecting spectra, using your Public Lab DIY spectrometer.

Once you have an assembled spectrometer connected to your computer or smartphone, create an account at https://spectralworkbench.org, log in and click Capture. You'll then be able to connect to your spectrometer, capture and save spectra, and analyze and share them.


Watch the video below for a quick overview on capturing spectra.


You'll notice that many other spectra on the site have a scale showing "nm" or nanometer units on the horizontal axis. To get scaled data, you must calibrate your spectrometer. There are several kinds of calibration but here we're talking about wavelength calibration, which allows your spectrometer to display a wavelength value for any color of light it sees. Luckily, this is easy -- to learn how, see the Spectral Workbench Calibration page.

Ask a question  or help answer future questions on this topic


Spectral Workbench has a range of tools which may be used on any spectrum page to manipulate or analyze your data. Read about them on the Tools page

Find similar

The "find similar spectra" tool has also been added to the tools page


You can save multiple spectra in a permanent set in one of two ways:

Technique 1: Use the "Compare" interface on a spectrum page to compare one or more spectra with the one you have open already, then in the new "Comparisons" tab, click "Save as set." as shown:


Technique 2: From an existing set, click "Add spectrum" at the bottom for a search interface for finding and adding spectra:



How do you analyze samples of liquids, gases, or solids? Learn more about sampling here: http://publiclab.org/wiki/spectrometry-sampling

There are also a variety of activities being documented here if you're looking for spectrometry activities to attempt: http://publiclab.org/wiki/spectrometry-activities


Once your spectrometer is calibrated, what do you do next? This is the central question of our open spectrometry community. People are building and using these spectrometers for many reasons and there are different approaches being actively developed. For the time being, try browsing recent contributed open spectrometry research, and look over our growing list of applications and resources

Title Author Updated Likes Comments
Nothing yet on the topic "spectral-analysis" -- be the first to post something!

Ask a question  or help answer future questions on this topic


Various tutorial videos on using Spectral Workbench.

Watch this short video for a quick walkthrough of the whole process:

This 10 minute video goes into greater depth on how calibration works and how to do it well:

Watch this video about using Operations via the tool panes:

See Spectral Workbench Help if you have trouble.


Many things can go wrong (or right) when collecting spectra. Here are a few to look out for:

Title Author Updated Likes Comments
how to delete unwanted spectra? @a_sivolap978 about 2 months ago 2
I need to turn on the rear camera @at-63 6 months ago 3
livestream cam @agraefenstein 6 months ago 0
a quoi correspondent l'intensité en axe y et le chiffres en axe x sur le spectre? @ra_owoussi 6 months ago 1
how to upload pictures from own cell phone @dianapicazo2104 6 months ago 3
how does one load a calibration file? @stef 7 months ago 0
SW-V1 down samples the input to 256 samples irrespective of the native camera pixels available has this been fixed in V2? @stef 11 months ago 1
Using Thunderoptics spectrophotometer @jeffkrol 12 months ago 5
I recently built and attached the paper spectrometer to my android smartphone. when I connect to the spectral workbench software and hit the camera icon, permission to my camera is requested. However, after I grant permission, no image appears in the spec @Ldei about 1 year ago 6
What light sources might I use to calibrate my spectrometer if I don’t have a CFL available? @mimiss over 1 year ago 8
Problem whit workbench spectra. Unable to manipulate(work) whit any image @damian_orovitz over 1 year ago 1
copying calibration issue @kog62290 over 1 year ago 1
Spectral Workbench so slow on raspberry pi zero @danieisnietgek almost 2 years ago 3
How do I select the back camera of the smartphone? @renatoianhez about 2 years ago 2
Sorry for asking such a elementary question, what does the intensity % means? Can it shows how strong the light source is? Is it in terms of lux? @willieong about 2 years ago 1
Can you calibrate this? @jela0194 over 2 years ago 0
Is copy calibration on Spectral Workbench working? @microfibers over 2 years ago 2
How do I get the webcam feed on Spectral Workbench? @KenSuke over 2 years ago 1
How do I search for the spectra recorded by a specific user? @nnn16 over 2 years ago 5
Can detect the camara,but can't show image @JHYeh over 2 years ago 1
Spectral Workbench 1.0 seems much more stable than 2.0 and works well for the basic analysis I am trying to do, can I get access to 1.0 without being pushed to 2.0? @B-winters almost 3 years ago 1
Instruction videos don't work! @aemilius89 almost 3 years ago 4
changing default webcam @julietalemus almost 3 years ago 2
How can I connect my gopro to SpectralWorkbench software? Is there other open software that would? @CD3000 almost 3 years ago 3
Only seeing part of color spectrum @msolomon almost 3 years ago 6
copying calibration issue @ceberndsen about 3 years ago 0
Standalone Spectrometry software & uploading JPG or PNG spectra @lach_myers about 3 years ago 7
My uploaded file will not process. @JadaBada about 3 years ago 3
How can I get the absorption spectra once I have calibrated my spectrometer data? @amenzel8 about 3 years ago 1
Why do raw RGB values differ from calibrated RGB values? I thought calibration just set pixels to wavelength (nm)? @troyb about 3 years ago 17
Bug : Impossible to calibrate this mercury vapour spectrum @SarahC over 3 years ago 2
Bug? My Spectrum loads then vanishes. @SarahC over 3 years ago 2
Link for perfect CFL on Amazon UK? @SarahC over 3 years ago 1
Amazon UK - Link for perfect CFL? All mine are wide spectrum phosphor! @SarahC over 3 years ago 5
Has anyone experienced difficulty to log in this site? I having the trouble since yesterday. Not just log in, but to save spectrum too (sometimes can log in but take a long loading). sorry for my bad english. @silvi_ap51 over 3 years ago 9
The spectrum gets vertical no matter how I upload the picture. @wangdydu over 3 years ago 8
comparison betweeen spectra made by manufacturer and spectralbench? @miramon over 3 years ago 3
How do I use SpectralWorkbench.js to auto-calibrate? @shenzj1994 over 3 years ago 0
Can you get color temperature from spectra @miramon over 3 years ago 2
Can I get a file of numbers instead of a graph from the foldable spectrometer software? @mountevans over 3 years ago 4
I can't enter a password when I try to login to Spectral Workbench. So I can't log in at all. @storacremu over 3 years ago 6
CSV files from spectra @Dr_Z over 3 years ago 3
I want to know a method to quantify milk proteins using the foldable mini spectrometer, Is this possible? @julsmill over 3 years ago 3
I want to know a method to quantify milk proteins (cow milk, almond milk, coconut milk, oat milk) using the foldable mini spectrometer, Is this possible? @julsmill over 3 years ago 1
How to use the API to export a constant stream of data? @Reallygeek almost 4 years ago 7
How do we confirm the current version of the software? @quencher almost 4 years ago 4
How should i go about converting svgs to jpgs or pngs @Flameytail almost 4 years ago 3
Does anyone know what image processing spectral workbench does to find intensity at wavelength/ where to find the coding for that? @Reallygeek almost 4 years ago 10
Calibaration or switching scale? @jayjay70 about 4 years ago 1
Delete my profile? @MEC08 about 4 years ago 1
Starlight Recorder KIC8462852 @LightWaveResearch8000 about 4 years ago 1
How To Make Time Lapse Spectrometer @LightWaveResearch8000 about 4 years ago 2
"Use or calibrate calibration" dont show my reference CFL already calibrated @JSAENZ about 4 years ago 1
Image is blue - First time @LightWaveResearch8000 about 4 years ago 3
Copying Calibration @Ridwane over 4 years ago 1
Suppression of background light @saeed957 over 4 years ago 3
Cannot find colour spectrum @SpencerH over 4 years ago 2
Fraunhofer Lines at higher resolutions? @stef over 4 years ago 2
What are the units on the X axis for the spectrum capture for the Desktop Spectrometry Kit 3.0 @Schoster over 4 years ago 2
Save and Download buttons -where does the file save or download to? @testtube over 4 years ago 2
How to get spectral data in excel or other formats @suha over 4 years ago 4
orientation of slit vs that of diffraction grating @wlkwong over 4 years ago 2
Spectral Workbench recording time? @dhale2 almost 5 years ago 4
Calibration of spectra fails @Paul_P almost 5 years ago 13
Why copy calibration does not apply? @aelobo almost 5 years ago 1
Intensity for spectra too low? @chuynh451 almost 5 years ago 4
Error on calibrating uploaded spectrum @sarahcm almost 5 years ago 9
how to delete my spectra on Spectral Workbench @redleon almost 5 years ago 1
Calibration Issues with larger images @Anmar about 5 years ago 8
Can i upload csv files on spectralworkbench for calibration and other purposes? @shubham about 5 years ago 1
Question: Using a webcam with a image resolution of 1920x1020 @seko about 5 years ago 1
How to rename a set on Spectral Workbench? @AndrewJamesLaplante over 5 years ago 4
Question: How do I get the calibration user interface? @PeterDH over 5 years ago 3
Question: Why average? And what happens to the second Green? @viechdokter over 5 years ago 10
Difference CFL and Tube light? @Joris over 5 years ago 5
Question: desktop spectrometer 3.0 light sensitivity @Joris over 5 years ago 1
Question: Why won't the spectrum plot show once the image has been uploaded? @litar over 5 years ago 6
Question: Focus on mobile phone @clownfish over 5 years ago 1
Question: ccd camera on metascop @leanr over 5 years ago 7
Getting the spectrometer to work with a Raspberry Pi? @anjohn12 over 5 years ago 6
Automated captures? @viechdokter over 5 years ago 10
Question: total beginner problems @viechdokter over 5 years ago 9
Question: Spectrometer using photosensor @Abhay7417 over 5 years ago 1
Question: How do I save the calibration data? @mokeymark over 5 years ago 21
Question: Micro volume spectrometer using arduino and light detecting resistor. @Abhay7417 over 5 years ago 5
Question: can't save spectrum anymore @eigentuininhuis over 5 years ago 9
can't get the calibration right @eigentuininhuis over 5 years ago 3
What size (width and height) of the image to vertical upload (blue top) in SpectralWorkbench? @asasergio over 5 years ago 4
Question: How do I measure the absorption spectrum of a sample? @lucca_fabani over 5 years ago 5
Calibrating @daniel94 almost 6 years ago 5
Question: What does the vertical scale mean? @someHerrings almost 6 years ago 6
Question: Is there a way to delete a set of spectra from the spectral work bench? @ethanbass almost 6 years ago 6
Question: Help @porbe almost 6 years ago 2
Question: Why I can not upload images to calibrate @congminhqt about 6 years ago 7
Question: downloading spectrum @mebaumga about 6 years ago 1
Question: Stray light correction @SIMJEDI over 6 years ago 0
Question: Colorimetry using the desktop spectrometer @mattiecaroline1991 over 6 years ago 0
Question: deep UV @mebaumga over 6 years ago 5
Question: @edilberto over 6 years ago 1
Question: "live" compare to camera feed @wecapa over 6 years ago 3
Show more

Ask a question  or help answer future questions on this topic


If there's too much light, the camera's sensors can't compensate and will be maxed out. On your graph, this looks like it's "hitting the ceiling" and you get a section with only 100% brightness. (Sometimes this happens in only one channel and you can't see until you enable RGB mode, as in the below image.)


There are a few things you can do:

  • dim the source light
  • move it further away
  • use a diffuser (milky plastic, a sheet of paper), although this may affect your spectrum
  • reflect light off of a piece of white paper or a wall (or, for something with a very clean white spectrum, try Teflon)
  • use more sample (if you have, say, a colored liquid)

By default, Spectral Workbench chooses the top row of pixels as a cross-section of your spectrum image. If there is variability in the brightness of your spectrum image, vertically, as shown below, you may be able to select a different cross-section which does not have clipping. Go to More Tools and choose "Set sample row", then click on the image at a point where the brightness is lower. Please read this section about what the cross section represents, as it may vary based on how you are capturing.

However, if your spectrum is not perfectly vertical (for example if you've uploaded an image from a smartphone or still camera), selecting a different sample row may invalidate your calibration, since each color is now in a different location in the horizontal axis. In that case, you may need to take a new spectrum with lower light or shorter exposure.


Light leakage

If your spectrometer is not sealed well, light may enter the imaging chamber and mess up your readings. The below image has some white light leaking in -- just seal up your spectrometer well with dark tape, especially where your camera attaches to it.


Advanced use


Sometimes, when using the "waterfall" interface in live capture, you don't quite catch that moment when a flare of light is just perfect. You can use Set cross section under "Tools" on the spectrum page to choose the best cross-section of the image.


Webcam configuration

Most webcams have auto exposure and color "correction" so that in dim light, you can still see. This will unfortunately change the exposure between readings, so for quantitative work, it must be disabled. On Linux, you can use the "uvcdynctl" utility as outlined here.

On a Mac, you can download this utility: http://www.phoboslab.org/log/2009/07/uvc-camera-control-for-mac-os-x

"Sluggo" from DM9.se has written a UVC library and control app for OS.X. It works pretty well with a logitech c900 webcam, allowing GUI-based control of whitebalance, exposure, and focus(!). He's also working on an ObjectiveC wrapper. http://www.dm9.se/?tag=uvc-ctrl

If you find a comparable utility for Windows, please post it here.

Webcam selection

Some computers/browsers will initially choose the built-in webcam instead of the one in your spectrometer. On Chrome, some recent versions make it quite difficult to select the correct camera. Please first confirm that your computer can recognize the camera at all by using a desktop photo booth program and/or trying out this demo site.

Chrome ~v30+

In more recent versions of Chrome, you can click the camera-shaped icon in the address bar:


Chrome v26+

In slightly older versions of Chrome, you can click the camera-shaped icon in the address bar, then go into the menu settings to choose a camera:


Click "Manage media settings" and close the dialog which pops up (the menu you want is behind it). Then scroll down to find the Media section, and select the webcam, as shown below. Close the Settings page. You may need to reload the Spectral Workbench page now.


Chrome v25

If you are using Chrome 25+ and have a webcam in addition to your spectrometer, Google hid the "camera selection" menu under Settings > Advanced Settings > Privacy > Content Settings > Media > Camera. This is really unfortunate, but Google has improved that interface in more recent versions.

Chrome 21-24

In older versions, you can just choose a camera in the dropdown to the upper-right corner, then click Allow to the upper left.

Offline use

Spectral Workbench may be used offline once it is loaded in your browser. To do so, visit:


Once you've visited the above address, you will be able to access that page even without an internet connection, as long as you use the same browser. Read more about it here: Spectral Workbench Offline


You can also use a pure JavaScript version of Spectral Workbench, ideal for use with a Raspberry Pi spectrometer. The code is here:



@cedarlodge is developing a Python library too. See it in action here: https://publiclab.org/n/15880

Code: https://github.com/publiclab/spectral-workbench.py