def lms2rgb(lms_Nx3, conversionMatrix=None):
 lms_3xN = numpy.transpose(lms_Nx3)
 if (conversionMatrix is None):
  cones_to_rgb = numpy.asarray([[4.97068857, (-4.14354132), 0.17285275], [(-0.90913894), 2.15671326, (-0.24757432)], [(-0.03976551), (-0.14253782), 1.18230333]])
  logging.warning('This monitor has not been color-calibrated. Using default LMS conversion matrix.')
 else:
  cones_to_rgb = conversionMatrix
 rgb = numpy.dot(cones_to_rgb, lms_3xN)
 return numpy.transpose(rgb)

def lms2rgb ( lms_Nx3 , conversionMatrix = None ) : lms_3xN = numpy . transpose ( lms_Nx3 ) if ( conversionMatrix is None ) : cones_to_rgb = numpy . asarray ( [ [ 4.97068857 , ( - 4.14354132 ) , 0.17285275 ] , [ ( - 0.90913894 ) , 2.15671326 , ( - 0.24757432 ) ] , [ ( - 0.03976551 ) , ( - 0.14253782 ) , 1.18230333 ] ] ) logging . warning ( 'This monitor has not been color-calibrated. Using default LMS conversion matrix.' ) else : cones_to_rgb = conversionMatrix rgb = numpy . dot ( cones_to_rgb , lms_3xN ) return numpy . transpose ( rgb )
convert from cone space to rgb .