Skip to content

Commit

Permalink
fix(leed): Add check for static apertures in new LEED post-processing
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkelkp committed Sep 6, 2024
1 parent 553ffeb commit f8f452f
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions honeybee_radiance_postprocess/leed/leed.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,26 +557,36 @@ def leed_option_one(
pass_sda_blinds_down_grids = []
for grid_info in grids_info:
light_paths = [lp[0] for lp in grid_info['light_path']]
arrays = []
arrays_blinds_up = []
arrays_blinds_down = []
base_zero_array = np.apply_along_axis(filter_array, 1, np.zeros(
(grid_info['count'], len(results.sun_up_hours))), occ_mask)
arrays = [base_zero_array.copy()]
arrays_blinds_up = [base_zero_array.copy()]
arrays_blinds_down = [base_zero_array.copy()]
# combine total array for all light paths
if use_states:
array = results._array_from_states(grid_info, states=states_schedule)
array = np.apply_along_axis(filter_array, 1, array, occ_mask)

for light_path in light_paths:
# do an extra pass to calculate with blinds always up or down
array_blinds_up = results._get_array(
grid_info, light_path, state=0, res_type='total')
array_filter = np.apply_along_axis(
filter_array, 1, array_blinds_up, occ_mask)
arrays_blinds_up.append(array_filter)
array_blinds_down = results._get_array(
grid_info, light_path, state=1, res_type='total')
array_filter = np.apply_along_axis(
filter_array, 1, array_blinds_down, occ_mask)
arrays_blinds_down.append(array_filter)
if light_path != '__static_apertures__':
array_blinds_up = results._get_array(
grid_info, light_path, state=0, res_type='total')
array_filter = np.apply_along_axis(
filter_array, 1, array_blinds_up, occ_mask)
arrays_blinds_up.append(array_filter)
array_blinds_down = results._get_array(
grid_info, light_path, state=1, res_type='total')
array_filter = np.apply_along_axis(
filter_array, 1, array_blinds_down, occ_mask)
arrays_blinds_down.append(array_filter)
else:
static_array = results._get_array(
grid_info, light_path, state=0, res_type='total')
array_filter = np.apply_along_axis(
filter_array, 1, static_array, occ_mask)
arrays_blinds_up.append(array_filter)
arrays_blinds_down.append(array_filter)
else:
for light_path in light_paths:
array = results._get_array(
Expand Down

0 comments on commit f8f452f

Please sign in to comment.