def makeLMS2RGB(nm, powerRGB):
 interpolateCones = interpolate.interp1d(wavelength_5nm, cones_SmithPokorny)
 coneSens = interpolateCones(nm)
 rgb_to_cones = numpy.dot(coneSens, numpy.transpose(powerRGB))
 cones_to_rgb = numpy.linalg.inv(rgb_to_cones)
 return cones_to_rgb

def makeLMS2RGB ( nm , powerRGB ) : interpolateCones = interpolate . interp1d ( wavelength_5nm , cones_SmithPokorny ) coneSens = interpolateCones ( nm ) rgb_to_cones = numpy . dot ( coneSens , numpy . transpose ( powerRGB ) ) cones_to_rgb = numpy . linalg . inv ( rgb_to_cones ) return cones_to_rgb
creates a 3x3 lms->rgb conversion matrix from the spectral input powers .