honeybee-radiance-postprocess 0.4.440__py2.py3-none-any.whl → 0.4.442__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.
@@ -30,13 +30,17 @@ def translate():
30
30
  type=click.Path(exists=False, file_okay=False, dir_okay=True, resolve_path=True)
31
31
  )
32
32
  @click.option(
33
- '--extension', '-ext', help='Output file extension', default='.txt', show_default=True
33
+ '--extension', '-ext', help='Output file extension', default='txt', show_default=True
34
34
  )
35
35
  @click.option(
36
36
  '--output-format', '-fmt', help='Output format for each element in the array',
37
37
  default='%.7e', show_default=True
38
38
  )
39
- def npy_to_txt(npy_file, name, output_folder, extension, output_format):
39
+ @click.option(
40
+ '--delimiter', '-d', help='Delimiter in the text file.', default='\t',
41
+ type=click.Choice(['\t', ' ', ',', ';', 'tab', 'space', 'comma', 'semicolon'])
42
+ )
43
+ def npy_to_txt(npy_file, name, output_folder, extension, output_format, delimiter):
40
44
  """Convert a npy file to text file.
41
45
 
42
46
  This command reads a NumPy array from a npy file and saves it as readable file. The
@@ -47,10 +51,11 @@ def npy_to_txt(npy_file, name, output_folder, extension, output_format):
47
51
  npy-file: Path to npy file.
48
52
  """
49
53
  try:
54
+ delimiter = get_delimiter(delimiter)
50
55
  array = np.load(npy_file)
51
- output = Path(output_folder, name + extension)
56
+ output = Path(output_folder, f'{name}.{extension}')
52
57
  output.parent.mkdir(parents=True, exist_ok=True)
53
- np.savetxt(output, array, fmt=output_format, delimiter='\t')
58
+ np.savetxt(output, array, fmt=output_format, delimiter=delimiter)
54
59
 
55
60
  except Exception:
56
61
  _logger.exception('Converting npy file to text file failed.')
@@ -557,9 +557,11 @@ def leed_option_one(
557
557
  pass_sda_blinds_down_grids = []
558
558
  for grid_info in grids_info:
559
559
  light_paths = [lp[0] for lp in grid_info['light_path']]
560
- arrays = []
561
- arrays_blinds_up = []
562
- arrays_blinds_down = []
560
+ base_zero_array = np.apply_along_axis(filter_array, 1, np.zeros(
561
+ (grid_info['count'], len(results.sun_up_hours))), occ_mask)
562
+ arrays = [base_zero_array.copy()]
563
+ arrays_blinds_up = [base_zero_array.copy()]
564
+ arrays_blinds_down = [base_zero_array.copy()]
563
565
  # combine total array for all light paths
564
566
  if use_states:
565
567
  array = results._array_from_states(grid_info, states=states_schedule)
@@ -567,16 +569,24 @@ def leed_option_one(
567
569
 
568
570
  for light_path in light_paths:
569
571
  # do an extra pass to calculate with blinds always up or down
570
- array_blinds_up = results._get_array(
571
- grid_info, light_path, state=0, res_type='total')
572
- array_filter = np.apply_along_axis(
573
- filter_array, 1, array_blinds_up, occ_mask)
574
- arrays_blinds_up.append(array_filter)
575
- array_blinds_down = results._get_array(
576
- grid_info, light_path, state=1, res_type='total')
577
- array_filter = np.apply_along_axis(
578
- filter_array, 1, array_blinds_down, occ_mask)
579
- arrays_blinds_down.append(array_filter)
572
+ if light_path != '__static_apertures__':
573
+ array_blinds_up = results._get_array(
574
+ grid_info, light_path, state=0, res_type='total')
575
+ array_filter = np.apply_along_axis(
576
+ filter_array, 1, array_blinds_up, occ_mask)
577
+ arrays_blinds_up.append(array_filter)
578
+ array_blinds_down = results._get_array(
579
+ grid_info, light_path, state=1, res_type='total')
580
+ array_filter = np.apply_along_axis(
581
+ filter_array, 1, array_blinds_down, occ_mask)
582
+ arrays_blinds_down.append(array_filter)
583
+ else:
584
+ static_array = results._get_array(
585
+ grid_info, light_path, state=0, res_type='total')
586
+ array_filter = np.apply_along_axis(
587
+ filter_array, 1, static_array, occ_mask)
588
+ arrays_blinds_up.append(array_filter)
589
+ arrays_blinds_down.append(array_filter)
580
590
  else:
581
591
  for light_path in light_paths:
582
592
  array = results._get_array(
@@ -7,16 +7,16 @@ from ladybug.datatype.generic import GenericType
7
7
  def _abnt_nbr_15575_daylight_levels_vis_metadata():
8
8
  """Return visualization metadata for ABNT NBR 15575 Daylight levels."""
9
9
  level_value = {
10
- 0: 'Nao atende',
11
- 1: 'Minimo',
12
- 2: 'Intermediario',
10
+ 0: 'Não atende',
11
+ 1: 'Mínimo',
12
+ 2: 'Intermediário',
13
13
  3: 'Superior'
14
14
  }
15
15
 
16
16
  colors = [Color(255, 198, 143), Color(255, 255, 209), Color(192, 231, 189), Color(83, 169, 206)]
17
17
  illuminance_levels_lpar = \
18
18
  LegendParameters(min=0, max=3, colors=colors, segment_count=4,
19
- title='Niveis de iluminamento')
19
+ title='Níveis de iluminamento')
20
20
  illuminance_levels_lpar.ordinal_dictionary = level_value
21
21
 
22
22
  metric_info_dict = {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: honeybee-radiance-postprocess
3
- Version: 0.4.440
3
+ Version: 0.4.442
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
@@ -12,7 +12,7 @@ honeybee_radiance_postprocess/metrics.py,sha256=6EHCuXf5jnhh6GglI9mTd0MFpfhfPFoK
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
- honeybee_radiance_postprocess/vis_metadata.py,sha256=uhnU6qlRgZ-bH-9ZKDSc9kWmNP24iNip3RcnLFOgPxs,1776
15
+ honeybee_radiance_postprocess/vis_metadata.py,sha256=7ywIgdiuNKcctxifhpy7-Q2oaSX2ngQBeA0Kh7q1Gg0,1780
16
16
  honeybee_radiance_postprocess/cli/__init__.py,sha256=uR3Q-VEhA6ZJPszRvOg_He8qm9HVFm_UxZTCfpLzLGw,851
17
17
  honeybee_radiance_postprocess/cli/abnt.py,sha256=RmEjhxdEK6Uks3S10rQs6n8cup9qv036qRwh_wj1taA,15705
18
18
  honeybee_radiance_postprocess/cli/grid.py,sha256=6peLEAPVe-iw05_wdRpFruZLqO8myvC-_QT5W1q5sk8,10677
@@ -21,20 +21,20 @@ honeybee_radiance_postprocess/cli/merge.py,sha256=oOqqud3VSo-3f3coDoUILcp78OI4DK
21
21
  honeybee_radiance_postprocess/cli/mtxop.py,sha256=UZJnjNpPjDmShy1-Mxos4H2vTUqk_yP3ZyaC1_LLFeI,5015
22
22
  honeybee_radiance_postprocess/cli/postprocess.py,sha256=pzZ419eBt_LNNilW1y47c4lGTFxmV7cJyWnjV78GzY8,39202
23
23
  honeybee_radiance_postprocess/cli/schedule.py,sha256=6uIy98Co4zm-ZRcELo4Lfx_aN3lNiqPe-BSimXwt1F8,3877
24
- honeybee_radiance_postprocess/cli/translate.py,sha256=HmJoeF_0feb-NM75orrS6QJw4pYfS_KNq2licLgRYx8,7068
24
+ honeybee_radiance_postprocess/cli/translate.py,sha256=rwUjjDK_Ttjen4ooAMvugyDN5xfltEEFURDZ_Tb1w-g,7308
25
25
  honeybee_radiance_postprocess/cli/two_phase.py,sha256=xA6ayPv26DM5fuMkLhBMYGklf_j5ymowmncwJGXRgo8,7034
26
26
  honeybee_radiance_postprocess/cli/util.py,sha256=Be9cGmYhcV2W37ma6SgQPCWCpWLLLlroxRYN_l58kY0,4077
27
27
  honeybee_radiance_postprocess/cli/viewfactor.py,sha256=kU36YRzLya5PReYREjTfw3zOcWKHYZjVlVclyuR7Cqk,5245
28
28
  honeybee_radiance_postprocess/leed/__init__.py,sha256=kQXElEqFnLGNnrMSpA51XDHoqBup849FHeAqWASIy6w,45
29
- honeybee_radiance_postprocess/leed/leed.py,sha256=rbvhq51Dfhx4aZFcKWqOXp3FfgFy5YDRkHYn9wKHQpc,32631
29
+ honeybee_radiance_postprocess/leed/leed.py,sha256=I3bcPbIvO2ppujmpetLPY82zZwdPAuYp67heDypIlDs,33329
30
30
  honeybee_radiance_postprocess/leed/leed_schedule.py,sha256=s3by1sv1DtOlCawvaMvnIDvEo5D8ATEJvWQ_rEeJIHg,9956
31
31
  honeybee_radiance_postprocess/results/__init__.py,sha256=1agBQbfT4Tf8KqSZzlfKYX8MeZryY4jJ1KB4HWqaDDk,182
32
32
  honeybee_radiance_postprocess/results/annual_daylight.py,sha256=11d4J1iIuITKuoWyWa-2_2WdrHYBULC0YP-mWBWi4JQ,34724
33
33
  honeybee_radiance_postprocess/results/annual_irradiance.py,sha256=5zwrr4MNeHUebbSRpSBbscPOZUs2AHmYCQfIIbdYImY,8298
34
34
  honeybee_radiance_postprocess/results/results.py,sha256=ABb_S8kDPruhGkDsfREXMg6K0p8FRhAZ3QIRUZCQPAI,54888
35
- honeybee_radiance_postprocess-0.4.440.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
36
- honeybee_radiance_postprocess-0.4.440.dist-info/METADATA,sha256=L_5nHg9-BNlr3TFPTy7gQPyssbLx54lZPA8KvGMTErA,2246
37
- honeybee_radiance_postprocess-0.4.440.dist-info/WHEEL,sha256=unfA4MOaH0icIyIA5oH6E2sn2Hq5zKtLlHsWapZGwes,110
38
- honeybee_radiance_postprocess-0.4.440.dist-info/entry_points.txt,sha256=gFtVPx6UItXt27GfEZZO00eOZChJJEL6JwGSAB_O3rs,96
39
- honeybee_radiance_postprocess-0.4.440.dist-info/top_level.txt,sha256=4-sFbzy7ewP2EDqJV3jeFlAFx7SuxtoBBELWaKAnLdA,30
40
- honeybee_radiance_postprocess-0.4.440.dist-info/RECORD,,
35
+ honeybee_radiance_postprocess-0.4.442.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
36
+ honeybee_radiance_postprocess-0.4.442.dist-info/METADATA,sha256=vtmQw3poAp4aD_Ff3clFauY6RzRfZiLLWLoiJQDOf5M,2246
37
+ honeybee_radiance_postprocess-0.4.442.dist-info/WHEEL,sha256=unfA4MOaH0icIyIA5oH6E2sn2Hq5zKtLlHsWapZGwes,110
38
+ honeybee_radiance_postprocess-0.4.442.dist-info/entry_points.txt,sha256=gFtVPx6UItXt27GfEZZO00eOZChJJEL6JwGSAB_O3rs,96
39
+ honeybee_radiance_postprocess-0.4.442.dist-info/top_level.txt,sha256=4-sFbzy7ewP2EDqJV3jeFlAFx7SuxtoBBELWaKAnLdA,30
40
+ honeybee_radiance_postprocess-0.4.442.dist-info/RECORD,,