honeybee-radiance-postprocess 0.4.470__py2.py3-none-any.whl → 0.4.472__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/well/well.py +120 -65
- {honeybee_radiance_postprocess-0.4.470.dist-info → honeybee_radiance_postprocess-0.4.472.dist-info}/METADATA +2 -2
- {honeybee_radiance_postprocess-0.4.470.dist-info → honeybee_radiance_postprocess-0.4.472.dist-info}/RECORD +7 -7
- {honeybee_radiance_postprocess-0.4.470.dist-info → honeybee_radiance_postprocess-0.4.472.dist-info}/LICENSE +0 -0
- {honeybee_radiance_postprocess-0.4.470.dist-info → honeybee_radiance_postprocess-0.4.472.dist-info}/WHEEL +0 -0
- {honeybee_radiance_postprocess-0.4.470.dist-info → honeybee_radiance_postprocess-0.4.472.dist-info}/entry_points.txt +0 -0
- {honeybee_radiance_postprocess-0.4.470.dist-info → honeybee_radiance_postprocess-0.4.472.dist-info}/top_level.txt +0 -0
@@ -165,31 +165,17 @@ def _well_summary(
|
|
165
165
|
|
166
166
|
def well_annual_daylight(
|
167
167
|
results: Union[str, AnnualDaylight], grids_filter: str = '*',
|
168
|
-
states_schedule: dict = None,
|
169
|
-
sub_folder: str = None):
|
168
|
+
states_schedule: dict = None, sub_folder: str = None):
|
170
169
|
"""Calculate credits for WELL L06.
|
171
170
|
|
172
171
|
Args:
|
173
172
|
results: Path to results folder or a Results class object.
|
174
173
|
grids_filter: The name of a grid or a pattern to filter the grids.
|
175
174
|
Defaults to '*'.
|
176
|
-
shade_transmittance: A value to use as a multiplier in place of solar
|
177
|
-
shading. This input can be either a single value that will be used
|
178
|
-
for all aperture groups, or a dictionary where aperture groups are
|
179
|
-
keys, and the value for each key is the shade transmittance. Values
|
180
|
-
for shade transmittance must be 1 > value > 0.
|
181
|
-
Defaults to 0.05.
|
182
|
-
use_states: A boolean to note whether to use the simulated states. Set
|
183
|
-
to True to use the simulated states. The default is False which will
|
184
|
-
use the shade transmittance instead.
|
185
175
|
states_schedule: A custom dictionary of shading states. In case this is
|
186
176
|
left empty, the function will calculate a shading schedule by using
|
187
177
|
the shade_transmittance input. If a states schedule is provided it
|
188
178
|
will check that it is complying with the 2% rule. Defaults to None.
|
189
|
-
threshold: Threshold value for daylight autonomy. Default: 300.
|
190
|
-
target_time: A minimum threshold of occupied time (eg. 50% of the
|
191
|
-
time), above which a given sensor passes and contributes to the
|
192
|
-
spatial daylight autonomy. Defaults to 50.
|
193
179
|
sub_folder: Relative path for a subfolder to write the output. If None,
|
194
180
|
the files will not be written. Defaults to None.
|
195
181
|
|
@@ -243,10 +229,14 @@ def well_annual_daylight(
|
|
243
229
|
grid_areas = [None] * len(grids_info)
|
244
230
|
|
245
231
|
# spatial daylight autonomy
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
232
|
+
l06_da_grids = []
|
233
|
+
l06_pass_sda_grids = []
|
234
|
+
l06_pass_sda_blinds_up_grids = []
|
235
|
+
l06_pass_sda_blinds_down_grids = []
|
236
|
+
l01_da_grids = []
|
237
|
+
l01_pass_sda_grids = []
|
238
|
+
l01_pass_sda_blinds_up_grids = []
|
239
|
+
l01_pass_sda_blinds_down_grids = []
|
250
240
|
for grid_info in grids_info:
|
251
241
|
light_paths = [lp[0] for lp in grid_info['light_path']]
|
252
242
|
base_zero_array = np.apply_along_axis(filter_array, 1, np.zeros(
|
@@ -281,57 +271,93 @@ def well_annual_daylight(
|
|
281
271
|
array_blinds_up = sum(arrays_blinds_up)
|
282
272
|
array_blinds_down = sum(arrays_blinds_down)
|
283
273
|
# calculate da per grid
|
284
|
-
da_grid = da_array2d(array, total_occ=total_occ, threshold=
|
274
|
+
da_grid = da_array2d(array, total_occ=total_occ, threshold=300)
|
285
275
|
|
286
|
-
|
276
|
+
l06_da_grids.append(da_grid)
|
287
277
|
da_blinds_up_grid = da_array2d(
|
288
|
-
array_blinds_up, total_occ=total_occ, threshold=
|
278
|
+
array_blinds_up, total_occ=total_occ, threshold=300)
|
289
279
|
da_blinds_down_grid = da_array2d(
|
290
|
-
array_blinds_down, total_occ=total_occ, threshold=
|
280
|
+
array_blinds_down, total_occ=total_occ, threshold=300)
|
291
281
|
# calculate sda per grid
|
292
|
-
|
293
|
-
|
294
|
-
|
282
|
+
l06_pass_sda_grids.append(da_grid >= 50)
|
283
|
+
l06_pass_sda_blinds_up_grids.append(da_blinds_up_grid >= 50)
|
284
|
+
l06_pass_sda_blinds_down_grids.append(da_blinds_down_grid >= 50)
|
295
285
|
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
286
|
+
array_blinds_up = sum(arrays_blinds_up)
|
287
|
+
array_blinds_down = sum(arrays_blinds_down)
|
288
|
+
# calculate da per grid
|
289
|
+
da_grid = da_array2d(array, total_occ=total_occ, threshold=200)
|
290
|
+
|
291
|
+
l01_da_grids.append(da_grid)
|
292
|
+
da_blinds_up_grid = da_array2d(
|
293
|
+
array_blinds_up, total_occ=total_occ, threshold=200)
|
294
|
+
da_blinds_down_grid = da_array2d(
|
295
|
+
array_blinds_down, total_occ=total_occ, threshold=200)
|
296
|
+
# calculate sda per grid
|
297
|
+
l01_pass_sda_grids.append(da_grid >= 40)
|
298
|
+
l01_pass_sda_blinds_up_grids.append(da_blinds_up_grid >= 40)
|
299
|
+
l01_pass_sda_blinds_down_grids.append(da_blinds_down_grid >= 40)
|
300
300
|
|
301
|
-
|
302
|
-
|
301
|
+
# create summaries for all grids and each grid individually
|
302
|
+
l06_ies_lm_summary, l06_ies_lm_summary_grid = _well_summary(
|
303
|
+
l06_pass_sda_grids, grids_info, grid_areas,
|
304
|
+
l06_pass_sda_blinds_up_grids, l06_pass_sda_blinds_down_grids)
|
305
|
+
l01_ies_lm_summary, l01_ies_lm_summary_grid = _well_summary(
|
306
|
+
l01_pass_sda_grids, grids_info, grid_areas,
|
307
|
+
l01_pass_sda_blinds_up_grids, l01_pass_sda_blinds_down_grids)
|
308
|
+
|
309
|
+
l06_well_summary = {}
|
310
|
+
l01_well_summary = {}
|
311
|
+
l06_well_summary['method'] = 'IES LM-83-12'
|
312
|
+
l01_well_summary['method'] = 'IES LM-83-12'
|
303
313
|
|
304
314
|
# credits
|
305
315
|
if not fail_to_comply:
|
306
|
-
if
|
307
|
-
|
308
|
-
|
309
|
-
elif
|
310
|
-
|
311
|
-
|
312
|
-
elif
|
313
|
-
|
314
|
-
|
316
|
+
if l06_ies_lm_summary['sda'] >= 75:
|
317
|
+
l06_ies_lm_summary['credits'] = 3
|
318
|
+
l06_well_summary['credits'] = 2
|
319
|
+
elif l06_ies_lm_summary['sda'] >= 55:
|
320
|
+
l06_ies_lm_summary['credits'] = 2
|
321
|
+
l06_well_summary['credits'] = 1
|
322
|
+
elif l06_ies_lm_summary['sda'] >= 40:
|
323
|
+
l06_ies_lm_summary['credits'] = 1
|
324
|
+
l06_well_summary['credits'] = 0
|
315
325
|
else:
|
316
|
-
|
317
|
-
|
326
|
+
l06_ies_lm_summary['credits'] = 0
|
327
|
+
l06_well_summary['credits'] = 0
|
318
328
|
|
319
|
-
if all(grid_summary['sda'] >= 55 for grid_summary in
|
320
|
-
if
|
321
|
-
|
329
|
+
if all(grid_summary['sda'] >= 55 for grid_summary in l06_ies_lm_summary_grid.values()):
|
330
|
+
if l06_ies_lm_summary['credits'] <= 2:
|
331
|
+
l06_ies_lm_summary['credits'] += 1
|
322
332
|
else:
|
323
|
-
|
333
|
+
l06_ies_lm_summary['credits'] = 'Exemplary performance'
|
334
|
+
|
335
|
+
if l01_ies_lm_summary['sda'] >= 30:
|
336
|
+
l01_ies_lm_summary['comply'] = True
|
337
|
+
l01_well_summary['comply'] = True
|
338
|
+
else:
|
339
|
+
l01_ies_lm_summary['comply'] = False
|
340
|
+
l01_well_summary['comply'] = False
|
341
|
+
|
342
|
+
l06_well_summary['sda'] = l06_ies_lm_summary['sda']
|
343
|
+
l01_well_summary['sda'] = l01_ies_lm_summary['sda']
|
324
344
|
else:
|
325
|
-
|
345
|
+
l06_ies_lm_summary['credits'] = 0
|
326
346
|
fail_to_comply_rooms = ', '.join(list(fail_to_comply.keys()))
|
327
347
|
note = (
|
328
348
|
'0 credits have been awarded. The following sensor grids have at '
|
329
349
|
'least one hour where 2% of the floor area receives direct '
|
330
350
|
f'illuminance of 1000 lux or more: {fail_to_comply_rooms}.'
|
331
351
|
)
|
332
|
-
|
352
|
+
l06_ies_lm_summary['note'] = note
|
353
|
+
l06_well_summary['credits'] = 0
|
354
|
+
|
355
|
+
l01_ies_lm_summary['comply'] = False
|
356
|
+
l01_ies_lm_summary['note'] = note
|
357
|
+
l01_well_summary['comply'] = False
|
333
358
|
|
334
|
-
|
359
|
+
l06_well_summary['total_floor_area'] = sum(np.sum(arr) for arr in grid_areas)
|
360
|
+
l01_well_summary['total_floor_area'] = sum(np.sum(arr) for arr in grid_areas)
|
335
361
|
|
336
362
|
# convert to datacollection
|
337
363
|
def to_datacollection(aperture_group: str, values: np.ndarray):
|
@@ -347,34 +373,63 @@ def well_annual_daylight(
|
|
347
373
|
folder = Path(sub_folder)
|
348
374
|
folder.mkdir(parents=True, exist_ok=True)
|
349
375
|
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
376
|
+
l06_ies_lm_folder = folder.joinpath('l06_ies_lm_summary')
|
377
|
+
l01_ies_lm_folder = folder.joinpath('l01_ies_lm_summary')
|
378
|
+
|
379
|
+
l06_ies_lm_folder.mkdir(parents=True, exist_ok=True)
|
380
|
+
l01_ies_lm_folder.mkdir(parents=True, exist_ok=True)
|
381
|
+
|
382
|
+
ies_lm_summary_file = l06_ies_lm_folder.joinpath('ies_lm_summary.json')
|
383
|
+
ies_lm_summary_file.write_text(json.dumps(l06_ies_lm_summary, indent=2))
|
384
|
+
ies_lm_summary_file = l01_ies_lm_folder.joinpath('ies_lm_summary.json')
|
385
|
+
ies_lm_summary_file.write_text(json.dumps(l01_ies_lm_summary, indent=2))
|
386
|
+
|
387
|
+
ies_lm_summary_grid_file = l06_ies_lm_folder.joinpath('ies_lm_summary_grid.json')
|
388
|
+
ies_lm_summary_grid_file.write_text(json.dumps(l06_ies_lm_summary_grid, indent=2))
|
389
|
+
ies_lm_summary_grid_file = l01_ies_lm_folder.joinpath('ies_lm_summary_grid.json')
|
390
|
+
ies_lm_summary_grid_file.write_text(json.dumps(l01_ies_lm_summary_grid, indent=2))
|
391
|
+
|
392
|
+
states_schedule_file = l06_ies_lm_folder.joinpath('states_schedule.json')
|
393
|
+
states_schedule_file.write_text(json.dumps(states_schedule))
|
394
|
+
states_schedule_file = l01_ies_lm_folder.joinpath('states_schedule.json')
|
357
395
|
states_schedule_file.write_text(json.dumps(states_schedule))
|
358
|
-
|
396
|
+
|
397
|
+
grids_info_file = l06_ies_lm_folder.joinpath('grids_info.json')
|
398
|
+
grids_info_file.write_text(json.dumps(grids_info, indent=2))
|
399
|
+
grids_info_file = l01_ies_lm_folder.joinpath('grids_info.json')
|
359
400
|
grids_info_file.write_text(json.dumps(grids_info, indent=2))
|
360
401
|
|
361
402
|
for (da, grid_info) in \
|
362
|
-
zip(
|
403
|
+
zip(l06_da_grids, grids_info):
|
404
|
+
grid_id = grid_info['full_id']
|
405
|
+
da_file = l06_ies_lm_folder.joinpath('results', 'da', f'{grid_id}.da')
|
406
|
+
da_file.parent.mkdir(parents=True, exist_ok=True)
|
407
|
+
np.savetxt(da_file, da, fmt='%.2f')
|
408
|
+
for (da, grid_info) in \
|
409
|
+
zip(l01_da_grids, grids_info):
|
363
410
|
grid_id = grid_info['full_id']
|
364
|
-
da_file =
|
411
|
+
da_file = l01_ies_lm_folder.joinpath('results', 'da', f'{grid_id}.da')
|
365
412
|
da_file.parent.mkdir(parents=True, exist_ok=True)
|
366
413
|
np.savetxt(da_file, da, fmt='%.2f')
|
367
414
|
|
368
|
-
da_grids_info_file =
|
415
|
+
da_grids_info_file = l06_ies_lm_folder.joinpath(
|
416
|
+
'results', 'da', 'grids_info.json')
|
417
|
+
da_grids_info_file.write_text(json.dumps(grids_info, indent=2))
|
418
|
+
da_grids_info_file = l01_ies_lm_folder.joinpath(
|
369
419
|
'results', 'da', 'grids_info.json')
|
370
420
|
da_grids_info_file.write_text(json.dumps(grids_info, indent=2))
|
371
421
|
|
372
422
|
states_schedule_err_file = \
|
373
|
-
|
423
|
+
l06_ies_lm_folder.joinpath('states_schedule_err.json')
|
424
|
+
states_schedule_err_file.write_text(json.dumps(fail_to_comply))
|
425
|
+
states_schedule_err_file = \
|
426
|
+
l01_ies_lm_folder.joinpath('states_schedule_err.json')
|
374
427
|
states_schedule_err_file.write_text(json.dumps(fail_to_comply))
|
375
428
|
|
376
|
-
well_summary_file = folder.joinpath('
|
377
|
-
well_summary_file.write_text(json.dumps(
|
429
|
+
well_summary_file = folder.joinpath('l06_well_summary.json')
|
430
|
+
well_summary_file.write_text(json.dumps(l06_well_summary, indent=2))
|
431
|
+
well_summary_file = folder.joinpath('l01_well_summary.json')
|
432
|
+
well_summary_file.write_text(json.dumps(l01_well_summary, indent=2))
|
378
433
|
|
379
|
-
return (
|
434
|
+
return (l06_well_summary, l06_ies_lm_summary, l06_ies_lm_summary_grid, l06_da_grids, states_schedule,
|
380
435
|
fail_to_comply, grids_info)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: honeybee-radiance-postprocess
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.472
|
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.129
|
17
17
|
Requires-Dist: numpy>=1.21.6
|
18
18
|
|
19
19
|
[](https://github.com/ladybug-tools/honeybee-radiance-postprocess/actions)
|
@@ -41,10 +41,10 @@ honeybee_radiance_postprocess/results/annual_daylight.py,sha256=11d4J1iIuITKuoWy
|
|
41
41
|
honeybee_radiance_postprocess/results/annual_irradiance.py,sha256=5zwrr4MNeHUebbSRpSBbscPOZUs2AHmYCQfIIbdYImY,8298
|
42
42
|
honeybee_radiance_postprocess/results/results.py,sha256=ABb_S8kDPruhGkDsfREXMg6K0p8FRhAZ3QIRUZCQPAI,54888
|
43
43
|
honeybee_radiance_postprocess/well/__init__.py,sha256=kQXElEqFnLGNnrMSpA51XDHoqBup849FHeAqWASIy6w,45
|
44
|
-
honeybee_radiance_postprocess/well/well.py,sha256=
|
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.
|
44
|
+
honeybee_radiance_postprocess/well/well.py,sha256=C80NGCKWAXkz0LfBTux5db8SVnH0z8WSNmDyq8dMvuo,19050
|
45
|
+
honeybee_radiance_postprocess-0.4.472.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
46
|
+
honeybee_radiance_postprocess-0.4.472.dist-info/METADATA,sha256=G-ZAnIMmdhTZ9J4RlrriCCpS4mge2KzD6OVvI8uUHGE,2240
|
47
|
+
honeybee_radiance_postprocess-0.4.472.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
|
48
|
+
honeybee_radiance_postprocess-0.4.472.dist-info/entry_points.txt,sha256=gFtVPx6UItXt27GfEZZO00eOZChJJEL6JwGSAB_O3rs,96
|
49
|
+
honeybee_radiance_postprocess-0.4.472.dist-info/top_level.txt,sha256=4-sFbzy7ewP2EDqJV3jeFlAFx7SuxtoBBELWaKAnLdA,30
|
50
|
+
honeybee_radiance_postprocess-0.4.472.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|