How to use the Phone Spectroscope – Gem & Mineral Absorption Spectra
Free · works offline · no sign-up
Turn your phone and a diffraction grating into a visible-light spectroscope calibrated on the dark lines of sunlight or on mercury lamp lines. Absorption bands of gems and glass, iron-oxide colour of opaque stones. Free.
What is this? (start here)
White light is every colour of the rainbow mixed. A coloured stone keeps some colours and lets the rest through. A sheet of diffraction-grating film over the phone camera spreads the light into a rainbow, and the app measures which colours went missing. Each missing colour is a dark band, and each kind of atom (chromium, iron, cobalt, uranium, the rare earths) takes its own colours, so the bands tell you what is colouring the stone. Colours are measured in nanometres: violet about 400 nm, green about 530, red about 650. Never point the camera at the sun.
What it does
Which element is giving a gem, glass or stone its colour, read from the light it absorbs; and the colour of iron in an opaque stone (hematite or goethite type). It also opens spectra from laboratory spectrometers, databases and other apps, reads their bands with the same method, and saves spectra as JCAMP-DX or CSV. A library spectrum kept as two single-column files (wavelengths in one, values in the other) opens when you choose both files together, and a reflectance spectrum is also read for the hematite or goethite iron band.
What you need
Diffraction-grating film (1000 lines/mm) taped over the back camera; sunlight or a fluorescent lamp to calibrate; a torch or sunlight through a hole in card for the stone. For files, nothing extra.
How to use it
- Choose what you are measuring, then tap "OPEN THE CAMERA" and move the yellow strip onto the rainbow.
- Calibrate: with sunlight, tap a dark line on the plot and name it; with a fluorescent lamp, tap "Find the lines for me". After two lines the others are found for you and the table shows how far each sits from the fit.
- Tap "Record the light alone", then hold the stone in the light path and tap "Record through the stone".
- Save the reading with "Save as CSV" or "Save as JCAMP-DX". The JCAMP-DX file carries the bands as a peak table and the calibration lines, fit and uncertainty in its header.
- To read a spectrum from elsewhere, use "Open a spectrum file" under Spectrum files. Absorbance, transmittance or reflectance against wavelength (nm, micrometres or wavenumber) is read for bands; anything else is drawn and can be converted between JCAMP-DX and CSV.
Reading the answer
The verdict reads MATCHES, PARTLY LIKE or NO LIBRARY MATCH, with the absorption bands listed in nm and their uncertainty; a band names the colouring element, not the exact mineral. The percentage is how well band positions agree, not a probability. Look-alike notes say what the spectroscope can separate and what needs a laboratory (natural against synthetic ruby, emerald and sapphire cannot be told apart this way).
Methods and sources
- Calibration lines: mercury Hg I air wavelengths 404.656, 435.833, 546.074, 576.960 and 579.066 nm from the NIST Handbook of Basic Atomic Spectroscopic Data; solar Fraunhofer lines C, D, E, b, F, G and B (a blend such as sodium D sits at the mean of its lines, with an uncertainty that covers their spread); fluorescent-lamp phosphor peaks near 487.7 nm (terbium) and 611.6 nm (europium), carried with a larger uncertainty. Weighted least-squares fit, straight line or quadratic, with residuals.
- Absorbance A = log₁₀(I₀/I), averaged over 30 frames with its own noise; a band is reported only if it stands 3σ and at least 0.03 above its flanks.
- Gem band positions after Anderson & Payne, The Spectroscope and Gemmology (1998), Read, Gemmology (2005) and O’Donoghue, Gems (2006); iron-oxide bands after Scheinost et al. (1998), Clays and Clay Minerals 46:528 (hematite 521–565 nm, goethite and the other iron oxides 479–499 nm), found as the minimum of the second derivative of the Kubelka-Munk function (1−R)²/2R, as that method is applied (Bahia et al. 2015, Scientia Agricola 72:157–166); an iron band is named only when it stands 3σ above the noise of the readings.
- Files: JCAMP-DX 4.24, McDonald & Wilks (1988), Applied Spectroscopy 42:151–162, with all its compressed forms (AFFN, PAC, SQZ, DIF, DUP) and the X-sequence and Y-value checks; CSV with wavelength in the first column; two single-column files (micrometres or nm); deleted channels (values below −10³⁰, such as the −1.23e+34 the USGS Spectral Library writes, Kokaly et al. 2017) are left out and bridged, never read as zero.
- Checks: the page tests itself against the worked examples of that paper (Tables VI and VII) and round-trips every format it writes, reads real USGS Spectral Library files (Kokaly et al. 2017, doi:10.5066/F7RR1WDJ): quartz gives no iron band; hematite GDS27 and 2 % hematite in quartz give hematite bands; goethite WS222, 2 % goethite in quartz, lepidocrocite and maghemite give goethite-type bands. Across 30 laboratory iron-oxide spectra no goethite-group spectrum is named hematite; 11 of 17 hematites (mostly coarse, dark grains) give no clear band, and one dark hematite (WS161) is wrongly named goethite-type, so read the answer as likely, not proven. An earlier version read the second derivative of reflectance itself and named every real goethite hematite; that was fixed on 2 Dec 2026, and checks its mercury constants against NIST and its solar constants against the Fraunhofer table. Tap "Check the maths on this phone".
Limits
A phone sees about 410–700 nm with 3–10 nm resolution, so it cannot read the infrared bands that identify clays, micas and carbonates, cannot do Raman, and cannot detect most treatments. A missing band is weak evidence: a thick or dark stone hides bands that are there.
What is this? (start here)
Each part of the page now opens with a short "What is this? (start here)": the instrument itself (see-through or opaque stone), the spectrum files card (open a laboratory or library spectrum, save as CSV or JCAMP-DX) and the limits card.
Not possible here
Checking the gem band finder against a real, openly licensed transmission spectrum of a gem with its band list: searched (RRUFF, USGS, GIA Gems & Gemology, open data repositories); none was found in machine-readable form, so the gem references remain hand-spectroscope band positions from the books above. Telling goethite from lepidocrocite, maghemite or ferrihydrite (their bands overlap, Scheinost et al. 1998). Measuring how much hematite or goethite a soil holds: that needs a laboratory calibration against X-ray diffraction and a spectrometer.
Open the Phone Spectroscope – Gem & Mineral Absorption Spectra — free →