0

I'm trying to create a script taking my experimental values of measured radiance and turn it into xyz and rgb colour values. I import table with colour matching functions from here -http://cvrl.ucl.ac.uk/cmfs.htm
But I'm running into a trouble, because the step of my measured data goes like this: 400nm, 403.535nm, 407.071nm, 410.606nm, etc and I don't know how to get it to match the one from colour matching functions to get this code to work:

Calc[radiance_] :=
Module[
{P = radiance},
X = Δλ*Total[wx*P];
Y = Δλ*Total[wy*P];
Z = Δλ*Total[wz*P];

x = X/(X + Y + Z);
y = Y/(X + Y + Z);
z = Z/(X + Y + Z); Return[XYZColor[x, y, z]];

]
Henrik Schumacher
  • 106,770
  • 7
  • 179
  • 309
  • 1
    Possible duplicate: https://mathematica.stackexchange.com/q/11480/12 (not that VisibleSpectrum has been fixed since then) – Szabolcs Apr 12 '19 at 12:55
  • Doesn't VisibleSpectrum calculate from single number only? I have a whole array of radiance values with corresponding wavelegths – QookieCan Apr 12 '19 at 13:18

0 Answers0