honeybee-radiance-postprocess 0.4.430__tar.gz → 0.4.432__tar.gz
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-0.4.430 → honeybee-radiance-postprocess-0.4.432}/PKG-INFO +1 -1
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/cli/abnt.py +6 -3
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/reader.py +13 -6
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/util.py +4 -3
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess.egg-info/PKG-INFO +1 -1
- honeybee-radiance-postprocess-0.4.432/honeybee_radiance_postprocess.egg-info/requires.txt +2 -0
- honeybee-radiance-postprocess-0.4.432/requirements.txt +2 -0
- honeybee-radiance-postprocess-0.4.430/honeybee_radiance_postprocess.egg-info/requires.txt +0 -2
- honeybee-radiance-postprocess-0.4.430/requirements.txt +0 -2
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/CODE_OF_CONDUCT.md +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/CONTRIBUTING.md +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/LICENSE +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/MANIFEST.in +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/README.md +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/dev-requirements.txt +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/__init__.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/__main__.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/annual.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/annualdaylight.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/annualirradiance.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/cli/__init__.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/cli/grid.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/cli/leed.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/cli/merge.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/cli/mtxop.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/cli/postprocess.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/cli/schedule.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/cli/translate.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/cli/two_phase.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/cli/util.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/cli/viewfactor.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/data_type.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/dynamic.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/electriclight.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/en17037.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/helper.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/leed/__init__.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/leed/leed.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/leed/leed_schedule.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/metrics.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/results/__init__.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/results/annual_daylight.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/results/annual_irradiance.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/results/results.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/type_hints.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess/vis_metadata.py +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess.egg-info/SOURCES.txt +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess.egg-info/dependency_links.txt +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess.egg-info/entry_points.txt +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/honeybee_radiance_postprocess.egg-info/top_level.txt +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/setup.cfg +0 -0
- {honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/setup.py +0 -0
@@ -245,8 +245,9 @@ def abnt_nbr_15575(
|
|
245
245
|
if pof_sensor_grid is None:
|
246
246
|
if room_center:
|
247
247
|
floor_face = Face3D.join_coplanar_faces(
|
248
|
-
room.horizontal_floor_boundaries(
|
249
|
-
|
248
|
+
room.horizontal_floor_boundaries(
|
249
|
+
tolerance=0.001),
|
250
|
+
0.05)[0]
|
250
251
|
if floor_face.is_convex:
|
251
252
|
centroid = floor_face.centroid
|
252
253
|
else:
|
@@ -256,7 +257,9 @@ def abnt_nbr_15575(
|
|
256
257
|
centroid + Vector3D(0, 0, dz)
|
257
258
|
else:
|
258
259
|
faces_3d = [
|
259
|
-
Face3D(face_vertices)
|
260
|
+
Face3D(face_vertices)
|
261
|
+
for face_vertices in
|
262
|
+
sensor_grid.mesh.face_vertices]
|
260
263
|
face_3d_union = Face3D.join_coplanar_faces(
|
261
264
|
faces_3d, 0.05)
|
262
265
|
assert len(face_3d_union) == 1
|
@@ -6,7 +6,7 @@ from .util import binary_mtx_dimension
|
|
6
6
|
|
7
7
|
def binary_to_array(
|
8
8
|
binary_file: str, nrows: int = None, ncols: int = None,
|
9
|
-
ncomp: int = None, line_count: int = 0) -> np.ndarray:
|
9
|
+
ncomp: int = None, fmt=None, line_count: int = 0) -> np.ndarray:
|
10
10
|
"""Read a Radiance binary file as a NumPy array.
|
11
11
|
|
12
12
|
Args:
|
@@ -14,21 +14,28 @@ def binary_to_array(
|
|
14
14
|
nrows: Number of rows in the Radiance file.
|
15
15
|
ncols: Number of columns in the Radiance file.
|
16
16
|
ncomp: Number of components of each element in the Radiance file.
|
17
|
+
fmt: Format of the Radiance file. Can be either "ascii", "float", or "double.
|
17
18
|
line_count: Number of lines to skip in the input file. Usually used to
|
18
19
|
skip the header.
|
19
20
|
|
20
21
|
Returns:
|
21
22
|
A NumPy array.
|
22
23
|
"""
|
24
|
+
if (nrows or ncols or ncomp or fmt) is None:
|
25
|
+
# get nrows, ncols and header line count
|
26
|
+
nrows, ncols, ncomp, line_count, fmt = binary_mtx_dimension(binary_file)
|
23
27
|
with open(binary_file, 'rb') as reader:
|
24
|
-
if (nrows or ncols or ncomp) is None:
|
25
|
-
# get nrows, ncols and header line count
|
26
|
-
nrows, ncols, ncomp, line_count = binary_mtx_dimension(binary_file)
|
27
28
|
# skip first n lines from reader
|
28
29
|
for i in range(line_count):
|
29
30
|
reader.readline()
|
30
31
|
|
31
|
-
|
32
|
+
if fmt == 'ascii':
|
33
|
+
array = np.loadtxt(reader, dtype=np.float32)
|
34
|
+
elif fmt == 'float':
|
35
|
+
array = np.fromfile(reader, dtype=np.float32)
|
36
|
+
elif fmt == 'double':
|
37
|
+
array = np.fromfile(reader, dtype=np.float64)
|
38
|
+
|
32
39
|
if ncomp != 1:
|
33
40
|
array = array.reshape(nrows, ncols, ncomp)
|
34
41
|
else:
|
@@ -57,7 +64,7 @@ def ascii_to_array(
|
|
57
64
|
if (nrows or ncols or ncomp) is None:
|
58
65
|
# get nrows, ncols and header line count
|
59
66
|
# we can reuse binary_mtx_dimension though the input file is ascii
|
60
|
-
nrows, ncols, ncomp, line_count = binary_mtx_dimension(ascii_file)
|
67
|
+
nrows, ncols, ncomp, line_count, fmt = binary_mtx_dimension(ascii_file)
|
61
68
|
|
62
69
|
array = np.loadtxt(reader, dtype=np.float32, skiprows=line_count)
|
63
70
|
if ncomp != 1:
|
@@ -5,7 +5,7 @@ import numpy as np
|
|
5
5
|
from honeybee_radiance.writer import _filter_by_pattern
|
6
6
|
|
7
7
|
|
8
|
-
def binary_mtx_dimension(filepath: str) -> Tuple[int, int, int, int]:
|
8
|
+
def binary_mtx_dimension(filepath: str) -> Tuple[int, int, int, int, str]:
|
9
9
|
"""Return binary Radiance matrix dimensions if exist.
|
10
10
|
|
11
11
|
This function returns NROWS, NCOLS, NCOMP and number of header lines including the
|
@@ -15,7 +15,7 @@ def binary_mtx_dimension(filepath: str) -> Tuple[int, int, int, int]:
|
|
15
15
|
filepath: Full path to Radiance file.
|
16
16
|
|
17
17
|
Returns:
|
18
|
-
nrows, ncols, ncomp, line_count
|
18
|
+
nrows, ncols, ncomp, line_count, fmt
|
19
19
|
"""
|
20
20
|
try:
|
21
21
|
inf = open(filepath, 'rb', encoding='utf-8')
|
@@ -42,6 +42,7 @@ def binary_mtx_dimension(filepath: str) -> Tuple[int, int, int, int]:
|
|
42
42
|
if line[:6] == 'NCOMP=':
|
43
43
|
ncomp = int(line.split('=')[-1])
|
44
44
|
if line[:7] == 'FORMAT=':
|
45
|
+
fmt = line.split('=')[-1]
|
45
46
|
break
|
46
47
|
|
47
48
|
if not nrows or not ncols:
|
@@ -51,7 +52,7 @@ def binary_mtx_dimension(filepath: str) -> Tuple[int, int, int, int]:
|
|
51
52
|
f'elements.'
|
52
53
|
)
|
53
54
|
raise ValueError(error_message)
|
54
|
-
return nrows, ncols, ncomp, len(header_lines) + 1
|
55
|
+
return nrows, ncols, ncomp, len(header_lines) + 1, fmt
|
55
56
|
finally:
|
56
57
|
inf.close()
|
57
58
|
|
{honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/CODE_OF_CONDUCT.md
RENAMED
File without changes
|
{honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/CONTRIBUTING.md
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{honeybee-radiance-postprocess-0.4.430 → honeybee-radiance-postprocess-0.4.432}/dev-requirements.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|