honeybee-radiance-postprocess 0.4.416__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.
Files changed (46) hide show
  1. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/PKG-INFO +1 -1
  2. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/abnt.py +16 -6
  3. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess.egg-info/PKG-INFO +1 -1
  4. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/CODE_OF_CONDUCT.md +0 -0
  5. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/CONTRIBUTING.md +0 -0
  6. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/LICENSE +0 -0
  7. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/MANIFEST.in +0 -0
  8. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/README.md +0 -0
  9. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/dev-requirements.txt +0 -0
  10. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/__init__.py +0 -0
  11. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/__main__.py +0 -0
  12. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/annual.py +0 -0
  13. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/annualdaylight.py +0 -0
  14. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/annualirradiance.py +0 -0
  15. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/__init__.py +0 -0
  16. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/grid.py +0 -0
  17. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/leed.py +0 -0
  18. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/mtxop.py +0 -0
  19. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/postprocess.py +0 -0
  20. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/schedule.py +0 -0
  21. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/translate.py +0 -0
  22. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/two_phase.py +0 -0
  23. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/cli/util.py +0 -0
  24. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/data_type.py +0 -0
  25. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/dynamic.py +0 -0
  26. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/electriclight.py +0 -0
  27. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/en17037.py +0 -0
  28. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/helper.py +0 -0
  29. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/leed.py +0 -0
  30. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/metrics.py +0 -0
  31. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/reader.py +0 -0
  32. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/results/__init__.py +0 -0
  33. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/results/annual_daylight.py +0 -0
  34. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/results/annual_irradiance.py +0 -0
  35. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/results/results.py +0 -0
  36. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/type_hints.py +0 -0
  37. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/util.py +0 -0
  38. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess/vis_metadata.py +0 -0
  39. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess.egg-info/SOURCES.txt +0 -0
  40. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess.egg-info/dependency_links.txt +0 -0
  41. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess.egg-info/entry_points.txt +0 -0
  42. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess.egg-info/requires.txt +0 -0
  43. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/honeybee_radiance_postprocess.egg-info/top_level.txt +0 -0
  44. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/requirements.txt +0 -0
  45. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/setup.cfg +0 -0
  46. {honeybee-radiance-postprocess-0.4.416 → honeybee-radiance-postprocess-0.4.417}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: honeybee-radiance-postprocess
3
- Version: 0.4.416
3
+ Version: 0.4.417
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
@@ -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
- x1 = np.max(x_coords[x_coords <= x]) if np.any(x_coords <= x) else x_coords[0]
66
- x2 = np.min(x_coords[x_coords > x]) if np.any(x_coords > x) else x_coords[-1]
67
- y1 = np.max(y_coords[y_coords <= y]) if np.any(y_coords <= y) else y_coords[0]
68
- y2 = np.min(y_coords[y_coords > y]) if np.any(y_coords > y) else y_coords[-1]
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, y_coords, pit_values):
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 = \
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: honeybee-radiance-postprocess
3
- Version: 0.4.416
3
+ Version: 0.4.417
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