


Convert energy (watts) to number of photons. photons = Energy2Quanta(wavelength,energy) Energy (e.g., watts) is converted to photons. Typically energy is a matrix of column vectors that measure the energy at the sample WAVELENGTHS specified in nanometers, say watts/sr/m2/nm if we are dealing with radiance. The columns are different samples, or sometimes different spatial positions. The entries down a column represent the energy as a function of wavelength. The entries across a row represent the energy at a single wavelength for each of the samples. SEE ALSO Quanta2Energy(). CAUTION: Unfortunately, the two routines Quanta2Energy and Energy2Quanta take data data in rows vs. cols. In the fullness of time, this will be changed; but it will require some effort because they are inserted in so many important places. Examples: wave = 400:10:700; in = [blackbody(wave,5000,'energy'),blackbody(wave,6000,'energy')]; p = Energy2Quanta(wave,in); figure; plot(wave,p); Notice that in the return, out becomes a row vector, consistent with XW format. Also, notice that we have to transpose p to make this work. Tragic. out = Quanta2Energy(wave,p'); % out is a row vector, XW format figure; plot(wave,in,'ro',wave,out','k-') Copyright ImagEval Consultants, LLC, 2003.
