honeybee-radiance-postprocess 0.4.183__tar.gz → 0.4.185__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 (40) hide show
  1. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/PKG-INFO +1 -1
  2. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/results.py +37 -4
  3. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess.egg-info/PKG-INFO +1 -1
  4. honeybee-radiance-postprocess-0.4.185/honeybee_radiance_postprocess.egg-info/requires.txt +2 -0
  5. honeybee-radiance-postprocess-0.4.185/requirements.txt +2 -0
  6. honeybee-radiance-postprocess-0.4.183/honeybee_radiance_postprocess.egg-info/requires.txt +0 -2
  7. honeybee-radiance-postprocess-0.4.183/requirements.txt +0 -2
  8. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/CODE_OF_CONDUCT.md +0 -0
  9. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/CONTRIBUTING.md +0 -0
  10. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/LICENSE +0 -0
  11. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/MANIFEST.in +0 -0
  12. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/README.md +0 -0
  13. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/dev-requirements.txt +0 -0
  14. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/__init__.py +0 -0
  15. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/__main__.py +0 -0
  16. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/annual.py +0 -0
  17. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/annualdaylight.py +0 -0
  18. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/cli/__init__.py +0 -0
  19. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/cli/grid.py +0 -0
  20. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/cli/leed.py +0 -0
  21. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/cli/mtxop.py +0 -0
  22. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/cli/postprocess.py +0 -0
  23. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/cli/schedule.py +0 -0
  24. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/cli/translate.py +0 -0
  25. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/cli/two_phase.py +0 -0
  26. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/cli/util.py +0 -0
  27. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/dynamic.py +0 -0
  28. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/electriclight.py +0 -0
  29. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/en17037.py +0 -0
  30. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/leed.py +0 -0
  31. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/metrics.py +0 -0
  32. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/reader.py +0 -0
  33. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/type_hints.py +0 -0
  34. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess/util.py +0 -0
  35. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess.egg-info/SOURCES.txt +0 -0
  36. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess.egg-info/dependency_links.txt +0 -0
  37. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess.egg-info/entry_points.txt +0 -0
  38. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/honeybee_radiance_postprocess.egg-info/top_level.txt +0 -0
  39. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/setup.cfg +0 -0
  40. {honeybee-radiance-postprocess-0.4.183 → honeybee-radiance-postprocess-0.4.185}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: honeybee-radiance-postprocess
3
- Version: 0.4.183
3
+ Version: 0.4.185
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
@@ -34,19 +34,21 @@ class _ResultsFolder(object):
34
34
  * folder
35
35
  * grids_info
36
36
  * sun_up_hours
37
+ * sun_down_hours
37
38
  * light_paths
38
39
  * default_states
39
40
  * grid_states
40
41
  * timestep
41
42
 
42
43
  """
43
- __slots__ = ('_folder', '_grids_info', '_sun_up_hours', '_datetimes', '_light_paths',
44
- '_default_states', '_grid_states', '_timestep')
44
+ __slots__ = ('_folder', '_grids_info', '_sun_up_hours', '_sun_down_hours',
45
+ '_datetimes', '_light_paths', '_default_states',
46
+ '_grid_states', '_timestep')
45
47
 
46
48
  def __init__(self, folder: Union[str, Path]):
47
49
  """Initialize ResultsFolder."""
48
50
  self._folder = Path(folder).absolute().as_posix()
49
- self.grids_info, self._sun_up_hours = _process_input_folder(self.folder, '*')
51
+ self.grids_info, self.sun_up_hours = _process_input_folder(self.folder, '*')
50
52
  self._datetimes = [
51
53
  DateTime.from_hoy(hoy) for hoy in list(map(float, self.sun_up_hours))
52
54
  ]
@@ -87,6 +89,22 @@ class _ResultsFolder(object):
87
89
  """Return sun up hours."""
88
90
  return self._sun_up_hours
89
91
 
92
+ @sun_up_hours.setter
93
+ def sun_up_hours(self, sun_up_hours):
94
+ assert isinstance(sun_up_hours, list), \
95
+ f'Sun up hours must be a list. Got object of type: {type(sun_up_hours)}'
96
+ assert len(sun_up_hours) <= 8760, \
97
+ (f'Length of sun up hours cannot be more than 8760. Got object of '
98
+ f'length: {len(sun_up_hours)}.')
99
+ self._sun_up_hours = sun_up_hours
100
+ all_hours = np.arange(0.5, 8760.5, 1).tolist()
101
+ self._sun_down_hours = set(sun_up_hours).symmetric_difference(all_hours)
102
+
103
+ @property
104
+ def sun_down_hours(self):
105
+ """Return sun down hours."""
106
+ return self._sun_down_hours
107
+
90
108
  @property
91
109
  def datetimes(self):
92
110
  """Return DateTimes for sun up hours."""
@@ -786,7 +804,8 @@ class Results(_ResultsFolder):
786
804
  """Get median values for each sensor over a given period.
787
805
 
788
806
  The hoys input can be used to filter the data for a particular time
789
- period.
807
+ period. If hoys is left empty the median values will likely be 0 since
808
+ there are likely more sun down hours than sun up hours.
790
809
 
791
810
  Args:
792
811
  hoys: An optional numbers or list of numbers to select the hours of
@@ -809,6 +828,20 @@ class Results(_ResultsFolder):
809
828
  if np.any(array):
810
829
  array_filter = np.apply_along_axis(
811
830
  filter_array, 1, array, mask=mask)
831
+ if not hoys:
832
+ # concatenate zero array
833
+ zero_array = \
834
+ np.zeros((grid_info['count'], len(self.sun_down_hours)))
835
+ array_filter = np.concatenate((array_filter, zero_array), axis=1)
836
+ else:
837
+ # find number of hoys that are sun down hours
838
+ sdh_hoys = \
839
+ len(set([int(h) for h in self.sun_down_hours]).intersection(hoys))
840
+ if sdh_hoys != 0:
841
+ # concatenate zero array
842
+ zero_array = np.zeros((grid_info['count'], sdh_hoys))
843
+ array_filter = \
844
+ np.concatenate((array_filter, zero_array), axis=1)
812
845
  results = np.median(array_filter, axis=1)
813
846
  else:
814
847
  results = np.zeros(grid_info['count'])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: honeybee-radiance-postprocess
3
- Version: 0.4.183
3
+ Version: 0.4.185
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
@@ -0,0 +1,2 @@
1
+ honeybee-radiance==1.64.165
2
+ numpy>=1.21.6
@@ -0,0 +1,2 @@
1
+ honeybee-radiance==1.64.165
2
+ numpy>=1.21.6
@@ -1,2 +0,0 @@
1
- honeybee-radiance==1.64.164
2
- numpy>=1.21.6
@@ -1,2 +0,0 @@
1
- honeybee-radiance==1.64.164
2
- numpy>=1.21.6