What's new

Math Help Needed!

Steve Mariotti

Kavapithecus Krunkarensis
Review Maestro
Looks like my wavelength value for the Noble sample is awfully low. 563? Based on the chart, it should be 570 or higher.

I'll have to look at my math again... something is still not quite 100%.
 
Last edited:

verticity

I'm interested in things
I think I figured out what is going on.

Latest results:


Loaded CSV File noble.csv
Observer: CIE_1931
Illuminant: D65
xyY: x = 0.3878, y = 0.4343

Loaded CSV File noble.csv
Observer: CIE_1931
Illuminant: E
xyY: x = 0.4112, y = 0.4338



Loaded CSV File two_day.csv
Observer: CIE_1931
Illuminant: D65
xyY: x = 0.4986, y = 0.4674

Loaded CSV File two_day.csv
Observer: CIE_1931
Illuminant: E
xyY: x = 0.5148, y = 0.4563



noble: x 0.4030, y 0.4252, domWL 574.7
two day: x 0.5133, y 0.4546, domWL 583.0
I monkeyed around a bit with the Sylvania program, and the spreadsheet. The spreadsheet's D65/2 degree numbers are close to mine and Steve's. The spreadsheet's number for E illumination is close to yours. So apparently your program is not using a D65 illuminant, but something like E, which is equivalent to emission. This makes sense because the program was made by a company that makes light bulbs..

Deleted User, can you plot these numbers with yours?
 

Steve Mariotti

Kavapithecus Krunkarensis
Review Maestro
Nice detective work, @verticity!

That indeed makes sense. All the pieces are falling into place! I have to admit, this has been a fun little project!
 

verticity

I'm interested in things
Speaking of Dom WL.. I was trying the Java applet on Lindbloom's site. (The "CIE Color Calculator") It's a little tricky to get it working, because unsigned Java applets are blocked by default (on my computer at least). To use it you need to go to Window's Control Panel, and open up "Java" to open the "Java Control Panel". Then select the security tab, and add Lindbloom's site to the Exception site list like so (click to enlarge):
java_control_panel.jpg

Then you can use the applet to get dominant wavelength from x,y for various illuminants; here's one example of what it looks like (click to enlarge):
lindbloom_noble_dom_wl_d65.jpg

And here is what I get plugging your x,y numbers into it for E and D65 illuminants, compared with your original number:
lindbloom_chart.jpg


So clearly the dom WL depends on the position of the illluminant--seemingly this dependence is more pronounced for color points that are closer to the white point (referring to your plots, the noble points are all closer the the white point--presumably because the total transmittance is higher than the two day points--so are less saturated (not sure if that's the right word..)
 

verticity

I'm interested in things
... Can you adjust your xy - domWL conversion to use Illuminant E?
My program already has that option. I'll link to the source code shortly.

However, I'm not sure it is the right thing to do. True, the spectrometer's light source is an emission source. However after you get the spectrum, the spectrometers light source is irrelevant, for the reasons you said: it is calibrated to be so. We are actually not concerned with the spectrometer, but with coming up with a dominant wavelength/color that corresponds most closely to what people will actually see when they look at a test tube of acetone solution. You are creating a colorimetric standard--so the dom WL/color should be informed by knowledge of human perception. I think D65 is actually a quite reasonable choice: regular outdoor daylight.
 

Steve Mariotti

Kavapithecus Krunkarensis
Review Maestro
Found my bug! Stupid cut and paste error here:

// Intersect [lastPoint, point] with [segStart, segEnd]
if (lineSegmentIntersection(
lastPoint.m_x, lastPoint.m_y,
point.m_x, point.m_x,
segStart.m_x, segStart.m_y,
segEnd.m_x, segEnd.m_y,
&pointOnLocus.m_x, &pointOnLocus.m_y))
{
dominantWavelength = wave;
}
I'm passing in the x coordinate twice, rather than the x and the y coordinate.

Now with the D65 white point and D65 illuminant I get:

Tudei:
Color Point: (0.4966, 0.4676)
WhitePt: (0.3127, 0.3291)
Locus Coord (0.5165, 0.4826)
DomWavelen: 582.70 nm

Noble:
Color Point: (0.3851, 0.4305)
WhitePt: (0.3127, 0.3291)
Locus Coord (0.4614, 0.5375)
DomWavelen: 572.80 nm

With the E whitepoint (1/3, 1/3) and E illuminant I get:

Tudei:
Color Point: (0.5129, 0.4567)
WhitePt: (0.3333, 0.3333)
Locus Coord (0.5304, 0.4687)
DomWavelen: 582.70 nm

Noble:
Color Point: (0.4085, 0.4308)
WhitePt: (0.3333, 0.3333)
Locus Coord (0.4781, 0.5209)
DomWavelen: 572.80 nm

What's interesing to me is that even though the color points are different between D65 and E, the dominant wavelengths I get are the same.

Does that jibe in your experience in color science, Deleted User?
 

verticity

I'm interested in things
Now with the D65 white point and D65 illuminant I get:

Tudei:
Color Point: (0.4966, 0.4676)
WhitePt: (0.3127, 0.3291)
Locus Coord (0.5165, 0.4826)
DomWavelen: 582.70 nm
Noble:
Color Point: (0.3851, 0.4305)
WhitePt: (0.3127, 0.3291)
Locus Coord (0.4614, 0.5375)
DomWavelen: 572.80 nm

With the E whitepoint (1/3, 1/3) and E illuminant I get:

Tudei:
Color Point: (0.5129, 0.4567)
WhitePt: (0.3333, 0.3333)
Locus Coord (0.5304, 0.4687)
DomWavelen: 582.70 nm
Noble:
Color Point: (0.4085, 0.4308)
WhitePt: (0.3333, 0.3333)
Locus Coord (0.4781, 0.5209)
DomWavelen: 572.80 nm

What's interesing to me is that even though the color points are different between D65 and E, the dominant wavelengths I get are the same.

Does that jibe in your experience in color science, Deleted User?
For your x,y points, Lindbloom's calculator gives:
D65:
Two-day: 580.6 nm
Noble: 572.5 nm
E:
Two-day: 582.8 nm
Noble: 574.9 nm
 

verticity

I'm interested in things
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.
 
Top