DKL to RGB - trouble with conversionMatrix

Hello there!

I need to use the DKL color space.

My monitor is gamma-calibrated and I do have a spectrophotometer, although not the PR650.

I am trying to create a conversionMatrix with the function: makeDKL2RGB(nm, powerRGB)
However, I need a clarification on the input format. What should be the format of nm and powerRGB??
My measurements are the following:
nm = 580
powerR = 0.157 uM/cm2/nm
powerG = 0.229 uM/cm2/nm
powerB = 0.005 uM/cm2/nm

But when I try to use them e.g.
nm = np.asarray([580])
powerRGB = np.asarray([0.157, 0.229, 0.005])


nm = np.asarray([580])
powerRGB = np.asarray([[0.157],[0.229],[0.005]])

I either get a ValueError (ValueError: shapes (3,1) and (3,) not aligned: 1 (dim 1) != 3 (dim 0))

or a “LinAlgError: singular matrix”.

Can somebody help?

Thanks a lot, in advance.

1 Like

I am dealing with a similar problem currently and looked at the source code a bit. This bit is responsible for parsing the outputs of the PR650 and formatting them accordingly into the nm and powerRGB variables.

Perhaps you can learn something from it and apply it to your own data:


Checking in to see if you ever had your issue resolved. I am trying to convert DKL to RBG to create isoluminant stimuli but am unsure what I should be measuring with the spectrophotometer (Minolta CS-200) to obtain values for powerRBG inputs. Can you advise? Thank you in advance!