[Radiance-general] calculating number of daylight hours

Chris Coulter Chris.Coulter at smithgroupjjr.com
Wed Dec 28 09:35:24 PST 2011


Happy holidays list!

I am trying to calculate the number of daylight-hours falling on a surface from a series of images in a batch file. I have an image created using -ab 0 and want to convert it into an image that shows a value of 1 for areas receiving direct sun or value of 0 for areas that do not.
I feel like pvalue is what I need to do this. I am following this thread with limited success (http://www.radiance-online.org/pipermail/radiance-general/2009-January/005723.html). When I try to modify for my task, I am having trouble getting the desired result.

pvalue -d -h -H input.pic | rcalc -e '$1=if(179*$1-100,1,0)'  gives an expected result of either a 0 or 1 depending on if the value is above or below the desired threshold.
If I then pipe the result back into pvalue I get a "pvalue: read error" and no image:
pvalue -d -h -H input.pic | rcalc -e '$1=if(179*$1-100,1,0)'  | pvalue -r -H -h -d -y 693 +x 1200 > output.pic
Do I need to format the input values differently?

I was also able to somewhat successfully use pcomb to strip the original image into a black and white image using the same "if" condition on lo=, but there was no value associated with the pixels.
Ultimately, I would like to take a series of images and pcomb them in order to make a falsecolor display of sunlight hours in a space/on a surface. I realize it may be easier to calculate with rtrace and then display my results that way, but this was my first thought.

Thanks in advance for any assistance. I'm open to any suggestions you might have.

Chris
Chris M. Coulter, LC, IES, LEED AP BD+C
Associate
Lighting Designer
.........................................................................................................
SmithGroupJJR
500 Griswold, Suite 1700
Detroit, MI 48226

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20111228/e69d5146/attachment.html>


More information about the Radiance-general mailing list