honeybee-radiance-postprocess 0.4.421__py2.py3-none-any.whl → 0.4.423__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/leed.py +19 -5
- honeybee_radiance_postprocess/cli/postprocess.py +1 -1
- honeybee_radiance_postprocess/leed/leed.py +7 -3
- honeybee_radiance_postprocess/leed/leed_schedule.py +4 -3
- honeybee_radiance_postprocess/results/results.py +13 -8
- {honeybee_radiance_postprocess-0.4.421.dist-info → honeybee_radiance_postprocess-0.4.423.dist-info}/METADATA +2 -2
- {honeybee_radiance_postprocess-0.4.421.dist-info → honeybee_radiance_postprocess-0.4.423.dist-info}/RECORD +11 -11
- {honeybee_radiance_postprocess-0.4.421.dist-info → honeybee_radiance_postprocess-0.4.423.dist-info}/LICENSE +0 -0
- {honeybee_radiance_postprocess-0.4.421.dist-info → honeybee_radiance_postprocess-0.4.423.dist-info}/WHEEL +0 -0
- {honeybee_radiance_postprocess-0.4.421.dist-info → honeybee_radiance_postprocess-0.4.423.dist-info}/entry_points.txt +0 -0
- {honeybee_radiance_postprocess-0.4.421.dist-info → honeybee_radiance_postprocess-0.4.423.dist-info}/top_level.txt +0 -0
@@ -28,24 +28,32 @@ def leed():
|
|
28
28
|
@click.option(
|
29
29
|
'--shade-transmittance', '-st', help='A value to use as a multiplier in place of '
|
30
30
|
'solar shading. Value for shade transmittance must be 1 > value > 0.',
|
31
|
-
default=0.
|
31
|
+
default=0.02, show_default=True, type=click.FLOAT
|
32
32
|
)
|
33
33
|
@click.option(
|
34
34
|
'--shade-transmittance-file', '-stf', help='A JSON file with a dictionary '
|
35
35
|
'where aperture groups are keys, and the value for each key is the shade '
|
36
36
|
'transmittance. Values for shade transmittance must be 1 > value > 0. '
|
37
37
|
'If any aperture groups are missing in the JSON file, its shade transmittance '
|
38
|
-
'value will be set to the value of the shade
|
38
|
+
'value will be set to the value of the --shade-transmittance option (0.02 by '
|
39
39
|
'default).', default=None, show_default=True,
|
40
40
|
type=click.Path(exists=False, file_okay=True, dir_okay=False, resolve_path=True)
|
41
41
|
)
|
42
|
+
@click.option(
|
43
|
+
'--use-shade-transmittance/--use-states', help='A flag to select if the '
|
44
|
+
'post-processing should use a shade transmittance or the simulated states '
|
45
|
+
'of aperture groups. Using states should only be selected if the annual '
|
46
|
+
'daylight simulation included ray tracing of a second (blind) state for '
|
47
|
+
'each aperture group.',
|
48
|
+
is_flag=True, default=True, show_default=True
|
49
|
+
)
|
42
50
|
@click.option(
|
43
51
|
'--sub-folder', '-sf', help='Relative path for subfolder to write output '
|
44
52
|
'files.', default='leed_summary', show_default=True
|
45
53
|
)
|
46
54
|
def daylight_option_one(
|
47
55
|
folder, shade_transmittance, shade_transmittance_file, grids_filter,
|
48
|
-
sub_folder
|
56
|
+
use_shade_transmittance, sub_folder
|
49
57
|
):
|
50
58
|
"""Calculate credits for LEED v4.1 Daylight Option 1.
|
51
59
|
|
@@ -60,7 +68,12 @@ def daylight_option_one(
|
|
60
68
|
folder: Results folder. This folder is an output folder of annual daylight
|
61
69
|
recipe. The daylight simulation must include aperture groups.
|
62
70
|
"""
|
63
|
-
|
71
|
+
use_states = not use_shade_transmittance
|
72
|
+
if (
|
73
|
+
shade_transmittance_file
|
74
|
+
and os.path.isfile(shade_transmittance_file)
|
75
|
+
and use_shade_transmittance
|
76
|
+
):
|
64
77
|
with open(shade_transmittance_file) as json_file:
|
65
78
|
shd_trans = json.load(json_file)
|
66
79
|
results = AnnualDaylight(folder)
|
@@ -73,7 +86,8 @@ def daylight_option_one(
|
|
73
86
|
try:
|
74
87
|
leed_option_one(
|
75
88
|
folder, grids_filter=grids_filter,
|
76
|
-
shade_transmittance=shade_transmittance,
|
89
|
+
shade_transmittance=shade_transmittance, use_states=use_states,
|
90
|
+
sub_folder=sub_folder
|
77
91
|
)
|
78
92
|
except Exception:
|
79
93
|
_logger.exception('Failed to generate LEED summary.')
|
@@ -567,7 +567,7 @@ def point_in_time(
|
|
567
567
|
default=1000, type=float, show_default=True
|
568
568
|
)
|
569
569
|
@click.option(
|
570
|
-
'--
|
570
|
+
'--occ-hours', '-oh', help='The number of occupied hours that cannot '
|
571
571
|
'receive more than the direct_threshold.', default=250, type=int,
|
572
572
|
show_default=True
|
573
573
|
)
|
@@ -563,9 +563,10 @@ def leed_option_one(
|
|
563
563
|
# combine total array for all light paths
|
564
564
|
if use_states:
|
565
565
|
array = results._array_from_states(grid_info, states=states_schedule)
|
566
|
-
|
566
|
+
array = np.apply_along_axis(filter_array, 1, array, occ_mask)
|
567
567
|
|
568
568
|
for light_path in light_paths:
|
569
|
+
# do an extra pass to calculate with blinds always up or down
|
569
570
|
array_blinds_up = results._get_array(
|
570
571
|
grid_info, light_path, state=0, res_type='total')
|
571
572
|
array_filter = np.apply_along_axis(
|
@@ -578,7 +579,8 @@ def leed_option_one(
|
|
578
579
|
arrays_blinds_down.append(array_filter)
|
579
580
|
else:
|
580
581
|
for light_path in light_paths:
|
581
|
-
array = results._get_array(
|
582
|
+
array = results._get_array(
|
583
|
+
grid_info, light_path, res_type='total')
|
582
584
|
array_filter = np.apply_along_axis(
|
583
585
|
filter_array, 1, array, occ_mask)
|
584
586
|
if light_path != '__static_apertures__':
|
@@ -587,12 +589,14 @@ def leed_option_one(
|
|
587
589
|
shd_trans_array = shd_trans_array[occ_mask.astype(bool)]
|
588
590
|
arrays.append(array_filter * shd_trans_array)
|
589
591
|
arrays_blinds_up.append(array_filter)
|
590
|
-
arrays_blinds_down.append(
|
592
|
+
arrays_blinds_down.append(
|
593
|
+
array_filter * shd_trans_dict[light_path])
|
591
594
|
else:
|
592
595
|
arrays.append(array_filter)
|
593
596
|
arrays_blinds_up.append(array_filter)
|
594
597
|
arrays_blinds_down.append(array_filter)
|
595
598
|
array = sum(arrays)
|
599
|
+
|
596
600
|
array_blinds_up = sum(arrays_blinds_up)
|
597
601
|
array_blinds_down = sum(arrays_blinds_down)
|
598
602
|
# calculate da per grid
|
@@ -208,7 +208,7 @@ def states_schedule_descending(
|
|
208
208
|
|
209
209
|
# Use advanced indexing to replace values in new_array for these hours
|
210
210
|
for hour_idx, array_idx in zip(replace_indices, array_indices):
|
211
|
-
new_array[
|
211
|
+
new_array[array_idx, :, hour_idx] = full_direct_blinds[
|
212
212
|
array_idx, :, hour_idx
|
213
213
|
]
|
214
214
|
|
@@ -223,8 +223,9 @@ def states_schedule_descending(
|
|
223
223
|
combinations.append(hour_dict)
|
224
224
|
|
225
225
|
final_summed_array = np.sum(new_array, axis=0)
|
226
|
-
final_percentage_sensors_summed =
|
227
|
-
final_summed_array >= 1000
|
226
|
+
final_percentage_sensors_summed = (
|
227
|
+
final_summed_array >= 1000).sum(
|
228
|
+
axis=0) / grid_count
|
228
229
|
final_indices_above_2_percent = np.where(
|
229
230
|
final_percentage_sensors_summed > 0.02)[0]
|
230
231
|
if np.any(final_indices_above_2_percent):
|
@@ -1221,7 +1221,6 @@ class Results(_ResultsFolder):
|
|
1221
1221
|
Returns:
|
1222
1222
|
A NumPy array based on the states settings.
|
1223
1223
|
"""
|
1224
|
-
grid_count = grid_info['count']
|
1225
1224
|
# get states that are relevant for the grid
|
1226
1225
|
states = self._filter_grid_states(grid_info, states=states)
|
1227
1226
|
|
@@ -1229,29 +1228,35 @@ class Results(_ResultsFolder):
|
|
1229
1228
|
for light_path, gr_schedule in states.dynamic_schedule.items():
|
1230
1229
|
if gr_schedule.is_static:
|
1231
1230
|
state = gr_schedule.schedule[0]
|
1231
|
+
# if state is -1 we continue since it is "turned off"
|
1232
1232
|
if state == -1:
|
1233
1233
|
continue
|
1234
|
+
# load static array (state is static)
|
1234
1235
|
array = self._get_array(
|
1235
1236
|
grid_info, light_path, state=state, res_type=res_type)
|
1236
1237
|
arrays.append(array)
|
1237
1238
|
else:
|
1238
|
-
# create default 0 array
|
1239
|
-
array = np.zeros((
|
1239
|
+
# create default 0 array, we will add to this later
|
1240
|
+
array = np.zeros((grid_info['count'], len(self.sun_up_hours)))
|
1240
1241
|
# slice states to match sun up hours
|
1241
|
-
states_array = np.array(gr_schedule.schedule)[
|
1242
|
-
|
1242
|
+
states_array = np.array(gr_schedule.schedule)[
|
1243
|
+
list(map(int, self.sun_up_hours))]
|
1244
|
+
for state in np.unique(states_array):
|
1243
1245
|
if state == -1:
|
1246
|
+
# if state is -1 we continue since it is "turned off"
|
1244
1247
|
continue
|
1248
|
+
# load static array (state is static)
|
1245
1249
|
_array = self._get_array(
|
1246
1250
|
grid_info, light_path, state=state, res_type=res_type)
|
1247
|
-
|
1248
|
-
|
1251
|
+
# get indices and add values to base array
|
1252
|
+
states_indicies = states_array == state
|
1253
|
+
array[:, states_indicies] += _array[:, states_indicies]
|
1249
1254
|
arrays.append(array)
|
1250
1255
|
array = sum(arrays)
|
1251
1256
|
|
1252
1257
|
if not np.any(array):
|
1253
1258
|
if zero_array:
|
1254
|
-
array = np.zeros((
|
1259
|
+
array = np.zeros((grid_info['count'], len(self.sun_up_hours)))
|
1255
1260
|
else:
|
1256
1261
|
array = np.array([])
|
1257
1262
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: honeybee-radiance-postprocess
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.423
|
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.66.
|
16
|
+
Requires-Dist: honeybee-radiance (==1.66.95)
|
17
17
|
Requires-Dist: numpy (>=1.21.6)
|
18
18
|
|
19
19
|
[](https://github.com/ladybug-tools/honeybee-radiance-postprocess/actions)
|
@@ -16,24 +16,24 @@ honeybee_radiance_postprocess/vis_metadata.py,sha256=7ywIgdiuNKcctxifhpy7-Q2oaSX
|
|
16
16
|
honeybee_radiance_postprocess/cli/__init__.py,sha256=PVfwkuPFl4TnvQt8ovVm01JK0Alon81BaY-0tshAXyg,795
|
17
17
|
honeybee_radiance_postprocess/cli/abnt.py,sha256=GNLmVVrEQ-1oKr5ZmBllY-KODhgJPjLVidQ_dQMcpFk,15537
|
18
18
|
honeybee_radiance_postprocess/cli/grid.py,sha256=6peLEAPVe-iw05_wdRpFruZLqO8myvC-_QT5W1q5sk8,10677
|
19
|
-
honeybee_radiance_postprocess/cli/leed.py,sha256=
|
19
|
+
honeybee_radiance_postprocess/cli/leed.py,sha256=bxGX2UBehYNcaPJWHL2yEasSP6dATD7B0aNNQOflqqM,3712
|
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=pzZ419eBt_LNNilW1y47c4lGTFxmV7cJyWnjV78GzY8,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=xA6ayPv26DM5fuMkLhBMYGklf_j5ymowmncwJGXRgo8,7034
|
25
25
|
honeybee_radiance_postprocess/cli/util.py,sha256=Be9cGmYhcV2W37ma6SgQPCWCpWLLLlroxRYN_l58kY0,4077
|
26
26
|
honeybee_radiance_postprocess/cli/viewfactor.py,sha256=kU36YRzLya5PReYREjTfw3zOcWKHYZjVlVclyuR7Cqk,5245
|
27
27
|
honeybee_radiance_postprocess/leed/__init__.py,sha256=kQXElEqFnLGNnrMSpA51XDHoqBup849FHeAqWASIy6w,45
|
28
|
-
honeybee_radiance_postprocess/leed/leed.py,sha256=
|
29
|
-
honeybee_radiance_postprocess/leed/leed_schedule.py,sha256=
|
28
|
+
honeybee_radiance_postprocess/leed/leed.py,sha256=rbvhq51Dfhx4aZFcKWqOXp3FfgFy5YDRkHYn9wKHQpc,32631
|
29
|
+
honeybee_radiance_postprocess/leed/leed_schedule.py,sha256=s3by1sv1DtOlCawvaMvnIDvEo5D8ATEJvWQ_rEeJIHg,9956
|
30
30
|
honeybee_radiance_postprocess/results/__init__.py,sha256=1agBQbfT4Tf8KqSZzlfKYX8MeZryY4jJ1KB4HWqaDDk,182
|
31
31
|
honeybee_radiance_postprocess/results/annual_daylight.py,sha256=11d4J1iIuITKuoWyWa-2_2WdrHYBULC0YP-mWBWi4JQ,34724
|
32
32
|
honeybee_radiance_postprocess/results/annual_irradiance.py,sha256=5zwrr4MNeHUebbSRpSBbscPOZUs2AHmYCQfIIbdYImY,8298
|
33
|
-
honeybee_radiance_postprocess/results/results.py,sha256=
|
34
|
-
honeybee_radiance_postprocess-0.4.
|
35
|
-
honeybee_radiance_postprocess-0.4.
|
36
|
-
honeybee_radiance_postprocess-0.4.
|
37
|
-
honeybee_radiance_postprocess-0.4.
|
38
|
-
honeybee_radiance_postprocess-0.4.
|
39
|
-
honeybee_radiance_postprocess-0.4.
|
33
|
+
honeybee_radiance_postprocess/results/results.py,sha256=ABb_S8kDPruhGkDsfREXMg6K0p8FRhAZ3QIRUZCQPAI,54888
|
34
|
+
honeybee_radiance_postprocess-0.4.423.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
35
|
+
honeybee_radiance_postprocess-0.4.423.dist-info/METADATA,sha256=fxcEXDXTt5ta8X6jQQNJHtNAY6qfEnRgMq0UHj0sMtw,2245
|
36
|
+
honeybee_radiance_postprocess-0.4.423.dist-info/WHEEL,sha256=unfA4MOaH0icIyIA5oH6E2sn2Hq5zKtLlHsWapZGwes,110
|
37
|
+
honeybee_radiance_postprocess-0.4.423.dist-info/entry_points.txt,sha256=gFtVPx6UItXt27GfEZZO00eOZChJJEL6JwGSAB_O3rs,96
|
38
|
+
honeybee_radiance_postprocess-0.4.423.dist-info/top_level.txt,sha256=4-sFbzy7ewP2EDqJV3jeFlAFx7SuxtoBBELWaKAnLdA,30
|
39
|
+
honeybee_radiance_postprocess-0.4.423.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|