[Radiance-general] Bash problems

Dan Fitzpatrick danf at eb7.co.uk
Wed Jul 22 11:00:50 PDT 2009


Thanks for the speedy reply Lars.  That's a tidy way of doing it but I still need to figure where my original expression is wrong as I also need to run some further expressions to the file if the result is true.  Looking a bit more closely at the result it appears the expression creates a tab and extra line to the value...I wonder if this is why the script thinks the expression is not an integer?!



-----Original Message-----
From: radiance-general-bounces at radiance-online.org [mailto:radiance-general-bounces at radiance-online.org] On Behalf Of Lars O. Grobe
Sent: 22 July 2009 18:47
To: Radiance general discussion
Subject: Re: [Radiance-general] Bash problems

Hi Dan,

it is easier then that. You can use the special variable cond in rcalc to decide whether any output is to be generated or not.

pextrem -o 9.pic | rcalc -e 'illummax=($3*0.265+$4*0.670+$5*0.065)*179'
-e 'cond=if(illummax-15000,1,-1)' -e '$1=illummax' | total -u > 9.dat

does the job (ok, you will get an empty file 9.dat if the illuminance value is below 15000).

Cheers, Lars.



More information about the Radiance-general mailing list