honeybee-radiance-postprocess 0.4.458__py2.py3-none-any.whl → 0.4.459__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.
@@ -22,6 +22,7 @@ from ..util import filter_array
22
22
  from .two_phase import two_phase
23
23
  from .leed import leed
24
24
  from .abnt import abnt
25
+ from .well import well
25
26
  from ..helper import model_grid_areas, grid_summary
26
27
 
27
28
  _logger = logging.getLogger(__name__)
@@ -34,6 +35,7 @@ def post_process():
34
35
  post_process.add_command(two_phase)
35
36
  post_process.add_command(leed)
36
37
  post_process.add_command(abnt)
38
+ post_process.add_command(well)
37
39
 
38
40
  @post_process.command('annual-daylight')
39
41
  @click.argument(
@@ -0,0 +1,96 @@
1
+ """honeybee-radiance-postprocess WELL commands."""
2
+ import json
3
+ import sys
4
+ import logging
5
+ import os
6
+ import click
7
+
8
+ from ..well.well import well_annual_daylight
9
+ from ..results.annual_daylight import AnnualDaylight
10
+
11
+ _logger = logging.getLogger(__name__)
12
+
13
+
14
+ @click.group(help='Commands for WELL post-processing of Radiance results.')
15
+ def well():
16
+ pass
17
+
18
+
19
+ @well.command('well-annual-daylight')
20
+ @click.argument(
21
+ 'folder',
22
+ type=click.Path(exists=True, file_okay=False, dir_okay=True, resolve_path=True)
23
+ )
24
+ @click.option(
25
+ '--grids-filter', '-gf', help='A pattern to filter the grids.', default='*',
26
+ show_default=True
27
+ )
28
+ @click.option(
29
+ '--shade-transmittance', '-st', help='A value to use as a multiplier in place of '
30
+ 'solar shading. Value for shade transmittance must be 1 > value > 0.',
31
+ default=0.02, show_default=True, type=click.FLOAT
32
+ )
33
+ @click.option(
34
+ '--shade-transmittance-file', '-stf', help='A JSON file with a dictionary '
35
+ 'where aperture groups are keys, and the value for each key is the shade '
36
+ 'transmittance. Values for shade transmittance must be 1 > value > 0. '
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-transmittance option (0.02 by '
39
+ 'default).', default=None, show_default=True,
40
+ type=click.Path(exists=False, file_okay=True, dir_okay=False, resolve_path=True)
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
+ )
50
+ @click.option(
51
+ '--sub-folder', '-sf', help='Relative path for subfolder to write output '
52
+ 'files.', default='well_summary', show_default=True
53
+ )
54
+ def well_daylight(
55
+ folder, shade_transmittance, shade_transmittance_file, grids_filter,
56
+ use_shade_transmittance, sub_folder
57
+ ):
58
+ """Calculate credits for WELL L06.
59
+
60
+ Use the shade-transmittance option to set a shade transmittance values for
61
+ aperture groups. The shade-transmittance-file option takes precedence over
62
+ the shade-transmittance, however, if any aperture groups are missing in the
63
+ JSON file given to the shade-transmittance-file option, the value from
64
+ shade-transmittance will be used for those aperture groups.
65
+
66
+ \b
67
+ Args:
68
+ folder: Results folder. This folder is an output folder of annual daylight
69
+ recipe. The daylight simulation must include aperture groups.
70
+ """
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
+ ):
77
+ with open(shade_transmittance_file) as json_file:
78
+ shd_trans = json.load(json_file)
79
+ results = AnnualDaylight(folder)
80
+ # check if aperture groups are missing in json file
81
+ for light_path in results.light_paths:
82
+ if (not light_path in shd_trans and
83
+ light_path != '__static_apertures__'):
84
+ shd_trans[light_path] = shade_transmittance
85
+ shade_transmittance = shd_trans
86
+ try:
87
+ well_annual_daylight(
88
+ folder, grids_filter=grids_filter,
89
+ shade_transmittance=shade_transmittance, use_states=use_states,
90
+ sub_folder=sub_folder
91
+ )
92
+ except Exception:
93
+ _logger.exception('Failed to generate LEED summary.')
94
+ sys.exit(1)
95
+ else:
96
+ sys.exit(0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: honeybee-radiance-postprocess
3
- Version: 0.4.458
3
+ Version: 0.4.459
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
@@ -20,12 +20,13 @@ honeybee_radiance_postprocess/cli/grid.py,sha256=gqnU3-HdggWCUg9mA1RLZJYHM7tH0v6
20
20
  honeybee_radiance_postprocess/cli/leed.py,sha256=bxGX2UBehYNcaPJWHL2yEasSP6dATD7B0aNNQOflqqM,3712
21
21
  honeybee_radiance_postprocess/cli/merge.py,sha256=oOqqud3VSo-3f3coDoUILcp78OI4DKxXLWCS1bi3PC4,5752
22
22
  honeybee_radiance_postprocess/cli/mtxop.py,sha256=UZJnjNpPjDmShy1-Mxos4H2vTUqk_yP3ZyaC1_LLFeI,5015
23
- honeybee_radiance_postprocess/cli/postprocess.py,sha256=pzZ419eBt_LNNilW1y47c4lGTFxmV7cJyWnjV78GzY8,39202
23
+ honeybee_radiance_postprocess/cli/postprocess.py,sha256=yUR0J3EQyLRiINcjFfxb-9mUeEm3U-lZefjwq--lvtU,39256
24
24
  honeybee_radiance_postprocess/cli/schedule.py,sha256=6uIy98Co4zm-ZRcELo4Lfx_aN3lNiqPe-BSimXwt1F8,3877
25
25
  honeybee_radiance_postprocess/cli/translate.py,sha256=rwUjjDK_Ttjen4ooAMvugyDN5xfltEEFURDZ_Tb1w-g,7308
26
26
  honeybee_radiance_postprocess/cli/two_phase.py,sha256=xA6ayPv26DM5fuMkLhBMYGklf_j5ymowmncwJGXRgo8,7034
27
27
  honeybee_radiance_postprocess/cli/util.py,sha256=Be9cGmYhcV2W37ma6SgQPCWCpWLLLlroxRYN_l58kY0,4077
28
28
  honeybee_radiance_postprocess/cli/viewfactor.py,sha256=kU36YRzLya5PReYREjTfw3zOcWKHYZjVlVclyuR7Cqk,5245
29
+ honeybee_radiance_postprocess/cli/well.py,sha256=JaedicMSvP7wfrX8opytnShsSVN5AnIr4dN-ZJBxrxM,3686
29
30
  honeybee_radiance_postprocess/ies/__init__.py,sha256=kQXElEqFnLGNnrMSpA51XDHoqBup849FHeAqWASIy6w,45
30
31
  honeybee_radiance_postprocess/ies/lm.py,sha256=kHvwd2uT8Y-c2TjpvQzjLrWzwgayWjpzpbwS2S6cEvo,9570
31
32
  honeybee_radiance_postprocess/ies/lm_schedule.py,sha256=ci58GXq2PntJ4yNUdI_x4UCRmq6KrLes-u7GeboX058,9954
@@ -38,9 +39,9 @@ honeybee_radiance_postprocess/results/annual_irradiance.py,sha256=5zwrr4MNeHUebb
38
39
  honeybee_radiance_postprocess/results/results.py,sha256=ABb_S8kDPruhGkDsfREXMg6K0p8FRhAZ3QIRUZCQPAI,54888
39
40
  honeybee_radiance_postprocess/well/__init__.py,sha256=kQXElEqFnLGNnrMSpA51XDHoqBup849FHeAqWASIy6w,45
40
41
  honeybee_radiance_postprocess/well/well.py,sha256=hsicVYFl-2DR4mtVANzUPu9NKA760elfYoIpOKc9bkQ,17501
41
- honeybee_radiance_postprocess-0.4.458.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
42
- honeybee_radiance_postprocess-0.4.458.dist-info/METADATA,sha256=d7qrhbuw112O9hPaK3jCfdpjYx2Ij-rmP_95aCppTgM,2240
43
- honeybee_radiance_postprocess-0.4.458.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
44
- honeybee_radiance_postprocess-0.4.458.dist-info/entry_points.txt,sha256=gFtVPx6UItXt27GfEZZO00eOZChJJEL6JwGSAB_O3rs,96
45
- honeybee_radiance_postprocess-0.4.458.dist-info/top_level.txt,sha256=4-sFbzy7ewP2EDqJV3jeFlAFx7SuxtoBBELWaKAnLdA,30
46
- honeybee_radiance_postprocess-0.4.458.dist-info/RECORD,,
42
+ honeybee_radiance_postprocess-0.4.459.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
43
+ honeybee_radiance_postprocess-0.4.459.dist-info/METADATA,sha256=iWJMWWvA_uyFhoWy2wipcmxl_SUWLMLn0Uixanlu5go,2240
44
+ honeybee_radiance_postprocess-0.4.459.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
45
+ honeybee_radiance_postprocess-0.4.459.dist-info/entry_points.txt,sha256=gFtVPx6UItXt27GfEZZO00eOZChJJEL6JwGSAB_O3rs,96
46
+ honeybee_radiance_postprocess-0.4.459.dist-info/top_level.txt,sha256=4-sFbzy7ewP2EDqJV3jeFlAFx7SuxtoBBELWaKAnLdA,30
47
+ honeybee_radiance_postprocess-0.4.459.dist-info/RECORD,,