Skip to content

Commit

Permalink
fix(epw): fixed bug in sky_temperature method
Browse files Browse the repository at this point in the history
We have forgotten to change .values to .data after making the change in DataCollection class.

Added an extra test to catch this issue in the future.
  • Loading branch information
mostaphaRoudsari committed Nov 30, 2018
1 parent f31f4fa commit 8057808
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ladybug/epw.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ def sky_temperature(self):

# calculate sy temperature for each hour
sky_temp_data = []
for hor_ir in horiz_ir.values:
for hor_ir in horiz_ir.data:
dat = hor_ir.datetime
temp = ((float(hor_ir) / (5.6697 * (10**(-8))))**(0.25)) - 273.15
sky_temp_data.append(DataPoint(temp, dat))
Expand Down
1 change: 1 addition & 0 deletions tests/epw_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def test_import_epw(self):
# Check that calling location getter only retrieves location
assert epw.is_data_loaded is False
dbt = epw.dry_bulb_temperature
skyt = epw.sky_temperature # test sky temperature calculation
assert epw.is_data_loaded is True
assert len(dbt) == 8760

Expand Down

0 comments on commit 8057808

Please sign in to comment.