This should work great. Thanks for the quick reply!
[mailto:email@example.com] On Behalf Of Andrew
Sent: Wednesday, March 10, 2010 11:53 AM
To: Radiance general discussion
Subject: Re: [Radiance-general] calculating percentages of a given value in
a .dat / .ok file
you can use rtrace's -f option to change the output format from floating
point to ascii. (-faa)
The conversion from RGB irradiance to illuminance is:
179 * ( 0.265*R + 0.670*G + 0.065*B )
so you can use rcalc to calculate the percentage you desire like so:
rtrace ... | rcalc -e 'ill=($1*0.265+$2*0.670+$3*0.065)*179' -e
On Wed, Mar 10, 2010 at 10:22 AM, Nick Hubof <firstname.lastname@example.org> wrote:
I am trying to do a similar process as below email, but with an illuminance
I would like to know the % above a lighting threshold of 300lux in an
illumination grid output from radiance.
My office uses Ecotect to build daylight models with 2d analysis grids
(.pts). After running radiance the analysis grid is populated into a .dat
file that is renamed in the Ecotect Batch to a .ok file.
The .ok file consists of illumination data by point.
So when I open the .ok file in a text editor the values are in exponential
form, ie.. (1.501146e+000 1.570207e+000 9.277438e-001).
When viewed in the Ecotect grid this value is 270.316 lux.
Is there a way to have rtrace give me that percentage while the batch is
running or at least convert the data from exponential form to 'real' values?
Please let me know what to add to the batch, I assume it will be at the
rtrace section or after in the batch:
rtrace .rendering settings. gridtest.oct < gridtest.pts > gridtest.dat
@RENAME gridtest3.dat gridtest3.ok
From Greg Ward (Mon Oct 20 10:12:17 PDT 2008)_
And here is one of the many possible standard Radiance tools ways:
pvalue -h -H -o -b -df input.pic | rcalc -if -of -e '$1=1;$2=if(179*
$1-THRESHOLD,1,0)' | total -if2
You need to set THRESHOLD to the desired luminance value (in cd/
m^2). This will give you two numbers, the ratio of which is the
percentage you seek. If you want to do it all on the command line,
you can add:
> rcalc -e '$1=100*$2/$1'
to the end of the pipe.
From: "Marija Velickovic" <maricanis at gmail.com
Date: October 20, 2008 3:42:28 AM PDT
I suppose you can use some of standard Radiance tools for that, but
here is another way we use.
In Raddisplay http://deluminaelab.com/en/raddisplay_details.html
program you can create falsecolor image from your original radiance
image. If you define false color palette with 2 colors - one has
value 0 and another value you want to use as a threshold, and open
Statistiques dialog, you'll have percent for each color in the
tablle. You can also define the palette with more colors, for
various threshold values.
Hope this helps,
2008/10/20 Galen Burrell <galenburrell at yahoo.com
I have a radiance .pic with lux values calculated using rpict -i.
Is there a way to calculate the percentage of the pixels that are
at or above a specified value?
Radiance-general mailing list