# Annual Daylight Glare Probability for multiple Test\_points

**URL:** <https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889>\
**Category:** honeybee\[+\]\
**Created:** [September 4, 2020, 6:03pm UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889 "2020-09-04T18:03:49Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![Clarence](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/c/4da419/32.png) [@Clarence](https://discourse.ladybug.tools/u/Clarence)\
**Post date:** [March 14, 2022, 6:25pm UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/65 "2022-03-14T18:25:33Z")

</div>

Dear @mikkel,

Thank you for the Grasshopper script. I would like to ask you a question if it is possible. Regarding the usage of sky vector instead of sky metric, in what way I can read the DGP values for all the test points at certain hour on a certain day. As you can see in the attached image, the reading component shows **“1. Solution exception:invalid literal for float(): -nan(ind)”**.

Thank you very much.

Best regards.

 ![螢幕擷取畫面 2022-03-14 192027](https://discourse.ladybug.tools/uploads/default/original/3X/2/e/2e525df5d2fed8196cd0c9a57c5b5441de07bb2b.png)

---

<div class="post-metadata">

**Author:** ![mikkel](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/mikkel/32/14362_2.png) [@mikkel](https://discourse.ladybug.tools/u/mikkel)\
**Post date:** [March 14, 2022, 10:05pm UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/66 "2022-03-14T22:05:47Z")

</div>

Hi @Clarence,

If you run the recipe with a point-in-time sky vector, the reading component is not useful, but if you only care about the DGP values you can find them in the file called `views..scene..default.dgp`.

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/8/b/8b8df3a6b321a8aabccd77216bd9dfba01fde169.png)

---

<div class="post-metadata">

**Author:** ![Clarence](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/c/4da419/32.png) [@Clarence](https://discourse.ladybug.tools/u/Clarence)\
**Post date:** [March 22, 2022, 11:45am UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/68 "2022-03-22T11:45:30Z")

</div>

Hi @mikkel,

Sorry for the late reply. I understand now. I am facing another issue about how to combine a dynamic shading schedule in the imageless glare simulation. I have several shading panels and their annual shading schedules but I am not sure how to include them in the simulation.

Sorry for bothering you again and I am looking forward to your reply.

Thank you very much.

Best regards.

---

<div class="post-metadata">

**Author:** ![mikkel](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/mikkel/32/14362_2.png) [@mikkel](https://discourse.ladybug.tools/u/mikkel)\
**Post date:** [March 22, 2022, 5:04pm UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/69 "2022-03-22T17:04:47Z")

</div>

Hi @Clarence,

Since the recipe only works for static models, you have to run it multiple times with different models to get the results of dynamic shadings. You would then have to combine the raw results yourself for all the different simulations based on your schedule.

---

<div class="post-metadata">

**Author:** ![YD](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/y/258eb7/32.png) [@YD](https://discourse.ladybug.tools/u/YD)\
**Post date:** [March 24, 2022, 5:36am UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/70 "2022-03-24T05:36:32Z")

</div>

Very nice recipe. Thanks!

But I got one error message from below. Any idea?

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/b/2/b25591f263ae193ec2ca375812b0f04f27b246df.png)

I have the file named below  
 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/f/9/f9e4e17c03b873f67ea4921aa76a3a07171c90cb.png)

---

<div class="post-metadata">

**Author:** ![mikkel](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/mikkel/32/14362_2.png) [@mikkel](https://discourse.ladybug.tools/u/mikkel)\
**Post date:** [March 24, 2022, 9:47am UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/71 "2022-03-24T09:47:04Z")

</div>

Hi @YD,

The error message suggests that the files are not in the right place. If you did follow the instructions in [this](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/6) post I am not sure why you get that error.

It seems like you have run a simulation? Your folder is polluted with the results, but I would suggest not to put anything in this folder besides ` __init__.py` and `gridbased.py`.

---

<div class="post-metadata">

**Author:** ![Clarence](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/c/4da419/32.png) [@Clarence](https://discourse.ladybug.tools/u/Clarence)\
**Post date:** [March 24, 2022, 10:53am UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/72 "2022-03-24T10:53:47Z")

</div>

Hi @mikkel,

I got it now and I will try this method! Thank you very much 😀

Best regards.

Clarence Wang

---

<div class="post-metadata">

**Author:** ![YD](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/y/258eb7/32.png) [@YD](https://discourse.ladybug.tools/u/YD)\
**Post date:** [March 24, 2022, 10:33pm UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/73 "2022-03-24T22:33:59Z")

</div>

Hi Mikkel,

thank you for your reply. It works now when only two files in the folder.

---

<div class="post-metadata">

**Author:** ![YD](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/y/258eb7/32.png) [@YD](https://discourse.ladybug.tools/u/YD)\
**Post date:** [March 25, 2022, 2:58am UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/76 "2022-03-25T02:58:57Z")

</div>

And does the number higher (blue color) means better? How do we change analysis period?

---

<div class="post-metadata">

**Author:** ![mikkel](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/mikkel/32/14362_2.png) [@mikkel](https://discourse.ladybug.tools/u/mikkel)\
**Post date:** [March 25, 2022, 2:19pm UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/77 "2022-03-25T14:19:29Z")

</div>

Hi @YD,

Yes, blue (or a higher %) is better. 100% means that the view is free of glare 100% of the hours.

The easiest way is to change the schedule to fit your analysis period. It will still calculate DGP for the whole year (annual sky matrix) but the schedule will make sure that it only considers the occupied hours (within your analysis period) in the glare autonomy.

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/c/5/c5dffeb20a1e450d4f3901387aa290f73a6c4420.png)

---

<div class="post-metadata">

**Author:** ![YD](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/y/258eb7/32.png) [@YD](https://discourse.ladybug.tools/u/YD)\
**Post date:** [March 27, 2022, 10:22pm UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/78 "2022-03-27T22:22:08Z")

</div>

Hi @mikkel,

Thanks for your reply. I have tried that way, but it seemed not working. Any idea? Can we apply different analysis month?

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/e/7/e7aa1d483b020b9e973e04ed0bf201695d46c5c6.png)

---

<div class="post-metadata">

**Author:** ![mikkel](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/mikkel/32/14362_2.png) [@mikkel](https://discourse.ladybug.tools/u/mikkel)\
**Post date:** [March 28, 2022, 9:04am UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/79 "2022-03-28T09:04:01Z")

</div>

Hi @YD,

Are you able to share the Grasshopper file?

---

<div class="post-metadata">

**Author:** ![YD](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/y/258eb7/32.png) [@YD](https://discourse.ladybug.tools/u/YD)\
**Post date:** [March 28, 2022, 10:00pm UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/80 "2022-03-28T22:00:27Z")

</div>

Hi @mikkel , here’s the GH file

[imagelessGlare v1.3.0.gh](https://discourse.ladybug.tools/uploads/short-url/zxFh9L7RFRkBbfcTXOLK4wNIbCo.gh) (574.4 KB)

---

<div class="post-metadata">

**Author:** ![mikkel](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/mikkel/32/14362_2.png) [@mikkel](https://discourse.ladybug.tools/u/mikkel)\
**Post date:** [March 30, 2022, 11:00am UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/81 "2022-03-30T11:00:25Z")

</div>

You didn’t internalize the geometry, so I was not able to recreate the issue. I did try with a different geometry but that worked fine. Can you check if you are able to run the following file as it is:  
[imagelessGlare\_Test.gh](https://discourse.ladybug.tools/uploads/short-url/sXE8eNfGG4gvzQJc772NzedsYYg.gh) (539.9 KB)

---

<div class="post-metadata">

**Author:** ![YD](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/y/258eb7/32.png) [@YD](https://discourse.ladybug.tools/u/YD)\
**Post date:** [March 30, 2022, 10:17pm UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/82 "2022-03-30T22:17:06Z")

</div>

Hi @mikkel , I’ve run this file, but receiving the same error message.

 ![image](https://discourse.ladybug.tools/uploads/default/original/3X/2/5/2509e2ffaeafc846af020c18c9bd182a6f4b9e9d.png)

---

<div class="post-metadata">

**Author:** ![mikkel](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/mikkel/32/14362_2.png) [@mikkel](https://discourse.ladybug.tools/u/mikkel)\
**Post date:** [March 30, 2022, 11:11pm UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/83 "2022-03-30T23:11:57Z")

</div>

Hi @YD,

Ah, I think I know now. The analysis period is not behaving as I expected. If you check the written schedule file, you will probably see that it got all zeros, i.e., no occupancy. You can use the other occupancy component from HB[+] to generate a valid schedule manually. But if you want the short analysis period as you showed in the image (just a single day 9-17) I am not sure the occupied glare autonomy makes much sense.

![image](https://discourse.ladybug.tools/uploads/default/original/3X/7/1/71b82093463f6b35f200a8385ffe54ca08a9a38b.png)

---

<div class="post-metadata">

**Author:** ![YD](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/y/258eb7/32.png) [@YD](https://discourse.ladybug.tools/u/YD)\
**Post date:** [March 31, 2022, 12:00am UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/84 "2022-03-31T00:00:00Z")

</div>

Hi @mikkel ,

thank you for your reply, but I didn’t find the component… I tried to adjust period form the python script for that component, and it works for at least two-day period.

---

<div class="post-metadata">

**Author:** ![AbrahamYezioro](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/abrahamyezioro/32/3_2.png) [@AbrahamYezioro](https://discourse.ladybug.tools/u/AbrahamYezioro)\
**Post date:** [April 6, 2022, 6:04pm UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/85 "2022-04-06T18:04:34Z")

</div>

Hi,  
I see that the imageles glare analysis is already implemented in LBT.  
**VERY COOL!!**  
Thanks for that,  
-A.

---

<div class="post-metadata">

**Author:** ![Hristo](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/h/f1d935/32.png) [@Hristo](https://discourse.ladybug.tools/u/Hristo)\
**Post date:** [April 7, 2022, 10:27am UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/86 "2022-04-07T10:27:02Z")

</div>

Great news!  
Does anyone have an example file of a working recipe?  
I did a quick try and got a lot of mistakes.

 ![imageless](https://discourse.ladybug.tools/uploads/default/original/3X/2/2/228dbc8824f66f124e5b5a82774c198087edff5f.png)

---

<div class="post-metadata">

**Author:** ![mikkel](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/mikkel/32/14362_2.png) [@mikkel](https://discourse.ladybug.tools/u/mikkel)\
**Post date:** [April 7, 2022, 11:13am UTC](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889/87 "2022-04-07T11:13:50Z")

</div>

Hi @Hristo,

You can download a sample file here: [honeybee-grasshopper-radiance/annual\_glare.gh at master · ladybug-tools/honeybee-grasshopper-radiance · GitHub](https://github.com/ladybug-tools/honeybee-grasshopper-radiance/blob/master/samples/annual_glare.gh)

[Previous page](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889.md?page=3)

[Next page](https://discourse.ladybug.tools/t/annual-daylight-glare-probability-for-multiple-test-points/10889.md?page=5)
