# Analysis period setting , wind rose

#1

Hello everyone:
Unliking a continuously analysis setting
(By setting Begin M/D/H to End M/D/H period)in lady bug.
I’m wondering how to set a fix hours interval within the months period in wind rose analysis. Something like 8:00a.m. to 15:00 p.m. , from maybe January to March period.
That would be clear with a wind profile results from seasonal, work time or sleep time difference.

#2

Hi @borui,
windRose_FixedHours.gh (411.3 KB)

#3

Thank you @devang
I can understand the structure of this period setting sample, another question is on conditionalStatement_ .
What’s the meaning of b==1 ? Is it represented the temperature?(What I got from descriptions)
Lots of thanks !
borui

#4

Sure.
So if you look at the data we’re supplying to the annualHourlyData_ input, it is a list of 0s and 1s. What we’re doing here is following;

1. We’re making a list of 8760 0s and then replacing the 0s with the 1s for the Hours of the year that we are interested in using to plot the wind rose
2. This gives us a list of 8760 values.
4. Now from the whole list of 0s and 1s, we’re only interested in 1s.
5. Therefore, the conditional statement b==1

Hope that helps.

#5

oh, I see !
But is there a difference meaning between b==1 and b=1 ?
Cause when I change into single “=” , the results seems different.

#6

There’s a major difference. Ladybug is following Python syntax for equality here. So when we say b==1. It means we’re saying if b is equal to 1 select wind speed and direction at that hour

b=1 has entirely different meaning in Python. It means the variable named “b” is assigned the value of 1. This is something totally irrelevant here and therefore, you get a different result.

hope that helps!

#7

Now that I could totally figure it out.