[Radiance-general] ies2rad Question - specifying color temperature

Greg Ward gregoryjward at gmail.com
Mon Jun 26 16:04:32 PDT 2017


Hi Kera,

Lamp color settings in ies2rad are admittedly odd.  What you probably want to use is something like:

	ies2rad -df -m 0.88 -t default -c my_red my_green my_blue

The red, green and blue values will be multiplied by the 0.88 factor, so I guess you want the RGB to normalize to 1.0.  To get these from CIE (x,y) chromaticities, you can use rcalc like so:

	rcalc -n -e "ix=...;iy=...;" -f xyz_rgb.cal  -e "Xi=ix/iy;Yi=1;Zi=(1-ix-iy)/iy" -e "$1=R(Xi,Yi,Zi);$2=G(Xi,Yi,Zi);$3=B(Xi,Yi,Zi)"

The file "xyz_rgb.cal" is in the standard distribution in src/cal/cal/, along with other files like it.  Put your desired (x,y) coordinates in the first setting, e.g., -e "ix=0.3153;iy=0.3417".  (On Unix, replace the double-quotes with single-quotes above.)

Alternatively, you can edit the "lamp.tab" file or make your own, adding a line near the top for your particular source:

/my special LED/		0.3153 0.3417 0.88

To use this in your command, you need to enclose the argument in quotes, so it doesn't think the arguments after the first one are input files, e.g.:

	ies2rad -f my_lamps.tab -t "my special LED" ...

Although I caution strongly against it for LED sources, you can also compute CIE (x,y) from black body temp using:

	rcalc -f blackbody.cal -e T=2700 -e "$1=cct_x(T);$2=cct_y(T)"

The reason I don't recommend this for non-tungsten source is that they almost never match a black body spectrum, and their actual chromaticity will therefore disagree with their claimed CCT.

Cheers,
-Greg

> From: Kera Lagios <keralagios at gmail.com>
> Date: June 26, 2017 3:02:21 PM PDT
> 
> Hi Everyone,
> 
> When using ies2rad, I am trying to set the color temperature of a various LED light sources to a specific color temperature that I want (e.g. 2700k or 2400k...). 
> 
> Background:
> According to the ies2rad man page, there are a few variables that govern this:
> -f lampdat
> -t lamp
> -c red grn blu
> -u lamp
> 
> The man page refers to the lamp.tab look up table which lists items in the following format:
> #
> /deluxe warm white/			.440 .403 .85
> /warm white deluxe/			(deluxe warm white)
> /deluxe cool white/			.376 .368 .85
> etc.
> 
> If I am looking to set my own x y chromaticity, rather than use whatever is in the .ies file header, which option should I use? 
> 
> When I try to use the "-u" option, which allows you to set the default lamp color according to the entry for lamp in the lookup table (lamp.tab), I have tried including the lamp lookup term as both: -u deluxe warm white and -u /deluxe warm white/ in the ies2rad command but I get the following errors:
> When I run the command with simple variables,  e.g.:
> ies2rad -df -m 0.88 -o CAT CL_TokistarG14Clear_VI-EX_2400K_G14-C.ies
> 
> it runs fine. 
> 
> I'm not sure how to use the -u (or -t, or -f) in conjunction with the lamp.tab look up table to specify my own color temperature.  The only way I have had success in doing this is to convert a particular color temperature (e.g. 2400k) to R, G, B values and then use the -c term followed by the converted RGB values.
> 
> Thank you!
> Kera
> ________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20170626/2d207075/attachment-0001.html>


More information about the Radiance-general mailing list