Synthetic Emission and Absorption Spectra

On clicking on the link at the bottom of this page a number of different synthetic spectra can be displayed. Currently you can select a continuous spectrum, a hydrogen absorption spectrum superimosed on a backbround continuum, and the emission spectra of several elements including hydrogen.

A combination of JavaScript, Vector Markup Language (VML) and Cascading Style Sheets are used to generate this image in your browser. The images displayed do not come from image files such as gifs or jpegs. However, you need Internet Explorer version 5 or higher for Windows with JavaScript enabled to see the images. Note that this does not work with the Macintosh version, and even some versions of Internet Explorer that are supposedly compatible have problems, such as showing many dark lines when a continuous spectrum is displayed. VML is built into compatible browsers without needing to download a plugin.

The spectra are generated by a series of merging colors that shade through from violet to red, in order to approximate what the eye sees by scanning over either 401 pixels at 1 nm per pixel or 801 pixels at 0.5 nm per pixel from 380 nm in the violet to 780 nm in the red. The absorption or emission lines are broadened with Lorentzian profiles. The large and small white tick marks indicate the wavelengths at 100 nm and 10 nm intervals respectively.

The source code of the file with the radio buttons to select the spectrum can be seen here, and the source code for drawing the selected spectrum can be seen here.

Sorry - unfortunately you do not have a compatible browser.

Click on the red arrow to see the spectrum.

 Return to the Coding & Scripting main page.