honeybee-radiance-postprocess 0.4.384__py2.py3-none-any.whl → 0.4.386__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/cli/abnt.py +20 -2
- honeybee_radiance_postprocess/cli/postprocess.py +7 -2
- honeybee_radiance_postprocess/leed.py +2 -2
- {honeybee_radiance_postprocess-0.4.384.dist-info → honeybee_radiance_postprocess-0.4.386.dist-info}/METADATA +1 -1
- {honeybee_radiance_postprocess-0.4.384.dist-info → honeybee_radiance_postprocess-0.4.386.dist-info}/RECORD +9 -9
- {honeybee_radiance_postprocess-0.4.384.dist-info → honeybee_radiance_postprocess-0.4.386.dist-info}/LICENSE +0 -0
- {honeybee_radiance_postprocess-0.4.384.dist-info → honeybee_radiance_postprocess-0.4.386.dist-info}/WHEEL +0 -0
- {honeybee_radiance_postprocess-0.4.384.dist-info → honeybee_radiance_postprocess-0.4.386.dist-info}/entry_points.txt +0 -0
- {honeybee_radiance_postprocess-0.4.384.dist-info → honeybee_radiance_postprocess-0.4.386.dist-info}/top_level.txt +0 -0
@@ -7,6 +7,7 @@ import click
|
|
7
7
|
import numpy as np
|
8
8
|
|
9
9
|
from honeybee.model import Model
|
10
|
+
from ladybug_geometry.geometry3d.face import Face3D
|
10
11
|
|
11
12
|
from ..vis_metadata import _abnt_nbr_15575_daylight_levels_vis_metadata
|
12
13
|
|
@@ -56,7 +57,8 @@ def abnt_nbr_15575(
|
|
56
57
|
return x1, x2, y1, y2
|
57
58
|
|
58
59
|
def get_value(x, y, x_coords, y_coords, values):
|
59
|
-
|
60
|
+
tolerance = 0.001
|
61
|
+
index = np.where((np.abs(x_coords - x) <= tolerance) & (np.abs(y_coords - y) <= tolerance))
|
60
62
|
return values[index][0]
|
61
63
|
|
62
64
|
def perform_interpolation(x, y, x_coords, y_coords, pit_values):
|
@@ -111,6 +113,7 @@ def abnt_nbr_15575(
|
|
111
113
|
metric_info_dict = _abnt_nbr_15575_daylight_levels_vis_metadata()
|
112
114
|
summary_output = {}
|
113
115
|
summary_rooms_output = {}
|
116
|
+
pof_sensor_grids = {}
|
114
117
|
for _subfolder in folder_names:
|
115
118
|
res_folder = folder.joinpath(_subfolder, 'results')
|
116
119
|
with open(res_folder.joinpath('grids_info.json')) as data_f:
|
@@ -125,7 +128,22 @@ def abnt_nbr_15575(
|
|
125
128
|
|
126
129
|
x_coords = sensor_points[:, 0]
|
127
130
|
y_coords = sensor_points[:, 1]
|
128
|
-
|
131
|
+
|
132
|
+
pof_sensor_grid = \
|
133
|
+
pof_sensor_grids.get(grid_info['full_id'], None)
|
134
|
+
# if pof is not calculated for this grid
|
135
|
+
if pof_sensor_grid is None:
|
136
|
+
faces_3d = [Face3D(face_vertices) for face_vertices in sensor_grid.mesh.face_vertices]
|
137
|
+
face_3d_union = Face3D.join_coplanar_faces(faces_3d, 0.05)
|
138
|
+
assert len(face_3d_union) == 1
|
139
|
+
if face_3d_union[0].is_convex:
|
140
|
+
centroid = face_3d_union[0].centroid
|
141
|
+
pof_sensor_grids[grid_info['full_id']] = (centroid.x, centroid.y)
|
142
|
+
else:
|
143
|
+
pof = face_3d_union[0].pole_of_inaccessibility(0.01)
|
144
|
+
pof_sensor_grids[grid_info['full_id']] = (pof.x, pof.y)
|
145
|
+
|
146
|
+
x, y = pof_sensor_grids[grid_info['full_id']]
|
129
147
|
f_xy = perform_interpolation(x, y, x_coords, y_coords, pit_values)
|
130
148
|
|
131
149
|
if f_xy >= 120:
|
@@ -770,7 +770,7 @@ def annual_metrics_file(
|
|
770
770
|
'--grids-info', '-gi', help='An optional JSON file with grid information. '
|
771
771
|
'If no file is provided the command will look for a file in the folder.',
|
772
772
|
default=None, show_default=True,
|
773
|
-
type=click.Path(exists=
|
773
|
+
type=click.Path(exists=False, file_okay=True, dir_okay=False, resolve_path=True)
|
774
774
|
)
|
775
775
|
@click.option(
|
776
776
|
'--name', '-n', help='Optional filename of grid summary.',
|
@@ -792,6 +792,9 @@ def grid_summary_metric(
|
|
792
792
|
):
|
793
793
|
"""Calculate a grid summary.
|
794
794
|
|
795
|
+
If the grids info file is omitted it is a requirement that there is a grids
|
796
|
+
info file in the main folder or in each sub folder.
|
797
|
+
|
795
798
|
\b
|
796
799
|
Args:
|
797
800
|
folder: A folder with results.
|
@@ -801,9 +804,11 @@ def grid_summary_metric(
|
|
801
804
|
folder = Path(folder)
|
802
805
|
|
803
806
|
# get grids information
|
804
|
-
if grids_info:
|
807
|
+
if grids_info and Path(grids_info).is_file():
|
805
808
|
with open(grids_info) as gi:
|
806
809
|
grids_info = json.load(gi)
|
810
|
+
else:
|
811
|
+
grids_info = None
|
807
812
|
|
808
813
|
# get grid metrics
|
809
814
|
if grid_metrics and Path(grid_metrics).is_file():
|
@@ -478,9 +478,9 @@ def leed_states_schedule(
|
|
478
478
|
(combination_array >= 1000).sum(axis=0) / grid_count
|
479
479
|
array_list_combinations.append(combination_percentage)
|
480
480
|
array_combinations = np.array(array_list_combinations)
|
481
|
-
array_combinations[array_combinations > 0.02] = np.
|
481
|
+
array_combinations[array_combinations > 0.02] = -np.inf
|
482
482
|
|
483
|
-
grid_comply = np.where(np.all(array_combinations
|
483
|
+
grid_comply = np.where(np.all(array_combinations==-np.inf, axis=0))[0]
|
484
484
|
if grid_comply.size != 0:
|
485
485
|
grid_comply = np.array(results.sun_up_hours)[grid_comply]
|
486
486
|
fail_to_comply[grid_info['name']] = \
|
@@ -7,18 +7,18 @@ honeybee_radiance_postprocess/dynamic.py,sha256=RPJh2SsjASYJCsG5QRkazVCvzWjzMxm9
|
|
7
7
|
honeybee_radiance_postprocess/electriclight.py,sha256=E7uhq7-YtZ02F9a1FbEdrXnxmYJNOFnfLF0Yw3JLQ-g,732
|
8
8
|
honeybee_radiance_postprocess/en17037.py,sha256=5c5ahfzad12FqMwBL7c0sLOKHzLKSTXtlYFfaNhzA3w,10848
|
9
9
|
honeybee_radiance_postprocess/helper.py,sha256=qz5kaJxzy1tGBfVYYXc2cEToOCoj0YLOtwjr3LVI3YU,9000
|
10
|
-
honeybee_radiance_postprocess/leed.py,sha256
|
10
|
+
honeybee_radiance_postprocess/leed.py,sha256=-TMQ8E5G2I5Vvt_ftLnsJUleodHwuA9wwYve4CAI0Jc,33461
|
11
11
|
honeybee_radiance_postprocess/metrics.py,sha256=6EHCuXf5jnhh6GglI9mTd0MFpfhfPFoKMf4b5gKRTMI,14038
|
12
12
|
honeybee_radiance_postprocess/reader.py,sha256=6myKzfGC1pO8zPixg1kKrKjPihHabTKUh2t5BlJvij0,2367
|
13
13
|
honeybee_radiance_postprocess/type_hints.py,sha256=4R0kZgacQrqzoh8Tq7f8MVzUDzynV-C_jlh80UV6GPE,1122
|
14
14
|
honeybee_radiance_postprocess/util.py,sha256=-J5k1dhvyYJkb42jvTS_xxtokfGbmcucVPXdMWU1jUk,5098
|
15
15
|
honeybee_radiance_postprocess/vis_metadata.py,sha256=darKbj987NXW72GNcTdKQmgqSTpeG39OBwEgbJGEgPw,1820
|
16
16
|
honeybee_radiance_postprocess/cli/__init__.py,sha256=4RkpR91GPXWatDE4I_27ce-N4FwolQoO6WO7H24DMXE,777
|
17
|
-
honeybee_radiance_postprocess/cli/abnt.py,sha256=
|
17
|
+
honeybee_radiance_postprocess/cli/abnt.py,sha256=fTMqgzuaZ6d7BE8CI4GWQBr1_r-qWhpay0cPdfrIoR4,9017
|
18
18
|
honeybee_radiance_postprocess/cli/grid.py,sha256=6peLEAPVe-iw05_wdRpFruZLqO8myvC-_QT5W1q5sk8,10677
|
19
19
|
honeybee_radiance_postprocess/cli/leed.py,sha256=QBR6AMJJWuZ0TevyMi2tXCWMLdS-ZSqtVTZDgqxwa7M,3112
|
20
20
|
honeybee_radiance_postprocess/cli/mtxop.py,sha256=UZJnjNpPjDmShy1-Mxos4H2vTUqk_yP3ZyaC1_LLFeI,5015
|
21
|
-
honeybee_radiance_postprocess/cli/postprocess.py,sha256=
|
21
|
+
honeybee_radiance_postprocess/cli/postprocess.py,sha256=CnUsIE3fWUZWLBeIjSW_wte9ptKKx-oaNDBGo63YHF4,39202
|
22
22
|
honeybee_radiance_postprocess/cli/schedule.py,sha256=6uIy98Co4zm-ZRcELo4Lfx_aN3lNiqPe-BSimXwt1F8,3877
|
23
23
|
honeybee_radiance_postprocess/cli/translate.py,sha256=18zkcGeRZALJ5Z82NEB3XZ-iEX2cHyneobGWV-IXWE0,6789
|
24
24
|
honeybee_radiance_postprocess/cli/two_phase.py,sha256=1nZF4jyZ_C7CAfiHCz1UUOEwDaB4yOXr9ga0HIrhOB0,7033
|
@@ -27,9 +27,9 @@ honeybee_radiance_postprocess/results/__init__.py,sha256=1agBQbfT4Tf8KqSZzlfKYX8
|
|
27
27
|
honeybee_radiance_postprocess/results/annual_daylight.py,sha256=o4Y5kbD3a4X4KRfsbOlWzgrnNKU365GcivM6qQGUGXU,31605
|
28
28
|
honeybee_radiance_postprocess/results/annual_irradiance.py,sha256=5zwrr4MNeHUebbSRpSBbscPOZUs2AHmYCQfIIbdYImY,8298
|
29
29
|
honeybee_radiance_postprocess/results/results.py,sha256=jkjsxTuvVfBus6tM2UjQE3ZKPooLInWEd2guqO61v9E,53600
|
30
|
-
honeybee_radiance_postprocess-0.4.
|
31
|
-
honeybee_radiance_postprocess-0.4.
|
32
|
-
honeybee_radiance_postprocess-0.4.
|
33
|
-
honeybee_radiance_postprocess-0.4.
|
34
|
-
honeybee_radiance_postprocess-0.4.
|
35
|
-
honeybee_radiance_postprocess-0.4.
|
30
|
+
honeybee_radiance_postprocess-0.4.386.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
31
|
+
honeybee_radiance_postprocess-0.4.386.dist-info/METADATA,sha256=mibJFiUmFDj_C-lHUaMlsFb9mdaCmFwEEHE8TA2pVak,2245
|
32
|
+
honeybee_radiance_postprocess-0.4.386.dist-info/WHEEL,sha256=unfA4MOaH0icIyIA5oH6E2sn2Hq5zKtLlHsWapZGwes,110
|
33
|
+
honeybee_radiance_postprocess-0.4.386.dist-info/entry_points.txt,sha256=gFtVPx6UItXt27GfEZZO00eOZChJJEL6JwGSAB_O3rs,96
|
34
|
+
honeybee_radiance_postprocess-0.4.386.dist-info/top_level.txt,sha256=4-sFbzy7ewP2EDqJV3jeFlAFx7SuxtoBBELWaKAnLdA,30
|
35
|
+
honeybee_radiance_postprocess-0.4.386.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|