honeybee-radiance-postprocess 0.4.183__py2.py3-none-any.whl → 0.4.185__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- honeybee_radiance_postprocess/results.py +37 -4
- {honeybee_radiance_postprocess-0.4.183.dist-info → honeybee_radiance_postprocess-0.4.185.dist-info}/METADATA +2 -2
- {honeybee_radiance_postprocess-0.4.183.dist-info → honeybee_radiance_postprocess-0.4.185.dist-info}/RECORD +7 -7
- {honeybee_radiance_postprocess-0.4.183.dist-info → honeybee_radiance_postprocess-0.4.185.dist-info}/LICENSE +0 -0
- {honeybee_radiance_postprocess-0.4.183.dist-info → honeybee_radiance_postprocess-0.4.185.dist-info}/WHEEL +0 -0
- {honeybee_radiance_postprocess-0.4.183.dist-info → honeybee_radiance_postprocess-0.4.185.dist-info}/entry_points.txt +0 -0
- {honeybee_radiance_postprocess-0.4.183.dist-info → honeybee_radiance_postprocess-0.4.185.dist-info}/top_level.txt +0 -0
@@ -34,19 +34,21 @@ class _ResultsFolder(object):
|
|
34
34
|
* folder
|
35
35
|
* grids_info
|
36
36
|
* sun_up_hours
|
37
|
+
* sun_down_hours
|
37
38
|
* light_paths
|
38
39
|
* default_states
|
39
40
|
* grid_states
|
40
41
|
* timestep
|
41
42
|
|
42
43
|
"""
|
43
|
-
__slots__ = ('_folder', '_grids_info', '_sun_up_hours', '
|
44
|
-
'
|
44
|
+
__slots__ = ('_folder', '_grids_info', '_sun_up_hours', '_sun_down_hours',
|
45
|
+
'_datetimes', '_light_paths', '_default_states',
|
46
|
+
'_grid_states', '_timestep')
|
45
47
|
|
46
48
|
def __init__(self, folder: Union[str, Path]):
|
47
49
|
"""Initialize ResultsFolder."""
|
48
50
|
self._folder = Path(folder).absolute().as_posix()
|
49
|
-
self.grids_info, self.
|
51
|
+
self.grids_info, self.sun_up_hours = _process_input_folder(self.folder, '*')
|
50
52
|
self._datetimes = [
|
51
53
|
DateTime.from_hoy(hoy) for hoy in list(map(float, self.sun_up_hours))
|
52
54
|
]
|
@@ -87,6 +89,22 @@ class _ResultsFolder(object):
|
|
87
89
|
"""Return sun up hours."""
|
88
90
|
return self._sun_up_hours
|
89
91
|
|
92
|
+
@sun_up_hours.setter
|
93
|
+
def sun_up_hours(self, sun_up_hours):
|
94
|
+
assert isinstance(sun_up_hours, list), \
|
95
|
+
f'Sun up hours must be a list. Got object of type: {type(sun_up_hours)}'
|
96
|
+
assert len(sun_up_hours) <= 8760, \
|
97
|
+
(f'Length of sun up hours cannot be more than 8760. Got object of '
|
98
|
+
f'length: {len(sun_up_hours)}.')
|
99
|
+
self._sun_up_hours = sun_up_hours
|
100
|
+
all_hours = np.arange(0.5, 8760.5, 1).tolist()
|
101
|
+
self._sun_down_hours = set(sun_up_hours).symmetric_difference(all_hours)
|
102
|
+
|
103
|
+
@property
|
104
|
+
def sun_down_hours(self):
|
105
|
+
"""Return sun down hours."""
|
106
|
+
return self._sun_down_hours
|
107
|
+
|
90
108
|
@property
|
91
109
|
def datetimes(self):
|
92
110
|
"""Return DateTimes for sun up hours."""
|
@@ -786,7 +804,8 @@ class Results(_ResultsFolder):
|
|
786
804
|
"""Get median values for each sensor over a given period.
|
787
805
|
|
788
806
|
The hoys input can be used to filter the data for a particular time
|
789
|
-
period.
|
807
|
+
period. If hoys is left empty the median values will likely be 0 since
|
808
|
+
there are likely more sun down hours than sun up hours.
|
790
809
|
|
791
810
|
Args:
|
792
811
|
hoys: An optional numbers or list of numbers to select the hours of
|
@@ -809,6 +828,20 @@ class Results(_ResultsFolder):
|
|
809
828
|
if np.any(array):
|
810
829
|
array_filter = np.apply_along_axis(
|
811
830
|
filter_array, 1, array, mask=mask)
|
831
|
+
if not hoys:
|
832
|
+
# concatenate zero array
|
833
|
+
zero_array = \
|
834
|
+
np.zeros((grid_info['count'], len(self.sun_down_hours)))
|
835
|
+
array_filter = np.concatenate((array_filter, zero_array), axis=1)
|
836
|
+
else:
|
837
|
+
# find number of hoys that are sun down hours
|
838
|
+
sdh_hoys = \
|
839
|
+
len(set([int(h) for h in self.sun_down_hours]).intersection(hoys))
|
840
|
+
if sdh_hoys != 0:
|
841
|
+
# concatenate zero array
|
842
|
+
zero_array = np.zeros((grid_info['count'], sdh_hoys))
|
843
|
+
array_filter = \
|
844
|
+
np.concatenate((array_filter, zero_array), axis=1)
|
812
845
|
results = np.median(array_filter, axis=1)
|
813
846
|
else:
|
814
847
|
results = np.zeros(grid_info['count'])
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: honeybee-radiance-postprocess
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.185
|
4
4
|
Summary: Postprocessing of Radiance results and matrices
|
5
5
|
Home-page: https://github.com/ladybug-tools/honeybee-radiance-postprocess
|
6
6
|
Author: Ladybug Tools
|
@@ -13,7 +13,7 @@ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
13
13
|
Classifier: Operating System :: OS Independent
|
14
14
|
Description-Content-Type: text/markdown
|
15
15
|
License-File: LICENSE
|
16
|
-
Requires-Dist: honeybee-radiance (==1.64.
|
16
|
+
Requires-Dist: honeybee-radiance (==1.64.165)
|
17
17
|
Requires-Dist: numpy (>=1.21.6)
|
18
18
|
|
19
19
|
[](https://github.com/ladybug-tools/honeybee-radiance-postprocess/actions)
|
@@ -8,7 +8,7 @@ honeybee_radiance_postprocess/en17037.py,sha256=9h6eUIxx8AHXlSf9Z5HL5LQt2V4ooPMv
|
|
8
8
|
honeybee_radiance_postprocess/leed.py,sha256=eJooZ0hNW3Q3grzbddiEaJedkInUVM0uvnArcus9Eb8,24919
|
9
9
|
honeybee_radiance_postprocess/metrics.py,sha256=TVChEPtyYrn9MjTRtDL77B3-QZL3J4nP9zrWJDNwC40,13511
|
10
10
|
honeybee_radiance_postprocess/reader.py,sha256=6myKzfGC1pO8zPixg1kKrKjPihHabTKUh2t5BlJvij0,2367
|
11
|
-
honeybee_radiance_postprocess/results.py,sha256=
|
11
|
+
honeybee_radiance_postprocess/results.py,sha256=oAOgorlzLrOlHKXR7T8D7jKvVQzwkN0rvFjG2Hrelvs,71720
|
12
12
|
honeybee_radiance_postprocess/type_hints.py,sha256=hn1Mro_RCm_6tf3ZZWeLesLY7_3vKvXPtrGWedfqyZs,898
|
13
13
|
honeybee_radiance_postprocess/util.py,sha256=ihUwSpMw-C2IkCgCOq5gVCOExa7idKZjWBWFKjfEv7I,5425
|
14
14
|
honeybee_radiance_postprocess/cli/__init__.py,sha256=4RkpR91GPXWatDE4I_27ce-N4FwolQoO6WO7H24DMXE,777
|
@@ -20,9 +20,9 @@ honeybee_radiance_postprocess/cli/schedule.py,sha256=OokuuH9_pdgkt2zFgfjBvrV2Fj1
|
|
20
20
|
honeybee_radiance_postprocess/cli/translate.py,sha256=tMyFcT80_NXhNIMH1Nn-10dRrk534NRl-_L-mK-0sHQ,4031
|
21
21
|
honeybee_radiance_postprocess/cli/two_phase.py,sha256=6zHRCIQBBEfG3ay1MJiCmAfDvUIvHREnUoX1iOZRZbI,3155
|
22
22
|
honeybee_radiance_postprocess/cli/util.py,sha256=Be9cGmYhcV2W37ma6SgQPCWCpWLLLlroxRYN_l58kY0,4077
|
23
|
-
honeybee_radiance_postprocess-0.4.
|
24
|
-
honeybee_radiance_postprocess-0.4.
|
25
|
-
honeybee_radiance_postprocess-0.4.
|
26
|
-
honeybee_radiance_postprocess-0.4.
|
27
|
-
honeybee_radiance_postprocess-0.4.
|
28
|
-
honeybee_radiance_postprocess-0.4.
|
23
|
+
honeybee_radiance_postprocess-0.4.185.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
24
|
+
honeybee_radiance_postprocess-0.4.185.dist-info/METADATA,sha256=OuZdQNjMBYgkyJvZbFYur7E2Tfq_juUATML0UDjUhvc,2229
|
25
|
+
honeybee_radiance_postprocess-0.4.185.dist-info/WHEEL,sha256=unfA4MOaH0icIyIA5oH6E2sn2Hq5zKtLlHsWapZGwes,110
|
26
|
+
honeybee_radiance_postprocess-0.4.185.dist-info/entry_points.txt,sha256=gFtVPx6UItXt27GfEZZO00eOZChJJEL6JwGSAB_O3rs,96
|
27
|
+
honeybee_radiance_postprocess-0.4.185.dist-info/top_level.txt,sha256=4-sFbzy7ewP2EDqJV3jeFlAFx7SuxtoBBELWaKAnLdA,30
|
28
|
+
honeybee_radiance_postprocess-0.4.185.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|