How can I perform complex Radiance calculations in Grasshopper that I used to do in the terminal?

Hello, ladtbug tools experts.

I would like to perform the two Radiance calculations below in Grasshopper, which I have previously done in a Mac terminal.

rcalc -o 'rsensor -h -rd 5000 -vp ${$1} ${$2} ${$3} -vd ${$4} ${$5} ${$6} -vu 1 0 0 SensorFile.dat .' points.txt | sh | rfluxmtx -c $rd -ab 6 -ad $ad -lw $lw - rfluxSky_MF6.rad -i oct/model.oct > matrix/Cdc.mtx
dctimestep matrix/Cdc.mtx skymtx.smx | rmtxop -fa -t -c .33333 .33333 .33333 - > solarIrradiance.txt

I believe I need to use GHPython because I don’t think the existing Ladybug Tools components can perform this calculation.
How should I describe it?
I have attached an incomplete .gh file so you can see what I intend to do.

The description about the command is below.

  1. Calculate the contribution within a specific field of view, as specified in “SensorFile.dat,” using rfluxmtx.
    (This command was adapted from the following site: sensors-and-workplane-points/5806/9)
  2. The sky matrix and the contributions are combined to output the solar radiation.

I apologize for my poor English.
Thanks in advance!

1 Like

Sorry, I forgot to attach the .gh file.
Please get it from the following link.

Yes. You can use GHPython to run custom commands like the ones above.

My question is why would you need to run these commands from inside Grasshopper in the first place?