25 ms·
The Colors of Chemistry
- StefanKarpinski 12y agoEven if you don't follow the first half, it's worth skimming to get to the bottom where the computations predict the colors of chemical compounds with remarkable accuracy. The "Copper (II) aqua ion" one is the most impressive to me – the entire color spectrum is spot on.
- gipp 12y agoIt's not really "predicting" the colors, per se. The UV spectra being downloaded contain that information already. The code being demoed here is just a transformation of that data to "perceived" color. It's just a transformation between two equivalent representations, not "prediction" really. Still, Julia is neat though.
- acidflask 12y agoAgreed, not really a prediction, but rather a projection. Still, it surprises me that few people take the trouble to make the connection between the spectra and the perceived colors. Seems like photochemistry and colorimetry don't intersect as often as they ought to...
- jwmerrill 12y agoWhat's going on with Rhodamine B? Its color doesn't change as a function of concentration? Why does its transmittance data seem to bounce back and forth between 0 and 1?
- acidflask 12y agoThere's something odd about how my normalization heuristic behaves with this particular spectrum. I haven't yet looked into it.
- acidflask 12y agoAh here we go. The spectrum for Rhodamine B is noisy and it's throwing the normalization heuristic off. I've added a moving average filter and zeroed out some small noise in the >600 nm range and the colors make more sense now.
- gourneau 12y agoDang, I want those interactive plots with IPython notebooks
- heptal 12y agohttp://bokeh.pydata.org/ http://bokeh.pydata.org/
- throwwit 12y agoAre Google analytics usually in Julia notebooks?
- acidflask 12y agoNo, I put that in the first cell. You can take it out of the notebook if you want.
- deleted 12y ago[deleted]
- cpa 12y agoλ->planck(λ*nm,T=T)*m^3/Watt*cie_color_match(λ) This syntax made me cringe hard. Kids these days…
- acidflask 12y agoIs this so unreasonable? I needed to curry the function to sweep over the temperature T. And if you take out the units, it's simply pointwise multiplication of two functions.
- cpa 12y agoYes and no. The syntax x -> f(x) is borrowed from functional programming, which borrows it from λ-calculus. In λ-calculus, λx. f(x) is the function which maps x to f(x). So, λ -> f(λ) makes me cringe hard, because λ is a keyword! It's like trying to write in Python: def def(x): pass Weird, uh?
- deleted 12y ago[deleted]
- kimonos 12y agoMy Mom would love this! She's a Chemistry teacher. Would definitely share it with her..
- anarchoni 12y agoC.R.E.A.M. - CIE Rules Everything Around Me So many factors go into color matching and this is just the tip of the iceberg. Pigments vs dyes, solutions vs solid substrates, angles, light sources, observers...etc. Color is subjective, so creating an objective color-output that matches an average person's perceptual color vision is one hell of a fascinating, and expensive puzzle.