honeybee-radiance-postprocess 0.4.494__py2.py3-none-any.whl → 0.4.496__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/well.py +50 -0
- honeybee_radiance_postprocess/well/well.py +22 -1
- {honeybee_radiance_postprocess-0.4.494.dist-info → honeybee_radiance_postprocess-0.4.496.dist-info}/METADATA +2 -2
- {honeybee_radiance_postprocess-0.4.494.dist-info → honeybee_radiance_postprocess-0.4.496.dist-info}/RECORD +8 -8
- {honeybee_radiance_postprocess-0.4.494.dist-info → honeybee_radiance_postprocess-0.4.496.dist-info}/LICENSE +0 -0
- {honeybee_radiance_postprocess-0.4.494.dist-info → honeybee_radiance_postprocess-0.4.496.dist-info}/WHEEL +0 -0
- {honeybee_radiance_postprocess-0.4.494.dist-info → honeybee_radiance_postprocess-0.4.496.dist-info}/entry_points.txt +0 -0
- {honeybee_radiance_postprocess-0.4.494.dist-info → honeybee_radiance_postprocess-0.4.496.dist-info}/top_level.txt +0 -0
@@ -2,6 +2,12 @@
|
|
2
2
|
import sys
|
3
3
|
import logging
|
4
4
|
import click
|
5
|
+
import json
|
6
|
+
import os
|
7
|
+
|
8
|
+
from ladybug.color import Color
|
9
|
+
from ladybug.datatype.generic import GenericType
|
10
|
+
from ladybug.legend import LegendParameters
|
5
11
|
|
6
12
|
from ..well.well import well_annual_daylight
|
7
13
|
|
@@ -45,6 +51,7 @@ def well_daylight(
|
|
45
51
|
Args:
|
46
52
|
folder: Results folder. This folder is an output folder of annual daylight
|
47
53
|
recipe. The daylight simulation must include aperture groups.
|
54
|
+
daylight_hours: Daylight hours schedule for EN 17037.
|
48
55
|
"""
|
49
56
|
with open(daylight_hours) as hourly_schedule:
|
50
57
|
daylight_hours = [int(float(v)) for v in hourly_schedule]
|
@@ -58,3 +65,46 @@ def well_daylight(
|
|
58
65
|
sys.exit(1)
|
59
66
|
else:
|
60
67
|
sys.exit(0)
|
68
|
+
|
69
|
+
|
70
|
+
@well.command('well-daylight-vis-metadata')
|
71
|
+
@click.option(
|
72
|
+
'--output-folder', '-o', help='Output folder for vis metadata files.',
|
73
|
+
type=click.Path(exists=False, file_okay=False, dir_okay=True, resolve_path=True),
|
74
|
+
default='visualization', show_default=True
|
75
|
+
)
|
76
|
+
def well_daylight_vis(output_folder):
|
77
|
+
"""Write visualization metadata files for WELL Daylight."""
|
78
|
+
colors = [Color(220, 0, 0), Color(0, 220, 0)]
|
79
|
+
pass_fail_lpar = \
|
80
|
+
LegendParameters(min=0, max=1, colors=colors, segment_count=2, title='Pass/Fail')
|
81
|
+
pass_fail_lpar.ordinal_dictionary = {0: "Fail", 1: "Pass"}
|
82
|
+
|
83
|
+
metric_info_dict = {
|
84
|
+
'L01': {
|
85
|
+
'type': 'VisualizationMetaData',
|
86
|
+
'data_type': GenericType('sDA200,40%', '').to_dict(),
|
87
|
+
'unit': '',
|
88
|
+
'legend_parameters': pass_fail_lpar.to_dict()
|
89
|
+
},
|
90
|
+
'L06': {
|
91
|
+
'type': 'VisualizationMetaData',
|
92
|
+
'data_type': GenericType('sDA300,50%', '').to_dict(),
|
93
|
+
'unit': '',
|
94
|
+
'legend_parameters': pass_fail_lpar.to_dict()
|
95
|
+
}
|
96
|
+
}
|
97
|
+
try:
|
98
|
+
if not os.path.exists(output_folder):
|
99
|
+
os.mkdir(output_folder)
|
100
|
+
for metric, data in metric_info_dict.items():
|
101
|
+
if not os.path.exists(os.path.join(output_folder, metric)):
|
102
|
+
os.mkdir(os.path.join(output_folder, metric))
|
103
|
+
file_path = os.path.join(output_folder, metric, 'vis_metadata.json')
|
104
|
+
with open(file_path, 'w') as fp:
|
105
|
+
json.dump(data, fp, indent=4)
|
106
|
+
except Exception:
|
107
|
+
_logger.exception('Failed to write the visualization metadata files.')
|
108
|
+
sys.exit(1)
|
109
|
+
else:
|
110
|
+
sys.exit(0)
|
@@ -5,8 +5,8 @@ import json
|
|
5
5
|
import numpy as np
|
6
6
|
|
7
7
|
from ladybug.analysisperiod import AnalysisPeriod
|
8
|
-
from ladybug.datatype.generic import GenericType
|
9
8
|
from ladybug.datacollection import HourlyContinuousCollection
|
9
|
+
from ladybug.datatype.generic import GenericType
|
10
10
|
from ladybug.header import Header
|
11
11
|
from honeybee.model import Model
|
12
12
|
from honeybee.units import conversion_factor_to_meters
|
@@ -458,6 +458,27 @@ def well_annual_daylight(
|
|
458
458
|
da_file.parent.mkdir(parents=True, exist_ok=True)
|
459
459
|
np.savetxt(da_file, da, fmt='%.2f')
|
460
460
|
|
461
|
+
sda_pf_folder = ies_lm_folder.joinpath('pass_fail')
|
462
|
+
sda_pf_folder.mkdir(parents=True, exist_ok=True)
|
463
|
+
for l01_pf, grid_info in zip(l01_pass_sda_grids, grids_info):
|
464
|
+
grid_id = grid_info['full_id']
|
465
|
+
l01_sda_pf_folder = sda_pf_folder.joinpath('L01')
|
466
|
+
l01_sda_pf_folder.mkdir(parents=True, exist_ok=True)
|
467
|
+
l01_pf_file = l01_sda_pf_folder.joinpath(f'{grid_id}.pf')
|
468
|
+
l01_pf = l01_pf.astype(int)
|
469
|
+
np.savetxt(l01_pf_file, l01_pf, fmt='%d')
|
470
|
+
grids_info_file = l01_sda_pf_folder.joinpath('grids_info.json')
|
471
|
+
grids_info_file.write_text(json.dumps(grids_info, indent=2))
|
472
|
+
for l06_pf, grid_info in zip(l06_pass_sda_grids, grids_info):
|
473
|
+
grid_id = grid_info['full_id']
|
474
|
+
l06_sda_pf_folder = sda_pf_folder.joinpath('L06')
|
475
|
+
l06_sda_pf_folder.mkdir(parents=True, exist_ok=True)
|
476
|
+
l06_pf_file = l06_sda_pf_folder.joinpath(f'{grid_id}.pf')
|
477
|
+
l06_pf = l06_pf.astype(int)
|
478
|
+
np.savetxt(l06_pf_file, l06_pf, fmt='%d')
|
479
|
+
grids_info_file = l06_sda_pf_folder.joinpath('grids_info.json')
|
480
|
+
grids_info_file.write_text(json.dumps(grids_info, indent=2))
|
481
|
+
|
461
482
|
da_grids_info_file = l06_ies_lm_folder.joinpath(
|
462
483
|
'results', 'da', 'grids_info.json')
|
463
484
|
da_grids_info_file.write_text(json.dumps(grids_info, indent=2))
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: honeybee-radiance-postprocess
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.496
|
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.146
|
17
17
|
Requires-Dist: numpy<2.0.0
|
18
18
|
|
19
19
|
[](https://github.com/ladybug-tools/honeybee-radiance-postprocess/actions)
|
@@ -29,7 +29,7 @@ honeybee_radiance_postprocess/cli/translate.py,sha256=rwUjjDK_Ttjen4ooAMvugyDN5x
|
|
29
29
|
honeybee_radiance_postprocess/cli/two_phase.py,sha256=xA6ayPv26DM5fuMkLhBMYGklf_j5ymowmncwJGXRgo8,7034
|
30
30
|
honeybee_radiance_postprocess/cli/util.py,sha256=Be9cGmYhcV2W37ma6SgQPCWCpWLLLlroxRYN_l58kY0,4077
|
31
31
|
honeybee_radiance_postprocess/cli/viewfactor.py,sha256=kU36YRzLya5PReYREjTfw3zOcWKHYZjVlVclyuR7Cqk,5245
|
32
|
-
honeybee_radiance_postprocess/cli/well.py,sha256=
|
32
|
+
honeybee_radiance_postprocess/cli/well.py,sha256=b9ebwF4zyHGk9MUhbghj34BEJHryJMaPebZ3sd89FWQ,3772
|
33
33
|
honeybee_radiance_postprocess/ies/__init__.py,sha256=kQXElEqFnLGNnrMSpA51XDHoqBup849FHeAqWASIy6w,45
|
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
|
@@ -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=8wpxu6HBnrJXRoTkI7ucNuzhVmNKw1Z2zPP6wzk7ULQ,55236
|
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=Fs81hs5e2UaVo2hlbHiRsxiSQHfSMvCt6ZT1a4psF9E,22350
|
45
|
+
honeybee_radiance_postprocess-0.4.496.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
46
|
+
honeybee_radiance_postprocess-0.4.496.dist-info/METADATA,sha256=3lzksacDnCpTpEwdxDU9s5CxAo1Zmxupu8PtOLUtl-A,2238
|
47
|
+
honeybee_radiance_postprocess-0.4.496.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
|
48
|
+
honeybee_radiance_postprocess-0.4.496.dist-info/entry_points.txt,sha256=gFtVPx6UItXt27GfEZZO00eOZChJJEL6JwGSAB_O3rs,96
|
49
|
+
honeybee_radiance_postprocess-0.4.496.dist-info/top_level.txt,sha256=4-sFbzy7ewP2EDqJV3jeFlAFx7SuxtoBBELWaKAnLdA,30
|
50
|
+
honeybee_radiance_postprocess-0.4.496.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|