not yet..

This commit is contained in:
Yingjie Wang 2023-11-10 11:32:11 -05:00
parent c2228a8019
commit 1f56c087e3

View File

@ -499,11 +499,11 @@ def gamma_correct(c):
def vectorized_gamma_correct(array): def vectorized_gamma_correct(array):
return np.where(array <= 0.0031308, 12.92*array, 1.055*np.power(array, 1/2.4)-0.055) return np.where(array <= 0.0031308, 12.92*array, 1.055*np.power(array, 1/2.4)-0.055)
def wavelength2XYZ(wavelength, intensity): def wavelength2XYZ(wavelength):
X = np.interp(wavelength, data_wavelength, data_x, 0, 0) X = np.interp(wavelength, data_wavelength, data_x, 0, 0)
Y = np.interp(wavelength, data_wavelength, data_y, 0, 0) Y = np.interp(wavelength, data_wavelength, data_y, 0, 0)
Z = np.interp(wavelength, data_wavelength, data_z, 0, 0) Z = np.interp(wavelength, data_wavelength, data_z, 0, 0)
return intensity*np.array([X,Y,Z]) return np.array([X,Y,Z])
def spectral2XYZ(spectral): def spectral2XYZ(spectral):
X = np.dot(spectral, data_x) X = np.dot(spectral, data_x)