honeybee-radiance-postprocess 0.4.498__py2.py3-none-any.whl → 0.4.500__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.
@@ -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
- hrs_abv = (avg_ill >= target_ill).sum()
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 = hrs_abv >= target_hrs
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
- minimum_comply = True
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
- worst_lit_point = np.min(hrs_abv_target)
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
- minimum_comply = worst_lit_point >= target_hrs
392
+ min_comply = hrs_abv_min >= target_hrs
393
393
 
394
394
  metrics_summary['credits'] = metrics['credits']
395
- if avg_comply and minimum_comply:
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 minimum_comply else False
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 = {}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: honeybee-radiance-postprocess
3
- Version: 0.4.498
3
+ Version: 0.4.500
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.146
16
+ Requires-Dist: honeybee-radiance==1.66.147
17
17
  Requires-Dist: numpy<2.0.0
18
18
 
19
19
  [![Build Status](https://github.com/ladybug-tools/honeybee-radiance-postprocess/actions/workflows/ci.yaml/badge.svg)](https://github.com/ladybug-tools/honeybee-radiance-postprocess/actions)
@@ -14,7 +14,7 @@ honeybee_radiance_postprocess/type_hints.py,sha256=4R0kZgacQrqzoh8Tq7f8MVzUDzynV
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=0krsh8gIRpTTSi86GnAIpCIYkvWy0bi6WwJjz-co53o,18279
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
20
  honeybee_radiance_postprocess/cli/breeam.py,sha256=-mkQDUgFksfPiZwMgbp4i-qh2PYzl-hGc7LFmsVpS90,3144
@@ -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.498.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
46
- honeybee_radiance_postprocess-0.4.498.dist-info/METADATA,sha256=Q_ZOGRSPF9lW9nW6RDHk9HyFY5WKvHQ06c-oqRh3doM,2238
47
- honeybee_radiance_postprocess-0.4.498.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
48
- honeybee_radiance_postprocess-0.4.498.dist-info/entry_points.txt,sha256=gFtVPx6UItXt27GfEZZO00eOZChJJEL6JwGSAB_O3rs,96
49
- honeybee_radiance_postprocess-0.4.498.dist-info/top_level.txt,sha256=4-sFbzy7ewP2EDqJV3jeFlAFx7SuxtoBBELWaKAnLdA,30
50
- honeybee_radiance_postprocess-0.4.498.dist-info/RECORD,,
45
+ honeybee_radiance_postprocess-0.4.500.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
46
+ honeybee_radiance_postprocess-0.4.500.dist-info/METADATA,sha256=9KloLOMRRbb5KOLp-1xpFHdsj0J7QHfRV_k9_xhdnqs,2238
47
+ honeybee_radiance_postprocess-0.4.500.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
48
+ honeybee_radiance_postprocess-0.4.500.dist-info/entry_points.txt,sha256=gFtVPx6UItXt27GfEZZO00eOZChJJEL6JwGSAB_O3rs,96
49
+ honeybee_radiance_postprocess-0.4.500.dist-info/top_level.txt,sha256=4-sFbzy7ewP2EDqJV3jeFlAFx7SuxtoBBELWaKAnLdA,30
50
+ honeybee_radiance_postprocess-0.4.500.dist-info/RECORD,,