From 8057808b00c33093461379d695dd2932de584806 Mon Sep 17 00:00:00 2001 From: "LAPTOP-MB0HU4QI\\Mostapha" Date: Thu, 29 Nov 2018 20:42:26 -0500 Subject: [PATCH] fix(epw): fixed bug in sky_temperature method 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. --- ladybug/epw.py | 2 +- tests/epw_test.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ladybug/epw.py b/ladybug/epw.py index fa15dcec..f6b4fdea 100644 --- a/ladybug/epw.py +++ b/ladybug/epw.py @@ -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)) diff --git a/tests/epw_test.py b/tests/epw_test.py index 9de91ec9..1027b2a6 100644 --- a/tests/epw_test.py +++ b/tests/epw_test.py @@ -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