rcollate troubles in Five-Phase CFS tutorial

All,

I’m having some issues running through Andy’s Five-Phase CFS tutorial, specifically the last stages of combining all of the matrices into readable illuminance data. I’m using the bash script that was included in the downloadable files. I can get through section 6.7 without any errors (so it seems). I start to get errors in 6.8 Putting it all together.

The epw2wea and gendaymtx seem to work just fine. I get errors of “Incomplete record / unexpected EOF” when running the dctimestep commands for the base 3-phase and direct 3-phase pieces. I also receive a “Bad transpose specification – check dimension(s)” error on output of the direct sun dctimestep. The commands I’ve executed are as follows:

time dctimestep -n 8760 -if matrices/viewmatrix.vmx bsdf/fullwindow.xml \
      matrices/daylightmatrix.dmx matrices/OakLand.smx | \
      rcollate -h -oc 1 > i_3ph.txt
time dctimestep -n 8760 -if matrices/viewmatrix_direct.vmx bsdf/fullwindow.xml \
      matrices/daylightmatrix_direct.dmx matrices/OakLand_direct.smx | \
      rcollate -h -oc 1 > i_ds3ph.txt
time dctimestep -n 8760 -if matrices/directsun.dsmx matrices/OakLand_direct_m6.smx | \
      rcollate -h -oc 1 > i_ds5ph.txt

Has anyone else run into these errors? I tried to separate dctimestep from piping directly into rcollate to see if I could track down the problem. Seems as if dctimestep creates a file the has a header, then 6 rows of data (corresponding to photocells.pts), with each row containing RGB triplets in floating point format. Counting up columns, looks like there are 8760 triplets. This is what I would expect.
I then would expect rcollate to transform the matrix and strip off the header (-h). I was expecting the output matrix to be 8760 rows by 6 column, I’ve tried playing around w/ various –oc –ic –or –ir options in multiple combinations, but keep getting errors.

Any help would be greatly appreciated. I feel like I’ve managed to understand things to this point and am now getting hung up on some minutia…(such is life w/ Radiance)!

Chris

Chris Coulter
Senior Lighting Designer
Buro Happold Consulting Engineers
100 Broadway, 23rd Floor
New York, NY 10005
Tel: 212.334.2025
Direct: 212.616.0254
Email: [email protected]
Website: www.burohappold.com

This transmission is confidential and intended solely for the person or organization to whom it is correctly addressed. If you are not the intended recipient of this transmission, you should not take any action in reliance on it. Further, this transmission may contain confidential design and other information owned by Buro Happold LtdConsulting Engineers, P.C. (“Buro Happold”). You should not copy, distribute, use, offer for sale or hire such information or in any way infringe the design and intellectual property rights of Buro Happold Ltd. It is intended that communication by email from Buro Happold .Ltd or its employees is limited to communications connected to the services provided by Buro Happold Ltd. Buro Happold Ltd accepts no liability for any communications not connected to the services it provides. Computer viruses may be transmitted or downloaded onto your computer system via email communication. It is the recipient’s responsibility to take any action necessary to prevent computer viruses being transmitted in this way. Accordingly, Buro Happold Ltd disclaims all responsibility which arises directly or indirectly from such transmission of computer viruses. Buro Happold Consulting Engineers, P.C.Ltd.. Registered in England: 2049511 New York State, USA. Registered Office: 100 Broadway 23rd Floor, New York, NY 10005. If you receive this message in error, please notify the sender by return e-mail immediately and delete this message, any attachments and all copies from your system.

Sorry -- this is probably my fault. To make dctimestep work for multiplying matrices together, I altered it to output a header if and only if there was more than one column being produced. This is pretty non-standard behavior for a Radiance tool, and wasn't documented by Andy because he wrote the scripts before the change.

The -h option of rcollate means don't expect a header on input AND don't produce one on output. To get what you want, you need to take away the -h option to rcollate and/or insert "getinfo -" somewhere to strip the header. This should work for your last command:

dctimestep -n 8760 -if matrices/directsun.dsmx matrices/OakLand_direct_m6.smx | \
      rcollate -oc 1 | getinfo - > i_ds5ph.txt

Or this:

dctimestep -n 8760 -if matrices/directsun.dsmx matrices/OakLand_direct_m6.smx | \
     > getinfo - | rcollate -h -oc 1 > i_ds5ph.txt

If you are OK with having a header in the output, use the first command above without the getinfo call. Does this make sense?

-Greg

···

From: Chris Coulter <[email protected]>
Subject: [Radiance-general] rcollate troubles in Five-Phase CFS tutorial
Date: April 15, 2014 9:16:25 PM PDT

All,

I’m having some issues running through Andy’s Five-Phase CFS tutorial, specifically the last stages of combining all of the matrices into readable illuminance data. I’m using the bash script that was included in the downloadable files. I can get through section 6.7 without any errors (so it seems). I start to get errors in 6.8 Putting it all together.

The epw2wea and gendaymtx seem to work just fine. I get errors of “Incomplete record / unexpected EOF” when running the dctimestep commands for the base 3-phase and direct 3-phase pieces. I also receive a “Bad transpose specification – check dimension(s)” error on output of the direct sun dctimestep. The commands I’ve executed are as follows:

time dctimestep -n 8760 -if matrices/viewmatrix.vmx bsdf/fullwindow.xml \
      matrices/daylightmatrix.dmx matrices/OakLand.smx | \
      rcollate -h -oc 1 > i_3ph.txt
time dctimestep -n 8760 -if matrices/viewmatrix_direct.vmx bsdf/fullwindow.xml \
      matrices/daylightmatrix_direct.dmx matrices/OakLand_direct.smx | \
      rcollate -h -oc 1 > i_ds3ph.txt
time dctimestep -n 8760 -if matrices/directsun.dsmx matrices/OakLand_direct_m6.smx | \
      rcollate -h -oc 1 > i_ds5ph.txt

Has anyone else run into these errors? I tried to separate dctimestep from piping directly into rcollate to see if I could track down the problem. Seems as if dctimestep creates a file the has a header, then 6 rows of data (corresponding to photocells.pts), with each row containing RGB triplets in floating point format. Counting up columns, looks like there are 8760 triplets. This is what I would expect.
I then would expect rcollate to transform the matrix and strip off the header (-h). I was expecting the output matrix to be 8760 rows by 6 column, I’ve tried playing around w/ various –oc –ic –or –ir options in multiple combinations, but keep getting errors.

Any help would be greatly appreciated. I feel like I’ve managed to understand things to this point and am now getting hung up on some minutia…(such is life w/ Radiance)!

Chris

Greg-
Thanks for the quick response. Yes, it all makes sense and works. I was expecting -h to suppress the header rather than not to expect it.

Rcollate is still a bit confusing (especially at this lovely hour on the east coast). Is there a quick way I can take the single column of 52560 values (8760hrs * 6pts) and place them in a matrix/array that is 8760 hours long/rows and the data points read across the columns? This would help me import the illuminance profiles into Excel templates I had already created using the 2-phase method. I'm sure I can write a script to clip the files into 8760 rows each then rlam them back together, but if I can just manage it on output from rcollate that would be better/cleaner. I see the note in the man page about it being inflexible - maybe this is the only behavior.

Thanks again!
Chris

···

From: Greg Ward [mailto:[email protected]]
Sent: Wednesday, April 16, 2014 1:15 AM
To: Radiance general discussion
Subject: Re: [Radiance-general] rcollate troubles in Five-Phase CFS tutorial

Sorry -- this is probably my fault. To make dctimestep work for multiplying matrices together, I altered it to output a header if and only if there was more than one column being produced. This is pretty non-standard behavior for a Radiance tool, and wasn't documented by Andy because he wrote the scripts before the change.

The -h option of rcollate means don't expect a header on input AND don't produce one on output. To get what you want, you need to take away the -h option to rcollate and/or insert "getinfo -" somewhere to strip the header. This should work for your last command:

dctimestep -n 8760 -if matrices/directsun.dsmx matrices/OakLand_direct_m6.smx | \
      rcollate -oc 1 | getinfo - > i_ds5ph.txt

Or this:

dctimestep -n 8760 -if matrices/directsun.dsmx matrices/OakLand_direct_m6.smx | \
     > getinfo - | rcollate -h -oc 1 > i_ds5ph.txt

If you are OK with having a header in the output, use the first command above without the getinfo call. Does this make sense?

-Greg

From: Chris Coulter <[email protected]<mailto:[email protected]>>

Subject: [Radiance-general] rcollate troubles in Five-Phase CFS tutorial

Date: April 15, 2014 9:16:25 PM PDT

All,

I'm having some issues running through Andy's Five-Phase CFS tutorial, specifically the last stages of combining all of the matrices into readable illuminance data. I'm using the bash script that was included in the downloadable files. I can get through section 6.7 without any errors (so it seems). I start to get errors in 6.8 Putting it all together.

The epw2wea and gendaymtx seem to work just fine. I get errors of "Incomplete record / unexpected EOF" when running the dctimestep commands for the base 3-phase and direct 3-phase pieces. I also receive a "Bad transpose specification - check dimension(s)" error on output of the direct sun dctimestep. The commands I've executed are as follows:

time dctimestep -n 8760 -if matrices/viewmatrix.vmx bsdf/fullwindow.xml \
      matrices/daylightmatrix.dmx matrices/OakLand.smx | \
      rcollate -h -oc 1 > i_3ph.txt
time dctimestep -n 8760 -if matrices/viewmatrix_direct.vmx bsdf/fullwindow.xml \
      matrices/daylightmatrix_direct.dmx matrices/OakLand_direct.smx | \
      rcollate -h -oc 1 > i_ds3ph.txt
time dctimestep -n 8760 -if matrices/directsun.dsmx matrices/OakLand_direct_m6.smx | \
      rcollate -h -oc 1 > i_ds5ph.txt

Has anyone else run into these errors? I tried to separate dctimestep from piping directly into rcollate to see if I could track down the problem. Seems as if dctimestep creates a file the has a header, then 6 rows of data (corresponding to photocells.pts), with each row containing RGB triplets in floating point format. Counting up columns, looks like there are 8760 triplets. This is what I would expect.
I then would expect rcollate to transform the matrix and strip off the header (-h). I was expecting the output matrix to be 8760 rows by 6 column, I've tried playing around w/ various -oc -ic -or -ir options in multiple combinations, but keep getting errors.

Any help would be greatly appreciated. I feel like I've managed to understand things to this point and am now getting hung up on some minutia...(such is life w/ Radiance)!

Chris

Hi Chris,

I think the answer to your question is 'yes,' but you probably want something more specific. Unfortunately, I don't understand your format well enough from your description, so it's difficult for me to instruct you. If your 6 points each have 3 values for RGB and you just want to arrange them into rows that look like this (ignore labels before the colon):

hour1: R1 G1 B1 R2 G2 B2 R3 G3 B3 R4 G4 B4 R5 G5 B5 R6 G6 B6
hour2: R1 G1 B1 R2 G2 B2 R3 G3 B3 R4 G4 B4 R5 G5 B5 R6 G6 B6
....
hour8760: R1 G1 B1 R2 G2 B2 R3 G3 B3 R4 G4 B4 R5 G5 B5 R6 G6 B6

This can be achieved with a simple rcollate command, here assuming no header:

  rcollate -h -oc 6 input.txt > output.txt

If instead, your input is ordered with 8760 RGB values for sensor 1, followed by 8760 RGB values for sensor 2, etc., you'll need to transpose using:

  rcollate -h -ic 8760 -ir 6 -t input.txt > output.txt

I hope this is clear enough, but I realize it's confusing.

-Greg

···

From: Chris Coulter <[email protected]>
Subject: Re: [Radiance-general] rcollate troubles in Five-Phase CFS tutorial
Date: April 15, 2014 10:55:35 PM PDT

Greg-
Thanks for the quick response. Yes, it all makes sense and works. I was expecting –h to suppress the header rather than not to expect it.

Rcollate is still a bit confusing (especially at this lovely hour on the east coast). Is there a quick way I can take the single column of 52560 values (8760hrs * 6pts) and place them in a matrix/array that is 8760 hours long/rows and the data points read across the columns? This would help me import the illuminance profiles into Excel templates I had already created using the 2-phase method. I’m sure I can write a script to clip the files into 8760 rows each then rlam them back together, but if I can just manage it on output from rcollate that would be better/cleaner. I see the note in the man page about it being inflexible – maybe this is the only behavior.

Thanks again!
Chris