Home > ISET > color > Quanta2Energy.m

Quanta2Energy

PURPOSE ^

Convert quanta (photons) to energy (watts)

SYNOPSIS ^

function energy = Quanta2Energy(wavelength,photons)

DESCRIPTION ^

Convert quanta (photons) to energy (watts)

  energy = Quanta2Energy(WAVELENGTH,PHOTONS)

 Convert PHOTONS represented at the sampled WAVELENGTH positions to
 energy (watts or joules).

 WAVELENGTH is a column vector describing the wavelength samples [nm]
 PHOTONS can be a matrix in either RGB or XW (space-wavelength) format.
 In the XW format each spatial position is in a row and the wavelength
 varies across columsn.  The output, ENERGY, [watts or Joules] is
 returned in  same format as input (RGB or XW).

 CAUTION: The input form differs from the Energy2Quanta() call, which has
 the energy spectra in the columns.

 Examples:
   wave = 400:10:700;  p1 = blackbody(wave,5000,'photons');
   e = Quanta2Energy(wave,p1);              % e us a row vector, space-wavelength (XW) format
   p2 = Energy2Quanta(wave,transpose(e));   % Notice the TRANSPOSE
   figure; plot(wave,p1,'ro',wave,p2,'k-')

 Copyright ImagEval Consultants, LLC, 2003.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Thu 20-Nov-2008 22:09:04 by m2html © 2003