Okey dokey, apparently the world has ended, because I got my dom WL code working:
Noble
09/28/2015 00:04:29
Loaded CSV File noble.csv
Observer: CIE_1931
Illuminant: E
XYZ: X = 0.8071, Y = 0.8515, Z = 0.3043
xyY: x = 0.4112, y = 0.4338
White point: x = 0.333333, y = 0.333333
... [blah blah debugging output]
Dominant wavelength: 574.939926361392 nm
(I know tha't way more digits than you need...)
Pretty close to Garry's and Lindbloom's value of 574.7; however my xy(Y) is different (Garry's xy=[0.4030, 0.4252]). That difference is because of...something...I'm sure I had a good reason.
Two-Day:
09/28/2015 00:24:06
Loaded CSV File two_day.csv
Observer: CIE_1931
Illuminant: E
XYZ: X = 0.5634, Y = 0.4994, Z = 0.0316
xyY: x = 0.5148, y = 0.4563
White point: x = 0.333333, y = 0.333333
...
Dominant wavelength: 582.985634567303 nm
Deleted User had 583.0, which is what mine would be rounded up.
Method:
- Ingest massive quantities of Pouni Ono
- Shift chromaticity curve so that the white point is the origin.
- Convert the shifted chromaticity curve to polar coordinates
- Convert the experimental xy(Y) point to the same shifted polar coordinates
- Step up the angle until it is between two angles of the chroma curve
- Linear interpolation between the 2 points found that way
Source is up. I'll get an executable release out tomorrow. Blerg.