示例#1
0
文件: rgb.py 项目: PearCoding/PearRay
def specToXYZ(spec_data):    
    return [mathutils.trapz(spec_data * PHO_X, spectral.WAVELENGTH_STEP*1e-9),
            mathutils.trapz(spec_data * PHO_Y, spectral.WAVELENGTH_STEP*1e-9),
            mathutils.trapz(spec_data * PHO_Z, spectral.WAVELENGTH_STEP*1e-9)]
示例#2
0
 def energy(self):#trapz
     return mathutils.trapz(self.data, WAVELENGTH_STEP*1e-9)
示例#3
0
文件: rgb.py 项目: PearCoding/PearRay
def specToLum_Sco(spec_data):
    y_data = spec_data * SCO_Y      
    return mathutils.trapz(y_data, spectral.WAVELENGTH_STEP*1e-9) * SCO_K