Convert reflection spectrum to optical density I have the spectrum 380-780 nm at 10 nm intervals of a nearly grey patch. I need to input its optical density into a calibrating programme. This is what a densitometer would do - but I don't have one and I don't know what the densitometer would be measuring. Is there a formula for making the translation? And I have 104 patches to convert. Thank you
 A: Here are a couple related questions: How do I convert light with a given spectrum to an RGB color? See this.
How do I convert RGB to grayscale? See this.
The idea is that lighter grayscale colors are those that appear brighter to the eye. Light appears brighter if it is more intense, and if its spectrum in in the region to which the eye is more sensitive.
You have a grey patch. Presumably you have illuminated it with light that is white - It covers the full visible spectrum. It isn't necessarily uniform at all wavelengths, but it emits enough to measure the entire range.
A colored object would reflect a different amount at each wavelength. You have a grey patch that presumably reflects roughly the same at each wavelength. You don't believe it is absolutely uniform, or you wouldn't need to measure the spectrum. So you find the fraction of light reflected at each wavelength. This determines the color of the grey patch. It is the color reflected white light would have.
The gray scale value is a weighted average of the reflectance over the visible spectrum, weighted by the sensitivity of the eye.
The last step is to convert reflectance to optical density.
$$OD = log_{10}(I_0/I) = log_{10}(reflectance)$$
