-
Notifications
You must be signed in to change notification settings - Fork 0
alphaparrot/GCMscope
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Contains 3 routines: makexyz, xyz2rgb, and spec2rgb. The latter is a wrapper for the first two. You can pass an arbitrary spectrum (specify what the wavelengths are) with wavelengths in either nanometers or meters (it'll figure it out), and it will convolve the spectrum by the CIE color-matching functions to first produce the xyY color coordinates, and then can convert those to rgb coordinates for outputting to a display. The color-matching functions are described discretely in cmf.csv (drop in your own if you want) and are linearly interpolated to the wavelengths of the input spectrum. You can also drop in your own xyz-rgb conversion matrix; it's described in the python source. orthoprojection.py is a simple routine for computing the orthographic projection of a latitude-longitude grid where each cell is a color computed by colormatch. Together with colormatch.py, you can take a simulated reflected light spectrum for each grid cell in a GCM, compute its color, and then compute the orthographic projection to create a photo-realistic image of your GCM output. Note that you'll have to simulate the reflected light spectrum yourself with another package.
About
Take a spectrum and convert it into an rgb color. Includes an orthographic projection routine for use with GCM output.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published