rsensor and rtcontrib

Hi Radiance-gurus!

I am trying to simulate a 'realistic' control of artificial lights. What you
traditionally would do is to control the lights based on illuminance levels
at specified points on the working plane. But in reality you would have a
sensor placed somewhere in the ceiling looking downwards or looking towards
the window. So, in stead of having the sensor points on the working plane I
would like to use the illuminance reading from my photocell placed e.g. on
the ceiling.

I have two questions, one considering the rsensor program and one
considering how to combine the rsensor output with rtcontrib.

1)
What I get out of rsensor can be illuminance readings for the specified
photocell?
The following command would generate the illuminance-level on the sensor,
right?

rsensor -ab XX -i [sensor view] sensor_file scene.oct > illsensor.dat

2)

From Axel Jacobs tutorial on rtcontrib I can see how I can obtain

illuminance readings from photocells defined as points - but how should I do
it if I am not interested in the point illuminance reading, but interested
in the illuminance level falling onto the sensor that doesn't see an
hemisphere?
Can I somehow replace the
$ cat workingplane_photocell.pts | rtcontrib .........

with
$ cat [sensor view] sensor_file....| rtcontrib...??

Hope my questions make sense!

Best,
Anne

Hi Anne!

illuminance readings from photocells defined as points - but how should
I do it if I am not interested in the point illuminance reading, but
interested in the illuminance level falling onto the sensor that doesn't
see an hemisphere?

Besides all the handy tools to support such modeling tasks, the most generic approach would be to render an image of what the sensor sees, and integrate the pixel values - if possible weighted with the angular response of the sensor. That way you can really work out the signal the sensor should give, and you can use the image both to understand why you get an observed reading and to debug. Provided of course that you know the angular sensitivity and the exact field of view (which could be determined in lab if necessary).

Cheers, Lars.

Hi Anne, Lars, everyone,

Fun topic! Replies within...

1)
What I get out of rsensor can be illuminance readings for the specified
photocell?
The following command would generate the illuminance-level on the sensor,
right?

rsensor -ab XX -i [sensor view] sensor_file scene.oct > illsensor.dat

Actually, rsensor computes photosensor response on the sensor -- which WOULD
be illuminance assuming the sensor's response was a perfect cosine one, but
the final output of rsensor ultimately is photosensor response. So your
command above would send the sensor response to STDOUT.

2)
From Axel Jacobs tutorial on rtcontrib I can see how I can obtain illuminance
readings from photocells defined as points - but how should I do it if I am
not interested in the point illuminance reading, but interested in the
illuminance level falling onto the sensor that doesn't see an hemisphere?
Can I somehow replace the
$ cat workingplane_photocell.pts | rtcontrib .........

with
$ cat [sensor view] sensor_file....| rtcontrib...??

Lars proposes an image based approach to evaluating what the sensor "sees"
and integrating a weighted response. This in effect is what psens (Chas
Ehrlich's project) does, on a single image. This is the tool Zack Rogers
used in SPOT's initial versions, and it was SPOT that led to the development
of rsensor in the first place. What you are trying to do above is to apply
the daylight coefficient approach to deriving the photosensor response, and
I think it's no secret to anyone watching this mailing list over the last
year or so that this is a subject of great interest to us all and some of us
are working on this to some degree. The reason for the interest is that with
daylight coefficients, we can do annual simulations with hourly resolution
(and even incorporate occupant response (blinds, etc) and complex
fenestration systems), in a reasonable timeframe.

The promise here is being able to leverage new tools in the Radiance toolkit
to not only calculate annual daylight availability and quality metrics, but
to carry that capability through to the ever-crucial follow-through on the
electric lighting side -- the daylight-responsive lighting control response
-- and to study this at an annual/hourly resolution. This would allow us to
inform whole building energy simulation tools and really start to understand
the energy impacts of daylighting in a holistic way.

We at last have tools to get us partway there. These would be rtcontrib,
genskyvec, and dctimestep. With these we can compute DCs for task plane
illuminance, but also -- critically -- sensor points on the ceiling or some
arbitrary location/aiming. But we still want to be able to weight the
contributions by the photosensor response. For this, I could imagine a cal
file inserts itself into this workflow, maybe dctimestep accepts an
additional argument for a cal file and there's a "signal" option for passing
all this to rsensor. (?)

Kung Fu Feature Request:
OR, as we gather up all the DCs and weight them by the sky luminance, could
we ALSO weight them by photosensor response, BEFORE summing and computing a
signal? My sense is that this is not possible but I don't fully understand
all the ray accounting that is possible in rtcontrib. Perhaps this could be
a new feature? (???) (!!!)

We are working on rtcontrib-based tools here at NREL and are basically at
this very crossroads. I believe others out there are "there" too, and I
wanted to file this reply since it will have to serve as a proxy for my
attendance at the Workshop next week. =(

Very exciting times.

Rob Guglielmetti IESNA, LEED AP
Building Energy Efficiency Engineer
National Renewable Energy Laboratory
1617 Cole Blvd, MS-5202
Golden, CO 80401-3393
T. 303.275.4319
F. 303.384.7540
E. [email protected]

···

On 9/15/10 12:17 PM, "Anne Iversen" <[email protected]> wrote:

Hi Rob, Anne, Lars:

Indeed, a very interesting discussion. It's a shame you won't be in Freiburg next week, Rob, as we're going to be looking at some of these issues.

It should be possible to modify rsensor to output a set of ray samples as input to rtcontrib, then use the -c option of the latter to sum together these samples into a set of daylight coefficients for that sensor. I have looked at this a few times and decided that it's more than an afternoon's work to modify rsensor appropriately, so have left it for "later." This would be the most efficient method by far.

The alternative that is possible with the software as it is involves post-multiplying the output of rtcontrib on a standard hemispherical ray distribution to weight the results according to the sensor sensitivity distribution. It wouldn't be easy, but I think one could accomplish this with the appropriate combination of rcalc, Perl, etc.

Best,
-Greg

···

From: "Guglielmetti, Robert" <[email protected]>
Date: September 15, 2010 12:49:55 PM PDT

Hi Anne, Lars, everyone,

Fun topic! Replies within...

On 9/15/10 12:17 PM, "Anne Iversen" <[email protected]> wrote:

1)
What I get out of rsensor can be illuminance readings for the specified
photocell?
The following command would generate the illuminance-level on the sensor,
right?

rsensor -ab XX -i [sensor view] sensor_file scene.oct > illsensor.dat

Actually, rsensor computes photosensor response on the sensor -- which WOULD
be illuminance assuming the sensor's response was a perfect cosine one, but
the final output of rsensor ultimately is photosensor response. So your
command above would send the sensor response to STDOUT.

2)
From Axel Jacobs tutorial on rtcontrib I can see how I can obtain illuminance
readings from photocells defined as points - but how should I do it if I am
not interested in the point illuminance reading, but interested in the
illuminance level falling onto the sensor that doesn't see an hemisphere?
Can I somehow replace the
$ cat workingplane_photocell.pts | rtcontrib .........

with
$ cat [sensor view] sensor_file....| rtcontrib...??

Lars proposes an image based approach to evaluating what the sensor "sees"
and integrating a weighted response. This in effect is what psens (Chas
Ehrlich's project) does, on a single image. This is the tool Zack Rogers
used in SPOT's initial versions, and it was SPOT that led to the development
of rsensor in the first place. What you are trying to do above is to apply
the daylight coefficient approach to deriving the photosensor response, and
I think it's no secret to anyone watching this mailing list over the last
year or so that this is a subject of great interest to us all and some of us
are working on this to some degree. The reason for the interest is that with
daylight coefficients, we can do annual simulations with hourly resolution
(and even incorporate occupant response (blinds, etc) and complex
fenestration systems), in a reasonable timeframe.

The promise here is being able to leverage new tools in the Radiance toolkit
to not only calculate annual daylight availability and quality metrics, but
to carry that capability through to the ever-crucial follow-through on the
electric lighting side -- the daylight-responsive lighting control response
-- and to study this at an annual/hourly resolution. This would allow us to
inform whole building energy simulation tools and really start to understand
the energy impacts of daylighting in a holistic way.

We at last have tools to get us partway there. These would be rtcontrib,
genskyvec, and dctimestep. With these we can compute DCs for task plane
illuminance, but also -- critically -- sensor points on the ceiling or some
arbitrary location/aiming. But we still want to be able to weight the
contributions by the photosensor response. For this, I could imagine a cal
file inserts itself into this workflow, maybe dctimestep accepts an
additional argument for a cal file and there's a "signal" option for passing
all this to rsensor. (?)

Kung Fu Feature Request:
OR, as we gather up all the DCs and weight them by the sky luminance, could
we ALSO weight them by photosensor response, BEFORE summing and computing a
signal? My sense is that this is not possible but I don't fully understand
all the ray accounting that is possible in rtcontrib. Perhaps this could be
a new feature? (???) (!!!)

We are working on rtcontrib-based tools here at NREL and are basically at
this very crossroads. I believe others out there are "there" too, and I
wanted to file this reply since it will have to serve as a proxy for my
attendance at the Workshop next week. =(

Very exciting times.

Rob Guglielmetti IESNA, LEED AP
Building Energy Efficiency Engineer
National Renewable Energy Laboratory
1617 Cole Blvd, MS-5202
Golden, CO 80401-3393
T. 303.275.4319
F. 303.384.7540
E. [email protected]

Hi Greg,

Yeah it's a bummer. I look forward to what comes out of the Workshop, kudos
to Jan Wienold for getting a good one organized. If there's any way to share
what comes out of the discussions sooner than later, that would be great!

Have a Happy Workshop, people!

- Rob

···

On 9/15/10 7:30 PM, "Greg Ward" <[email protected]> wrote:

Hi Rob, Anne, Lars:

Indeed, a very interesting discussion. It's a shame you won't be in Freiburg
next week, Rob, as we're going to be looking at some of these issues.

It should be possible to modify rsensor to output a set of ray samples as
input to rtcontrib, then use the -c option of the latter to sum together these
samples into a set of daylight coefficients for that sensor. I have looked at
this a few times and decided that it's more than an afternoon's work to modify
rsensor appropriately, so have left it for "later." This would be the most
efficient method by far.

The alternative that is possible with the software as it is involves
post-multiplying the output of rtcontrib on a standard hemispherical ray
distribution to weight the results according to the sensor sensitivity
distribution. It wouldn't be easy, but I think one could accomplish this with
the appropriate combination of rcalc, Perl, etc.

Best,
-Greg

Just a quick follow-up on this. There was some talk about the need for ray sample directions out of rsensor, so I added this feature to the current HEAD. You simply specify a dot ('.') rather than an octree to get a set of sample rays instead of a summed result. Give it a try!

-Greg

···

From: "Guglielmetti, Robert" <[email protected]>
Date: September 15, 2010 12:49:55 PM PDT

Hi Anne, Lars, everyone,

Fun topic! Replies within...

On 9/15/10 12:17 PM, "Anne Iversen" <[email protected]> wrote:

1)
What I get out of rsensor can be illuminance readings for the specified
photocell?
The following command would generate the illuminance-level on the sensor,
right?

rsensor -ab XX -i [sensor view] sensor_file scene.oct > illsensor.dat

Actually, rsensor computes photosensor response on the sensor -- which WOULD
be illuminance assuming the sensor's response was a perfect cosine one, but
the final output of rsensor ultimately is photosensor response. So your
command above would send the sensor response to STDOUT.

2)
From Axel Jacobs tutorial on rtcontrib I can see how I can obtain illuminance
readings from photocells defined as points - but how should I do it if I am
not interested in the point illuminance reading, but interested in the
illuminance level falling onto the sensor that doesn't see an hemisphere?
Can I somehow replace the
$ cat workingplane_photocell.pts | rtcontrib .........

with
$ cat [sensor view] sensor_file....| rtcontrib...??

...

That sounds great Greg - THANKS. I'm *so* ready to give it a try.

Have problems installing the HEAD though: Just downloaded the HEAD, but
cannot download the auxiliary files - they are not available on the server.
Dependent on the changes it isn't always necessary with new auxiliary files,
right?? So I have tried to run ./makeall install without new auxiliary
files. Unfortunately I'm getting installation errors. For all the
directories in src I get the error "exec: make: not found."

···

---------
make error:
...
In directory util...
/usr/local/ray/bin/rmake: line 2: exec: make: not found
...
---------

FYI - my rmake script is as follows:
#!/bin/sh
exec make "SPECIAL=ogl" \
    "OPT=-O2" \
    "MACH=-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
\
    ARCH=Intel "COMPAT=" \
    INSTDIR=/usr/local/ray/bin \
    LIBDIR=/usr/local/ray/lib \
    ESUFFIX= \
    CC=cc CONFIGURE_ARCH=i386 "$@" -f Rmakefile

When searching the archives I can see that some of the installation errors
might be due to the dev tools not being installed, so I have checked this,
and found that in my existing dev directory, /usr/local/ray/bin/dev, the dev
.hdi-tools are: glx1, glx1h, ogl, oglh, oglo, ogloh, ogls, oglsh, oglso,
oglsoh, x11 and x11h.

Anyone know what is going wrong here??
Best,
Anne

-----------------------
-----------------------
Just a quick follow-up on this. There was some talk about the need for ray
sample directions out of rsensor, so I added this feature to the current
HEAD. You simply specify a dot ('.') rather than an octree to get a set of
sample rays instead of a summed result. Give it a try!

-Greg

Have problems installing the HEAD though: Just downloaded the HEAD, but
cannot download the auxiliary files - they are not available on the server.
Dependent on the changes it isn't always necessary with new auxiliary files,
right??

Right. I suppose if Greg says that a new feature is in HEAD you only
need to update that bit.

So I have tried to run ./makeall install without new auxiliary
files. Unfortunately I'm getting installation errors. For all the
directories in src I get the error "exec: make: not found."
---------
make error:
...
In directory util...
/usr/local/ray/bin/rmake: line 2: exec: make: not found
...
---------

You either have no compiler installed or the development tools are not
in your search path.

When you type

    which make

what's the answer from the shell? If you do know that make is
installed you have to check your PATH setting man add it's location to
your PATH.

Thomas

···

On Tue, Sep 28, 2010 at 8:40 AM, Anne Iversen <[email protected]> wrote:

Hi Anne,

Sorry about the missing files -- a lot of things are "not quite right" with the website at the moment. Soon to be fixed, hopefully. I have restored the missing files, which you could have gotten from radsite.lbl.gov.

And as Thomas points out, you don't really need this for compiling the 4.1a HEAD.

Best,
-Greg

···

From: Anne Iversen <[email protected]>
Date: September 28, 2010 6:40:00 AM PDT

That sounds great Greg - THANKS. I'm *so* ready to give it a try.

Have problems installing the HEAD though: Just downloaded the HEAD, but cannot download the auxiliary files - they are not available on the server. Dependent on the changes it isn't always necessary with new auxiliary files, right?? So I have tried to run ./makeall install without new auxiliary files. Unfortunately I'm getting installation errors. For all the directories in src I get the error "exec: make: not found."
---------
make error:
...
In directory util...
/usr/local/ray/bin/rmake: line 2: exec: make: not found
...
---------

Hi Greg - I have it up running now. Had to install xcode. Btw: Installing
xcode has some really nice side-effects that I wasn't aware of. Have tried
to install e.g. convert and m4 on my mac but with no luck - have used these
really convenient programs on Linux. However, these programs are included in
xcode, so now rsensor maybe does what I want it to (just need to plot the
rays to verify that I get the right directions) and in addition I can make
use of the other programs. HURRAY!
Thanks again Greg. Have a great day!
/Anne

···

----------------------------------------------------------------------

Message: 1
Date: Tue, 28 Sep 2010 11:24:31 -0700
From: Greg Ward <[email protected]>
Subject: Re: [Radiance-general] Re: rsensor and rtcontrib
To: Radiance general discussion <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

Hi Anne,

Sorry about the missing files -- a lot of things are "not quite right" with
the website at the moment. Soon to be fixed, hopefully. I have restored
the missing files, which you could have gotten from radsite.lbl.gov.

And as Thomas points out, you don't really need this for compiling the 4.1a
HEAD.

Best,
-Greg

From: Anne Iversen <[email protected]>
Date: September 28, 2010 6:40:00 AM PDT

That sounds great Greg - THANKS. I'm *so* ready to give it a try.

Have problems installing the HEAD though: Just downloaded the HEAD, but

cannot download the auxiliary files - they are not available on the server.
Dependent on the changes it isn't always necessary with new auxiliary files,
right?? So I have tried to run ./makeall install without new auxiliary
files. Unfortunately I'm getting installation errors. For all the
directories in src I get the error "exec: make: not found."

---------
make error:
...
In directory util...
/usr/local/ray/bin/rmake: line 2: exec: make: not found
...
---------

Hi,
Finally I've tried to pipe the rays from rsensor to
rtcontrib...unfortunately without any luck. I've just installed the HEAD
again but this hasn't solved my problem. No errors or messages are
generated, so I don't have any 'feeling' of what might be going wrong...Am I
missing something in my command line below?

rsensor -vf views/WattStopper.vf sensors/WattStopper_LS-290C.dat . |
rtcontrib -c 10000 -fo @rtc.opt -e MF:1 -f reinhart.cal -b rbin -o
results/photosensors/patches/p%d.dat -m sky_glow -w octrees/SBi_Whitesky.oct

my view file is as follows:
rvu -vtv -vp 10.86 0.84 9.025 -vd 0 -1 0 -vu 0 0 1

the sensorfile is the WattStopper_LS-290, with the exact same data as used
in SPOT. This file contains 10000 points, why I have added the -c 10000, to
obtain the average value from the traced rays as output.

Best regards,
Anne in snowy Denmark

Hi Anne,

I think you need to add a "-h" option to the rsensor command -- it should probably be the default, really. Having a header in the input only messes up rtcontrib.

-Greg

···

From: Anne Iversen <[email protected]>
Date: November 28, 2010 9:04:18 AM PST

Hi,
Finally I've tried to pipe the rays from rsensor to rtcontrib...unfortunately without any luck. I've just installed the HEAD again but this hasn't solved my problem. No errors or messages are generated, so I don't have any 'feeling' of what might be going wrong...Am I missing something in my command line below?

rsensor -vf views/WattStopper.vf sensors/WattStopper_LS-290C.dat . | rtcontrib -c 10000 -fo @rtc.opt -e MF:1 -f reinhart.cal -b rbin -o results/photosensors/patches/p%d.dat -m sky_glow -w octrees/SBi_Whitesky.oct

my view file is as follows:
rvu -vtv -vp 10.86 0.84 9.025 -vd 0 -1 0 -vu 0 0 1

the sensorfile is the WattStopper_LS-290, with the exact same data as used in SPOT. This file contains 10000 points, why I have added the -c 10000, to obtain the average value from the traced rays as output.

Best regards,
Anne in snowy Denmark

Yep Greg - you are so right :slight_smile:
Thanks.
/Anne

···

__________
Hi Anne,

I think you need to add a "-h" option to the rsensor command -- it should
probably be the default, really. Having a header in the input only messes
up rtcontrib.

-Greg