ladybug-tools/honeybee-legacy

Normalize Data by Floor Area divides simulation data by incorrect HBZones

Closed this issue · 1 comments

@chriswmackey

I believe I found a bug/typo in the `flrNorm' component, that is leading to zone simulation values to be divided by the wrong floor areas.

The typo appears to happen here, when the HBZone area property and simulation header/data is combined to normalize the latter:
https://github.com/mostaphaRoudsari/honeybee/blob/71ab0eebb98c2482ce7cd45c984444ba347705e3/src/Honeybee_Normalize%20Data%20by%20Floor%20Area.py#L114-L124

Specifically, this list iterates through the headers and extracts the zone name from each one, then in line 117 uses the zone name in the hbZoneNames dictionary to retrieve the index value for the zone data stored in the dataPyList. The problem is that the hbZoneNames dictionary stores index values for the order of the input HBZones, and doesn't correspond to the order of the simulation data coming from the EP:

https://github.com/mostaphaRoudsari/honeybee/blob/71ab0eebb98c2482ce7cd45c984444ba347705e3/src/Honeybee_Normalize%20Data%20by%20Floor%20Area.py#L95-L103'

So the data from the dataPyList should be called using the count variable that is incrementing the strPyList.

zoneDat = dataPyList[count]

I was getting some incorrect EUI numbers, and indexing with count solved it.

Let me know if I'm overlooking something here. Note that the order of the HBZones sometimes do align with the simulation data, so it will occasionally give you the right normalized value. I can try and send a PR tonight if this is the correct fix.

S

Thank you for taking care of this one @saeranv . Feel free to do the honors of closing the issue.