Home > ISET > color > ieXYZFromEnergy.m

ieXYZFromEnergy

PURPOSE ^

CIE XYZ values from spectral radiance (watts/nm/sr/m2) or irradiance (watts/nm/m2)

SYNOPSIS ^

function XYZ = ieXYZFromEnergy(energy,wave)

DESCRIPTION ^

 CIE XYZ values from spectral radiance (watts/nm/sr/m2) or irradiance (watts/nm/m2)

    XYZ = ieXYZFromEnergy(energy,wave)

 Calculate the XYZ values of the spectral radiance or irradiance
 functions in the variable ENERGY.  The input format of energy can be
 either XW (space-wavelength) or RGB. The wavelength samples of energy
 are stored in the variable WAVE.

 Notice, that XW is AN UNUSUAL FORMAT for energy.  Often, we put the
 SPDs into the columns of the matrix.  But in the XW format, the SPDs
 are in the rows. Sorry. 

 The returned values, XYZ, are X,Y,Z in the columns of the matrix. Each
 row of energy has a corresponding XYZ value in the corresponding row of XYZ.
 The units of Y are candelas/meter-squared if energy is radiance and lux
 if energy is irradiance.

 Examples:
    wave = 400:10:700;
    energy = vcReadSpectra('crtSPD',wave)';
    displayXYZ = ieXYZFromEnergy(energy,wave)

    patchSize = 1;
    macbethChart = sceneCreate('macbeth',patchSize); 
    p = sceneGet(macbethChart,'photons'); wave = sceneGet(macbethChart,'wave'); e = Quanta2Energy(wave,p);
    XYZ = ieXYZFromEnergy(e,wave);  

 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