# sDA calculation

**URL:** <https://discourse.ladybug.tools/t/sda-calculation/2403>\
**Category:** honeybee\[+\]\
**Created:** [December 20, 2017, 12:15pm UTC](https://discourse.ladybug.tools/t/sda-calculation/2403 "2017-12-20T12:15:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Federico587](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/federico587/32/124_2.png) [@Federico587](https://discourse.ladybug.tools/u/Federico587)\
**Post date:** [December 20, 2017, 12:15pm UTC](https://discourse.ladybug.tools/t/sda-calculation/2403/1 "2017-12-20T12:15:32Z")

</div>

Hi,

I think that there could be an error in the ouput from the sDA component.  
The sDA calculated from the DA results gives me a different result than the one from the sDA component.

Am I doing the right calculations?

Best regards,

Federico

 ![Capture15](https://discourse.ladybug.tools/uploads/default/original/2X/6/63041dc9ca3a52c53aff98ccfc47dd8ff7765fc2.PNG)

---

<div class="post-metadata">

**Author:** ![saram](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/saram/32/331_2.png) [@saram](https://discourse.ladybug.tools/u/saram)\
**Post date:** [December 21, 2017, 3:05am UTC](https://discourse.ladybug.tools/t/sda-calculation/2403/2 "2017-12-21T03:05:51Z")

</div>

Hi, I am having the same issue. It seems sDA is too low (almost 2 or 3%) for north oriented windows with descent sizes. One thing I notice is that DA is insensitive toward occupancy schedule.

I used the same approach as you illustrated in the image to calculate sDA but when I disconnect the schedule, the calculated sDA did not change! So my interpretation was that probably DA is insensitive toward the schedule. But UDI got updated.

---

<div class="post-metadata">

**Author:** ![Federico587](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/federico587/32/124_2.png) [@Federico587](https://discourse.ladybug.tools/u/Federico587)\
**Post date:** [December 21, 2017, 5:42am UTC](https://discourse.ladybug.tools/t/sda-calculation/2403/3 "2017-12-21T05:42:48Z")

</div>

Hi @saram,

Sometime you need to disable and enable again the component, but I do not think that this is the case.  
I checked the DA and sDA output for the same simulation but with different schedules, and I can see the changes.  
Maybe the problem is with the schedule component. Check the values with ladybug 3D chart component.

 ![Capture20](https://discourse.ladybug.tools/uploads/default/original/2X/9/9ae11242c56c88046529bcc1326ae24ca1c7ebbf.png)

---

<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:** [December 24, 2017, 5:51pm UTC](https://discourse.ladybug.tools/t/sda-calculation/2403/4 "2017-12-24T17:51:54Z")

</div>

@Federico587,

Thank you for double checking the results and reporting this. This looks like a bug. I checked the source code and it seems I have calculated the % of time instead of the % of area for sDA.

> <https://github.com/ladybug-tools/honeybee/blob/0fc2acebbb203f03960ba7856100c102328cb5c6/honeybee/radiance/analysisgrid.py#L503-L582>

This is a major bug and I’ll try to fix it as soon as I can. We should have a new release soon to address this issue.

> <https://github.com/ladybug-tools/honeybee/issues/189>

---

<div class="post-metadata">

**Author:** ![Federico587](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/federico587/32/124_2.png) [@Federico587](https://discourse.ladybug.tools/u/Federico587)\
**Post date:** [December 26, 2017, 1:26am UTC](https://discourse.ladybug.tools/t/sda-calculation/2403/5 "2017-12-26T01:26:45Z")

</div>

Hi @mostapha,

it is a pleasure that I can contribute just a little to this fantastic tool!  
If I may, since we are talking about bugs, do you mind have a look to the schedule component?  
As it is discussed her with @saram, it seems like the this component behavior is a little strange.

It is fantastic that you always improve this tool. Thanks.  
Best regards,

Federico

---

<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:** [February 7, 2018, 4:21pm UTC](https://discourse.ladybug.tools/t/sda-calculation/2403/6 "2018-02-07T16:21:55Z")

</div>

Split this topic on February 7, 2018, 4:21pm UTC

4 posts were split to a new topic: [Blinds/shades operation in sDA calculation](https://discourse.ladybug.tools/t/blinds-shades-operation-in-sda-calculation/2546)

---

<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:** [February 7, 2018, 4:03pm UTC](https://discourse.ladybug.tools/t/sda-calculation/2403/10 "2018-02-07T16:03:52Z")

</div>

The original bug in sDA calculation is now fixed. I can’t recreate the issues with the schedule myself. @saram has provided me an example which will hopefully recreates the error. I will discuss the blind state discussion in a separate reply.

 ![image](https://discourse.ladybug.tools/uploads/default/original/2X/a/a27c9c18c9cb4b44838d79c2f1f736c58b5a39de.jpg)

> <https://github.com/ladybug-tools/honeybee/commit/79de259e3365dde263ad75dd1302e887559e3ae0>

---

<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:** [February 8, 2018, 1:15am UTC](https://discourse.ladybug.tools/t/sda-calculation/2403/11 "2018-02-08T01:15:17Z")

</div>

@saram, I think in you case the DA values didn’t go lower than 50 so it didn’t change the sDA. From the cases that I have tested the values are changing after changing the schedule.

 ![image](https://discourse.ladybug.tools/uploads/default/original/2X/8/89032325be879b050fc69680876c2442f85535c2.jpg)

---

<div class="post-metadata">

**Author:** ![saram](https://discourse.ladybug.tools/user_avatar/discourse.ladybug.tools/saram/32/331_2.png) [@saram](https://discourse.ladybug.tools/u/saram)\
**Post date:** [February 8, 2018, 1:54am UTC](https://discourse.ladybug.tools/t/sda-calculation/2403/12 "2018-02-08T01:54:34Z")

</div>

> [@saram](#):
>
> descent

Thanks for fixing it. Please let us know when you are applying the shading algorithm to LEED sDA calculation.

---

<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:** [February 8, 2018, 12:46pm UTC](https://discourse.ladybug.tools/t/sda-calculation/2403/13 "2018-02-08T12:46:55Z")

</div>

Hi @saram, You should follow this topic for blinds operation implementation and share your thoughts: [Blinds/shades operation in sDA calculation](https://discourse.ladybug.tools/t/blinds-shades-operation-in-sda-calculation/2546/5)
