Genskyvec error revisited

Well, it looks like WindowsXP isn't the only problem. While genskyvec.pl
works fine with piped input from the command line on Windows7, when it's
called from within my Ruby script, I get the same error that Ryan Southall
reported with his Python script
(http://www.radiance-online.org/pipermail/radiance-general/2012-July/008758
.html).

Greg, I tried your suggestion again as well:

I can't test it for you, but I suspect the line:
} elsif (/\sskyfunc\s*$/) {
is the problem. Try removing the final '\s*' to make it:
} elsif (/\sskyfunc$/) {

...but no luck.

Ryan, have you made any more progress with this issue? Anyone else?
Bueller?

Rob Guglielmetti IESNA, LEED AP
Commercial Buildings Research Group
National Renewable Energy Laboratory
15013 Denver West Parkway MS:RSF202
Golden, CO 80401
303.275.4319
[email protected]

Hi Rob

Greg, I tried your suggestion again as well:

>I can't test it for you, but I suspect the line:
> } elsif (/\sskyfunc\s*$/) {
>is the problem. Try removing the final '\s*' to make it:
> } elsif (/\sskyfunc$/) {

...but no luck.

Have you tried to print out the lines that are actually processed by
genskyvec when it is running? The "validation" in the above code is very
basic and will also fail if genskyvec does not receive any input at all.

Ryan, have you made any more progress with this issue? Anyone else?
Bueller?

Here is a link to a MS KB that affects STDIN of scripts (it's very old,
though):

http://support.microsoft.com/kb/321788

I don't know if genskyvec can read from a file but you could add this
feature if necessary and use a temporary file to store your sky
description. Then use genskyvec in a second subprocess to read and process
the file.

Thomas

···

On Wed, Jul 25, 2012 at 8:01 PM, Guglielmetti, Robert < [email protected]> wrote:

Howdy Thomas…

···

On 7/26/12 7:18 AM, "Thomas Bleicher" <[email protected]<mailto:[email protected]>> wrote:

Have you tried to print out the lines that are actually processed by genskyvec when it is running? The "validation" in the above code is very basic and will also fail if genskyvec does not receive any input at all.

Yup. Genskyvec.pl is indeed not getting anything when the full command chain is called. For example, this (Ruby) code:

tempIO = IO.popen("gendaylit -ang #{tsSolarAlt} #{tsSolarAzi} -L #{tsDirectNormIllum} #{tsDiffuseHorIllum}")
illumTemp = tempIO.readlines.to_s
tempIO.close
puts "illumTemp: #{illumTemp}"

…at runtime, prints the gendaylit output. But this code:

tempIO = IO.popen("gendaylit -ang #{tsSolarAlt} #{tsSolarAzi} -L #{tsDirectNormIllum} #{tsDiffuseHorIllum} | genskyvec#{perlExtension} -m 1 | dctimestep ./output/dc/#{space_name}/maps/#{space_name}_map.dmx | rcalc -e #{vLambda}")
illumTemp = tempIO.readlines.to_s
tempIO.close
puts "illumTemp: #{illumTemp}"

…at runtime, prints nothing. I had exactly the same thought of modifying genskyvec.pl to accept a file as input but I'd like to avoid the extra file I/O. I hope to have time to look at this some more today. Thanks for the input!

- Rob