# Question about direct sunlight, below a certain height of the sun

**URL:** <https://discourse.ladybug.tools/t/question-about-direct-sunlight-below-a-certain-height-of-the-sun/7949>\
**Category:** ladybug-legacy\
**Tags:** sunpath\
**Created:** [December 22, 2019, 10:48am UTC](https://discourse.ladybug.tools/t/question-about-direct-sunlight-below-a-certain-height-of-the-sun/7949 "2019-12-22T10:48:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sonny.Weaver](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/sonny.weaver/32/19348_2.png) [@Sonny.Weaver](https://discourse.ladybug.tools/u/Sonny.Weaver)\
**Post date:** [December 22, 2019, 10:48am UTC](https://discourse.ladybug.tools/t/question-about-direct-sunlight-below-a-certain-height-of-the-sun/7949/1 "2019-12-22T10:48:07Z")

</div>

Hallo dear community,

for European countries, with the new **DIN EN 17037** , direct sunlight below a certain height of the sun, should not be taken in consideration. I don’t know if is like that on other continents (America, Asia, etc).

I solved the problem by inserting a small string/text, inside the LB\_SunPath component (see the blue marked text in the image)

 ![radians](https://discourse.ladybug.tools/uploads/default/original/2X/7/76ba896309d3bbfc010a76626ec6676ace9fa23e.png)

but, the problem, is when I updating the component, the modification is canceled, and every time I have to be careful not to forget.

any advice on to solve this little problem?

Many greetings.

---

<div class="post-metadata">

**Author:** ![LiamRuvio](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/l/a6a055/32.png) [@LiamRuvio](https://discourse.ladybug.tools/u/LiamRuvio)\
**Post date:** [May 1, 2020, 6:08am UTC](https://discourse.ladybug.tools/t/question-about-direct-sunlight-below-a-certain-height-of-the-sun/7949/2 "2020-05-01T06:08:14Z")

</div>

Dear @mostapha, sorry if I tag you, but the post is worth considering.  
I have the same problem, according with the norm, based on which country, the **γs,min**. is between 10 and 23°.  
It is a very large range not to be taken into consideration for us (European).  
If someone is impractical in going to change the string, as Sonny shows, or forgets to change it after an update, he does not notice that it has been reset.  
I’m not practical with scripting, but it is possible to limit the sunvectors in an external component or little script, without having to modify the original SunPath component?

Greetings  
L.R.

---

<div class="post-metadata">

**Author:** ![mostapha](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/mostapha/32/15244_2.png) [@mostapha](https://discourse.ladybug.tools/u/mostapha)\
**Post date:** [May 8, 2020, 11:16pm UTC](https://discourse.ladybug.tools/t/question-about-direct-sunlight-below-a-certain-height-of-the-sun/7949/3 "2020-05-08T23:16:10Z")

</div>

Can’t you just post-process the sun vectors based on the solar altitude and then use that as an input for sunlight hours?

---

<div class="post-metadata">

**Author:** ![LiamRuvio](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/l/a6a055/32.png) [@LiamRuvio](https://discourse.ladybug.tools/u/LiamRuvio)\
**Post date:** [May 9, 2020, 7:22am UTC](https://discourse.ladybug.tools/t/question-about-direct-sunlight-below-a-certain-height-of-the-sun/7949/4 "2020-05-09T07:22:47Z")

</div>

Dear mostapha, this was exactly my goal, to avoid edit the sun path code.  
For the post-process, I can’t find a component that allows me to eliminate the sun vectors that shouldn’t be considered, to put into the sunlightHoursAnalysis.  
That’s why I asked if there was a way to do it.

Thanks for your time.

---

<div class="post-metadata">

**Author:** ![mostapha](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/mostapha/32/15244_2.png) [@mostapha](https://discourse.ladybug.tools/u/mostapha)\
**Post date:** [May 9, 2020, 2:08pm UTC](https://discourse.ladybug.tools/t/question-about-direct-sunlight-below-a-certain-height-of-the-sun/7949/5 "2020-05-09T14:08:51Z")

</div>

You can filter the vectors based on sun altitude. Here is an example to remove the ones with altitude less than 11 degrees. The results should be the same as the code that @Sonny.Weaver has shared.

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

---

<div class="post-metadata">

**Author:** ![LiamRuvio](https://discourse.ladybug.tools/letter_avatar_proxy/v4/letter/l/a6a055/32.png) [@LiamRuvio](https://discourse.ladybug.tools/u/LiamRuvio)\
**Post date:** [May 10, 2020, 5:10am UTC](https://discourse.ladybug.tools/t/question-about-direct-sunlight-below-a-certain-height-of-the-sun/7949/6 "2020-05-10T05:10:52Z")

</div>

Dear mostapha, it works!!  
I apologize for not thinking about this simple step.  
Thanks for your time

---

<div class="post-metadata">

**Author:** ![mostapha](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/mostapha/32/15244_2.png) [@mostapha](https://discourse.ladybug.tools/u/mostapha)\
**Post date:** [May 10, 2020, 6:39pm UTC](https://discourse.ladybug.tools/t/question-about-direct-sunlight-below-a-certain-height-of-the-sun/7949/7 "2020-05-10T18:39:00Z")

</div>

@LiamRuvio, Thank you but no need to apologize. I also probably learned about the filtering at some point from someone who answered to my question. Just happened to be a couple of years ago. 🙂 Happy to help.

---

<div class="post-metadata">

**Author:** ![Sonny.Weaver](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/sonny.weaver/32/19348_2.png) [@Sonny.Weaver](https://discourse.ladybug.tools/u/Sonny.Weaver)\
**Post date:** [May 11, 2020, 12:25pm UTC](https://discourse.ladybug.tools/t/question-about-direct-sunlight-below-a-certain-height-of-the-sun/7949/8 "2020-05-11T12:25:50Z")

</div>

dear @mostapha, thanks for your help,

essentially the problem is, if I filter the sun vectors, with a post-process, (like above), the sunPosition and the SunPositionInfo, out from SunPath remain unchanged.  
Greetings

---

<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:** [May 11, 2020, 1:52pm UTC](https://discourse.ladybug.tools/t/question-about-direct-sunlight-below-a-certain-height-of-the-sun/7949/9 "2020-05-11T13:52:48Z")

</div>

You can filter this output using the same pattern as for the vectors.  
-A.
