honeybee-radiance-postprocess 0.4.415__tar.gz → 0.4.417__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.415 → honeybee-radiance-postprocess-0.4.417}/PKG-INFO +1 -1
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/abnt.py +16 -6
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/two_phase.py +1 -0
- honeybee-radiance-postprocess-0.4.417/honeybee_radiance_postprocess/data_type.py +97 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess.egg-info/PKG-INFO +1 -1
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess.egg-info/SOURCES.txt +1 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/CODE_OF_CONDUCT.md +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/CONTRIBUTING.md +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/LICENSE +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/MANIFEST.in +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/README.md +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/dev-requirements.txt +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/__init__.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/__main__.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/annual.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/annualdaylight.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/annualirradiance.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/__init__.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/grid.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/leed.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/mtxop.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/postprocess.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/schedule.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/translate.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/util.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/dynamic.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/electriclight.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/en17037.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/helper.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/leed.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/metrics.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/reader.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/results/__init__.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/results/annual_daylight.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/results/annual_irradiance.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/results/results.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/type_hints.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/util.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/vis_metadata.py +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess.egg-info/dependency_links.txt +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess.egg-info/entry_points.txt +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess.egg-info/requires.txt +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess.egg-info/top_level.txt +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/requirements.txt +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/setup.cfg +0 -0
- {honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/setup.py +0 -0
@@ -62,10 +62,21 @@ def abnt_nbr_15575(
|
|
62
62
|
a requirement that the sensor grids have Meshes.
|
63
63
|
"""
|
64
64
|
def find_surrounding_points(x, y, x_coords, y_coords):
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
65
|
+
"""Find the four nearest points and return the minimum and maximum
|
66
|
+
x and y values."""
|
67
|
+
# calculate Euclidean distances
|
68
|
+
distances = np.sqrt((x_coords - x)**2 + (y_coords - y)**2)
|
69
|
+
# get the four nearest points
|
70
|
+
if len(distances) < 4:
|
71
|
+
# if the grid for some reason has less than four sensors
|
72
|
+
nearest_indices = np.argsort(distances)[:len(distances)]
|
73
|
+
else:
|
74
|
+
nearest_indices = np.argsort(distances)[:4]
|
75
|
+
x_values = x_coords[nearest_indices]
|
76
|
+
y_values = y_coords[nearest_indices]
|
77
|
+
x1, x2 = min(x_values), max(x_values)
|
78
|
+
y1, y2 = min(y_values), max(y_values)
|
79
|
+
|
69
80
|
return x1, x2, y1, y2
|
70
81
|
|
71
82
|
def get_value(x, y, x_coords, y_coords, values):
|
@@ -73,7 +84,7 @@ def abnt_nbr_15575(
|
|
73
84
|
index = np.where((np.abs(x_coords - x) <= tolerance) & (np.abs(y_coords - y) <= tolerance))
|
74
85
|
return values[index][0]
|
75
86
|
|
76
|
-
def perform_interpolation(x, y, x_coords,
|
87
|
+
def perform_interpolation(x, y, x_coords, y_caoords, pit_values):
|
77
88
|
x1, x2, y1, y2 = find_surrounding_points(x, y, x_coords, y_coords)
|
78
89
|
|
79
90
|
# extract the illuminance values at the surrounding points
|
@@ -153,7 +164,6 @@ def abnt_nbr_15575(
|
|
153
164
|
|
154
165
|
x_coords = sensor_points[:, 0]
|
155
166
|
y_coords = sensor_points[:, 1]
|
156
|
-
|
157
167
|
room = hb_model.rooms_by_identifier([sensor_grid.room_identifier])[0]
|
158
168
|
|
159
169
|
pof_sensor_grid = \
|
@@ -0,0 +1,97 @@
|
|
1
|
+
"""Functions for NumPy data type (dtype)."""
|
2
|
+
from typing import Tuple
|
3
|
+
import numpy as np
|
4
|
+
|
5
|
+
|
6
|
+
def smallest_integer_dtype(array: np.ndarray) -> np.signedinteger:
|
7
|
+
"""Return the smallest possible integer dtype.
|
8
|
+
|
9
|
+
Args:
|
10
|
+
array: NumPy array.
|
11
|
+
|
12
|
+
Returns:
|
13
|
+
A NumPy integer dtype.
|
14
|
+
"""
|
15
|
+
if np.all(array >= np.iinfo(np.int8).min) and \
|
16
|
+
np.all(array <= np.iinfo(np.int8).max):
|
17
|
+
return np.int8
|
18
|
+
elif np.all(array >= np.iinfo(np.int16).min) and \
|
19
|
+
np.all(array <= np.iinfo(np.int16).max):
|
20
|
+
return np.int16
|
21
|
+
elif np.all(array >= np.iinfo(np.int32).min) and \
|
22
|
+
np.all(array <= np.iinfo(np.int32).max):
|
23
|
+
return np.int32
|
24
|
+
elif np.all(array >= np.iinfo(np.int64).min) and \
|
25
|
+
np.all(array <= np.iinfo(np.int64).max):
|
26
|
+
return np.int64
|
27
|
+
|
28
|
+
|
29
|
+
def smallest_float_dtype(array: np.ndarray, rtol: float = 1e-5,
|
30
|
+
atol: float = 1e-5) -> np.floating:
|
31
|
+
"""Return the smallest possible float dtype.
|
32
|
+
|
33
|
+
The allclose function is used to check if a certain floating-point precision
|
34
|
+
can be used without losing accuracy.
|
35
|
+
|
36
|
+
Args:
|
37
|
+
array: NumPy array.
|
38
|
+
rtol: The relative tolerance parameter for `np.allclose`. The default
|
39
|
+
is 1e-5.
|
40
|
+
atol: The absolute tolerance parameter for `np.allclose`. The default
|
41
|
+
is 1e-5.
|
42
|
+
|
43
|
+
Returns:
|
44
|
+
A NumPy floating dtype.
|
45
|
+
"""
|
46
|
+
if np.all((array >= np.finfo(np.float16).min) & \
|
47
|
+
(array <= np.finfo(np.float16).max)):
|
48
|
+
if np.allclose(array, array.astype(np.float16), rtol=rtol, atol=atol):
|
49
|
+
return np.float16
|
50
|
+
if np.all((array >= np.finfo(np.float32).min) & \
|
51
|
+
(array <= np.finfo(np.float32).max)):
|
52
|
+
if np.allclose(array, array.astype(np.float32), rtol=rtol, atol=atol):
|
53
|
+
return np.float32
|
54
|
+
if np.all((array >= np.finfo(np.float64).min) & \
|
55
|
+
(array <= np.finfo(np.float64).max)):
|
56
|
+
if np.allclose(array, array.astype(np.float64), rtol=rtol, atol=atol):
|
57
|
+
return np.float64
|
58
|
+
|
59
|
+
|
60
|
+
def smallest_dtype(array: np.ndarray, rtol: float = 1e-5, atol: float = 1e-5
|
61
|
+
) -> Tuple[np.signedinteger, np.floating]:
|
62
|
+
"""Return the smallest possible dtype.
|
63
|
+
|
64
|
+
Args:
|
65
|
+
array: NumPy array.
|
66
|
+
rtol: The relative tolerance parameter for `np.allclose`. The default
|
67
|
+
is 1e-5. This is also used if the dtype of the array is np.floating.
|
68
|
+
atol: The absolute tolerance parameter for `np.allclose`. The default
|
69
|
+
is 1e-5. This is also used if the dtype of the array is np.floating.
|
70
|
+
|
71
|
+
Returns:
|
72
|
+
A NumPy dtype.
|
73
|
+
"""
|
74
|
+
if np.issubdtype(array.dtype, np.integer):
|
75
|
+
return smallest_integer_dtype(array)
|
76
|
+
elif np.issubdtype(array.dtype, np.floating):
|
77
|
+
return smallest_float_dtype(array, rtol=rtol, atol=atol)
|
78
|
+
else:
|
79
|
+
raise TypeError(f'Expected integer or floating dtype. Got {array.dtype}')
|
80
|
+
|
81
|
+
|
82
|
+
def set_smallest_dtype(array: np.ndarray, rtol: float = 1e-5,
|
83
|
+
atol: float = 1e-5) -> np.ndarray:
|
84
|
+
"""Return a NumPy array with the smallest possible dtype.
|
85
|
+
|
86
|
+
Args:
|
87
|
+
array: NumPy array.
|
88
|
+
rtol: The relative tolerance parameter for `np.allclose`. The default
|
89
|
+
is 1e-5. This is also used if the dtype of the array is np.floating.
|
90
|
+
atol: The absolute tolerance parameter for `np.allclose`. The default
|
91
|
+
is 1e-5. This is also used if the dtype of the array is np.floating.
|
92
|
+
|
93
|
+
Returns:
|
94
|
+
A new NumPy array with a smaller dtype.
|
95
|
+
"""
|
96
|
+
dtype = smallest_dtype(array, rtol=rtol, atol=atol)
|
97
|
+
return array.astype(dtype)
|
@@ -12,6 +12,7 @@ honeybee_radiance_postprocess/__main__.py
|
|
12
12
|
honeybee_radiance_postprocess/annual.py
|
13
13
|
honeybee_radiance_postprocess/annualdaylight.py
|
14
14
|
honeybee_radiance_postprocess/annualirradiance.py
|
15
|
+
honeybee_radiance_postprocess/data_type.py
|
15
16
|
honeybee_radiance_postprocess/dynamic.py
|
16
17
|
honeybee_radiance_postprocess/electriclight.py
|
17
18
|
honeybee_radiance_postprocess/en17037.py
|
{honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/CODE_OF_CONDUCT.md
RENAMED
File without changes
|
{honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/CONTRIBUTING.md
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/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
|
{honeybee-radiance-postprocess-0.4.415 → honeybee-radiance-postprocess-0.4.417}/requirements.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|