honeybee-radiance-postprocess 0.4.497__py2.py3-none-any.whl → 0.4.499__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/breeam/breeam.py +30 -9
- honeybee_radiance_postprocess/cli/breeam.py +1 -1
- honeybee_radiance_postprocess/cli/leed.py +47 -0
- honeybee_radiance_postprocess/leed/leed.py +21 -0
- honeybee_radiance_postprocess/metrics.py +7 -2
- {honeybee_radiance_postprocess-0.4.497.dist-info → honeybee_radiance_postprocess-0.4.499.dist-info}/METADATA +1 -1
- {honeybee_radiance_postprocess-0.4.497.dist-info → honeybee_radiance_postprocess-0.4.499.dist-info}/RECORD +11 -11
- {honeybee_radiance_postprocess-0.4.497.dist-info → honeybee_radiance_postprocess-0.4.499.dist-info}/LICENSE +0 -0
- {honeybee_radiance_postprocess-0.4.497.dist-info → honeybee_radiance_postprocess-0.4.499.dist-info}/WHEEL +0 -0
- {honeybee_radiance_postprocess-0.4.497.dist-info → honeybee_radiance_postprocess-0.4.499.dist-info}/entry_points.txt +0 -0
- {honeybee_radiance_postprocess-0.4.497.dist-info → honeybee_radiance_postprocess-0.4.499.dist-info}/top_level.txt +0 -0
@@ -360,7 +360,7 @@ def breeam_daylight_assessment_4b(
|
|
360
360
|
if program_type is None:
|
361
361
|
continue
|
362
362
|
if program_type not in type_summary:
|
363
|
-
type_summary[program_type] = {}
|
363
|
+
type_summary[program_type] = {} # add dict for program type
|
364
364
|
type_summary[program_type][grid_info['full_id']] = []
|
365
365
|
|
366
366
|
array = results._array_from_states(grid_info, zero_array=True)
|
@@ -374,33 +374,36 @@ def breeam_daylight_assessment_4b(
|
|
374
374
|
metrics_summary['area'] = grid_areas[grid_info['full_id']]
|
375
375
|
# calculate number of hours where avg. illuminance > target illuminance
|
376
376
|
target_ill = metrics['average_daylight_illuminance']['illuminance']
|
377
|
-
|
377
|
+
hrs_abv_avg = (avg_ill >= target_ill).sum()
|
378
378
|
# check if value is >= target hours
|
379
379
|
target_hrs = metrics['average_daylight_illuminance']['hours']
|
380
|
-
avg_comply =
|
380
|
+
avg_comply = hrs_abv_avg >= target_hrs
|
381
381
|
|
382
382
|
# calculate number of hours where illuminance > target illuminance
|
383
383
|
if program_type == 'BREEAM::Prison_buildings::Cells_and_custody_cells':
|
384
|
-
|
384
|
+
min_comply = True # no minimum daylight illuminance for this space
|
385
385
|
else:
|
386
386
|
target_ill = metrics['minimum_daylight_illuminance']['illuminance']
|
387
387
|
hrs_abv_target = (array >= target_ill).sum(axis=1)
|
388
388
|
# get the minimum, i.e., worst lit point
|
389
|
-
|
389
|
+
hrs_abv_min = np.min(hrs_abv_target)
|
390
390
|
# check if values is >= target hours
|
391
391
|
target_hrs = metrics['minimum_daylight_illuminance']['hours']
|
392
|
-
|
392
|
+
min_comply = hrs_abv_min >= target_hrs
|
393
393
|
|
394
394
|
metrics_summary['credits'] = metrics['credits']
|
395
|
-
if avg_comply and
|
395
|
+
if avg_comply and min_comply:
|
396
396
|
metrics_summary['comply'] = True
|
397
397
|
else:
|
398
398
|
metrics_summary['comply'] = False
|
399
399
|
metrics_summary['average-comply'] = True if avg_comply else False
|
400
|
-
metrics_summary['minimum-comply'] = True if
|
401
|
-
|
400
|
+
metrics_summary['minimum-comply'] = True if min_comply else False
|
401
|
+
|
402
402
|
metrics_summary['count'] = grid_info['count']
|
403
403
|
|
404
|
+
metrics_summary['average-illuminance-hours'] = hrs_abv_avg
|
405
|
+
metrics_summary['minimum-illuminance-hours'] = hrs_abv_min
|
406
|
+
|
404
407
|
type_summary[program_type][grid_info['full_id']].append(metrics_summary)
|
405
408
|
|
406
409
|
program_summary = []
|
@@ -448,6 +451,24 @@ def breeam_daylight_assessment_4b(
|
|
448
451
|
program_type_summary['area_comply_%'] = metric_summary['area_comply_%']
|
449
452
|
program_type_summary['type'] = metric_summary['type']
|
450
453
|
|
454
|
+
avg_hrs, min_hrs, areas = [], [], []
|
455
|
+
for grid_id, metrics_list in grid_summary.items():
|
456
|
+
for metric in metrics_list:
|
457
|
+
areas.append(metric['area'])
|
458
|
+
avg_hrs.append(metric['average-illuminance-hours'])
|
459
|
+
min_hrs.append(metric['minimum-illuminance-hours'])
|
460
|
+
break # only need to get the first one
|
461
|
+
|
462
|
+
area_proportions = np.array(areas) / program_type_summary['total_area']
|
463
|
+
|
464
|
+
weighted_hours_avg = area_proportions * np.array(avg_hrs)
|
465
|
+
total_weighted_hours_avg = np.sum(weighted_hours_avg)
|
466
|
+
program_type_summary['average-illuminance-hours'] = total_weighted_hours_avg
|
467
|
+
|
468
|
+
weighted_hours_min = area_proportions * np.array(min_hrs)
|
469
|
+
total_weighted_hours_min = np.sum(weighted_hours_min)
|
470
|
+
program_type_summary['minimum-illuminance-hours'] = total_weighted_hours_min
|
471
|
+
|
451
472
|
program_summary.append(program_type_summary)
|
452
473
|
|
453
474
|
building_type_summary = {}
|
@@ -61,7 +61,7 @@ def breeam_4b(
|
|
61
61
|
)
|
62
62
|
def breeam_4b_vis(output_folder):
|
63
63
|
"""Write visualization metadata files for BREEAM 4b."""
|
64
|
-
colors = [Color(220, 0, 0), Color(
|
64
|
+
colors = [Color(220, 0, 0), Color(220, 110, 25), Color(255, 190, 0), Color(0, 220, 0)]
|
65
65
|
pass_fail_lpar = \
|
66
66
|
LegendParameters(min=0, max=3, colors=colors, segment_count=4, title='Pass/Fail')
|
67
67
|
pass_fail_lpar.ordinal_dictionary = {
|
@@ -5,6 +5,10 @@ import logging
|
|
5
5
|
import os
|
6
6
|
import click
|
7
7
|
|
8
|
+
from ladybug.color import Color
|
9
|
+
from ladybug.datatype.generic import GenericType
|
10
|
+
from ladybug.legend import LegendParameters
|
11
|
+
|
8
12
|
from ..leed.leed import leed_option_one
|
9
13
|
from ..results.annual_daylight import AnnualDaylight
|
10
14
|
|
@@ -94,3 +98,46 @@ def daylight_option_one(
|
|
94
98
|
sys.exit(1)
|
95
99
|
else:
|
96
100
|
sys.exit(0)
|
101
|
+
|
102
|
+
|
103
|
+
@leed.command('leed-daylight-option-one-vis-metadata')
|
104
|
+
@click.option(
|
105
|
+
'--output-folder', '-o', help='Output folder for vis metadata files.',
|
106
|
+
type=click.Path(exists=False, file_okay=False, dir_okay=True, resolve_path=True),
|
107
|
+
default='visualization', show_default=True
|
108
|
+
)
|
109
|
+
def leed_daylight_optione_one_vis(output_folder):
|
110
|
+
"""Write visualization metadata files for LEED Daylight Option I."""
|
111
|
+
colors = [Color(220, 0, 0), Color(0, 220, 0)]
|
112
|
+
pass_fail_lpar = \
|
113
|
+
LegendParameters(min=0, max=1, colors=colors, segment_count=2, title='Pass/Fail')
|
114
|
+
pass_fail_lpar.ordinal_dictionary = {0: "Fail", 1: "Pass"}
|
115
|
+
|
116
|
+
metric_info_dict = {
|
117
|
+
'DA': {
|
118
|
+
'type': 'VisualizationMetaData',
|
119
|
+
'data_type': GenericType('DA300,50%', '').to_dict(),
|
120
|
+
'unit': '',
|
121
|
+
'legend_parameters': pass_fail_lpar.to_dict()
|
122
|
+
},
|
123
|
+
'ASE': {
|
124
|
+
'type': 'VisualizationMetaData',
|
125
|
+
'data_type': GenericType('ASE1000,250hrs', '').to_dict(),
|
126
|
+
'unit': '',
|
127
|
+
'legend_parameters': pass_fail_lpar.to_dict()
|
128
|
+
}
|
129
|
+
}
|
130
|
+
try:
|
131
|
+
if not os.path.exists(output_folder):
|
132
|
+
os.mkdir(output_folder)
|
133
|
+
for metric, data in metric_info_dict.items():
|
134
|
+
if not os.path.exists(os.path.join(output_folder, metric)):
|
135
|
+
os.mkdir(os.path.join(output_folder, metric))
|
136
|
+
file_path = os.path.join(output_folder, metric, 'vis_metadata.json')
|
137
|
+
with open(file_path, 'w') as fp:
|
138
|
+
json.dump(data, fp, indent=4)
|
139
|
+
except Exception:
|
140
|
+
_logger.exception('Failed to write the visualization metadata files.')
|
141
|
+
sys.exit(1)
|
142
|
+
else:
|
143
|
+
sys.exit(0)
|
@@ -740,6 +740,27 @@ def leed_option_one(
|
|
740
740
|
folder.joinpath('states_schedule_err.json')
|
741
741
|
states_schedule_err_file.write_text(json.dumps(fail_to_comply))
|
742
742
|
|
743
|
+
pf_folder = folder.joinpath('pass_fail')
|
744
|
+
pf_folder.mkdir(parents=True, exist_ok=True)
|
745
|
+
for pass_sda_grid, pass_ase_grid, grid_info in zip(
|
746
|
+
pass_sda_grids, pass_ase_grids, grids_info):
|
747
|
+
grid_id = grid_info['full_id']
|
748
|
+
da_pf_folder = pf_folder.joinpath('DA')
|
749
|
+
da_pf_folder.mkdir(parents=True, exist_ok=True)
|
750
|
+
da_pf_file = da_pf_folder.joinpath(f'{grid_id}.pf')
|
751
|
+
pass_sda_grid = pass_sda_grid.astype(int)
|
752
|
+
np.savetxt(da_pf_file, pass_sda_grid, fmt='%d')
|
753
|
+
grids_info_file = da_pf_folder.joinpath('grids_info.json')
|
754
|
+
grids_info_file.write_text(json.dumps(grids_info, indent=2))
|
755
|
+
|
756
|
+
ase_pf_folder = pf_folder.joinpath('ASE')
|
757
|
+
ase_pf_folder.mkdir(parents=True, exist_ok=True)
|
758
|
+
ase_pf_file = ase_pf_folder.joinpath(f'{grid_id}.pf')
|
759
|
+
pass_ase_grid = pass_ase_grid.astype(int)
|
760
|
+
np.savetxt(ase_pf_file, pass_ase_grid, fmt='%d')
|
761
|
+
grids_info_file = ase_pf_folder.joinpath('grids_info.json')
|
762
|
+
grids_info_file.write_text(json.dumps(grids_info, indent=2))
|
763
|
+
|
743
764
|
return (summary, summary_grid, da_grids, hours_above, states_schedule,
|
744
765
|
fail_to_comply, grids_info)
|
745
766
|
|
@@ -295,11 +295,16 @@ def ase_array2d(
|
|
295
295
|
Defaults to 1000.
|
296
296
|
|
297
297
|
Returns:
|
298
|
-
A
|
298
|
+
A Tuple with two values.
|
299
|
+
|
300
|
+
- ase: NumPy float of the ASE as a percentage (decimal).
|
301
|
+
|
302
|
+
- h_above: 1D NumPy array of the number of hours above the direct
|
303
|
+
threshold.
|
299
304
|
"""
|
300
305
|
check_array_dim(array, 2)
|
301
306
|
h_above = (array > direct_threshold).sum(axis=1)
|
302
|
-
ase = (h_above
|
307
|
+
ase = (h_above >= occ_hours).sum() / array.shape[0] * 100
|
303
308
|
|
304
309
|
return ase, h_above
|
305
310
|
|
@@ -8,19 +8,19 @@ honeybee_radiance_postprocess/dynamic.py,sha256=RPJh2SsjASYJCsG5QRkazVCvzWjzMxm9
|
|
8
8
|
honeybee_radiance_postprocess/electriclight.py,sha256=E7uhq7-YtZ02F9a1FbEdrXnxmYJNOFnfLF0Yw3JLQ-g,732
|
9
9
|
honeybee_radiance_postprocess/en17037.py,sha256=h3W1ewnVsLSBamArowMkQKYaJfpKV8updJxQuTkB31k,10800
|
10
10
|
honeybee_radiance_postprocess/helper.py,sha256=qz5kaJxzy1tGBfVYYXc2cEToOCoj0YLOtwjr3LVI3YU,9000
|
11
|
-
honeybee_radiance_postprocess/metrics.py,sha256=
|
11
|
+
honeybee_radiance_postprocess/metrics.py,sha256=yrUbdUfqQHWr2lGPhG9BRtG7eHbEaOrrjH9kAkL-6RA,14180
|
12
12
|
honeybee_radiance_postprocess/reader.py,sha256=p4A91amyCI16lRRn0bhZdInsg-qJV0Jas3v4YVhRx-4,2674
|
13
13
|
honeybee_radiance_postprocess/type_hints.py,sha256=4R0kZgacQrqzoh8Tq7f8MVzUDzynV-C_jlh80UV6GPE,1122
|
14
14
|
honeybee_radiance_postprocess/util.py,sha256=uxqop4TsUMp8l8iLQf784NJINprHCgj00GZHvTth1C0,5603
|
15
15
|
honeybee_radiance_postprocess/vis_metadata.py,sha256=7ywIgdiuNKcctxifhpy7-Q2oaSX2ngQBeA0Kh7q1Gg0,1780
|
16
16
|
honeybee_radiance_postprocess/breeam/__init__.py,sha256=kQXElEqFnLGNnrMSpA51XDHoqBup849FHeAqWASIy6w,45
|
17
|
-
honeybee_radiance_postprocess/breeam/breeam.py,sha256=
|
17
|
+
honeybee_radiance_postprocess/breeam/breeam.py,sha256=Na0zthVdka2j5_NiIdl0aqlB4866sOgoePWIhKCdm5s,19364
|
18
18
|
honeybee_radiance_postprocess/cli/__init__.py,sha256=_mYHnIOpH0qJ4QK56SB3qUT2Duuts2GR2U_0t_uE-2s,958
|
19
19
|
honeybee_radiance_postprocess/cli/abnt.py,sha256=RmEjhxdEK6Uks3S10rQs6n8cup9qv036qRwh_wj1taA,15705
|
20
|
-
honeybee_radiance_postprocess/cli/breeam.py,sha256
|
20
|
+
honeybee_radiance_postprocess/cli/breeam.py,sha256=-mkQDUgFksfPiZwMgbp4i-qh2PYzl-hGc7LFmsVpS90,3144
|
21
21
|
honeybee_radiance_postprocess/cli/datacollection.py,sha256=Wb3UX03uW4OUZP7jWHftKfdf3aO_FSXjrnrziR3taf0,4541
|
22
22
|
honeybee_radiance_postprocess/cli/grid.py,sha256=gqnU3-HdggWCUg9mA1RLZJYHM7tH0v6r2E_X2SSkAig,11256
|
23
|
-
honeybee_radiance_postprocess/cli/leed.py,sha256=
|
23
|
+
honeybee_radiance_postprocess/cli/leed.py,sha256=vup_tVcSnSO5R7U_WPVDAhtSSRrPzTUgV4j9lyxvxEk,5546
|
24
24
|
honeybee_radiance_postprocess/cli/merge.py,sha256=oOqqud3VSo-3f3coDoUILcp78OI4DKxXLWCS1bi3PC4,5752
|
25
25
|
honeybee_radiance_postprocess/cli/mtxop.py,sha256=UZJnjNpPjDmShy1-Mxos4H2vTUqk_yP3ZyaC1_LLFeI,5015
|
26
26
|
honeybee_radiance_postprocess/cli/postprocess.py,sha256=ZN7G79gDq3Dag2vUwliFWxxZp-gk3ON2sIm9RSwCXDw,39317
|
@@ -34,7 +34,7 @@ honeybee_radiance_postprocess/ies/__init__.py,sha256=kQXElEqFnLGNnrMSpA51XDHoqBu
|
|
34
34
|
honeybee_radiance_postprocess/ies/lm.py,sha256=6f1LDiAWGEX7IvU8OavGC6POlXpgpYp_QFBCHhowo0s,9370
|
35
35
|
honeybee_radiance_postprocess/ies/lm_schedule.py,sha256=ci58GXq2PntJ4yNUdI_x4UCRmq6KrLes-u7GeboX058,9954
|
36
36
|
honeybee_radiance_postprocess/leed/__init__.py,sha256=kQXElEqFnLGNnrMSpA51XDHoqBup849FHeAqWASIy6w,45
|
37
|
-
honeybee_radiance_postprocess/leed/leed.py,sha256
|
37
|
+
honeybee_radiance_postprocess/leed/leed.py,sha256=-oHi5dxPeJQaWBL7BKyK_ZxxMehQuoVcgQyWMQdq8EA,35383
|
38
38
|
honeybee_radiance_postprocess/leed/leed_schedule.py,sha256=s3by1sv1DtOlCawvaMvnIDvEo5D8ATEJvWQ_rEeJIHg,9956
|
39
39
|
honeybee_radiance_postprocess/results/__init__.py,sha256=1agBQbfT4Tf8KqSZzlfKYX8MeZryY4jJ1KB4HWqaDDk,182
|
40
40
|
honeybee_radiance_postprocess/results/annual_daylight.py,sha256=11d4J1iIuITKuoWyWa-2_2WdrHYBULC0YP-mWBWi4JQ,34724
|
@@ -42,9 +42,9 @@ honeybee_radiance_postprocess/results/annual_irradiance.py,sha256=5zwrr4MNeHUebb
|
|
42
42
|
honeybee_radiance_postprocess/results/results.py,sha256=8wpxu6HBnrJXRoTkI7ucNuzhVmNKw1Z2zPP6wzk7ULQ,55236
|
43
43
|
honeybee_radiance_postprocess/well/__init__.py,sha256=kQXElEqFnLGNnrMSpA51XDHoqBup849FHeAqWASIy6w,45
|
44
44
|
honeybee_radiance_postprocess/well/well.py,sha256=Fs81hs5e2UaVo2hlbHiRsxiSQHfSMvCt6ZT1a4psF9E,22350
|
45
|
-
honeybee_radiance_postprocess-0.4.
|
46
|
-
honeybee_radiance_postprocess-0.4.
|
47
|
-
honeybee_radiance_postprocess-0.4.
|
48
|
-
honeybee_radiance_postprocess-0.4.
|
49
|
-
honeybee_radiance_postprocess-0.4.
|
50
|
-
honeybee_radiance_postprocess-0.4.
|
45
|
+
honeybee_radiance_postprocess-0.4.499.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
46
|
+
honeybee_radiance_postprocess-0.4.499.dist-info/METADATA,sha256=UAvJbhNQzMbKJvAPAPh3o7_pOwiIhR81h1NIlpcuK3g,2238
|
47
|
+
honeybee_radiance_postprocess-0.4.499.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
|
48
|
+
honeybee_radiance_postprocess-0.4.499.dist-info/entry_points.txt,sha256=gFtVPx6UItXt27GfEZZO00eOZChJJEL6JwGSAB_O3rs,96
|
49
|
+
honeybee_radiance_postprocess-0.4.499.dist-info/top_level.txt,sha256=4-sFbzy7ewP2EDqJV3jeFlAFx7SuxtoBBELWaKAnLdA,30
|
50
|
+
honeybee_radiance_postprocess-0.4.499.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|