diff --git a/honeybee_radiance_postprocess/ies/lm.py b/honeybee_radiance_postprocess/ies/lm.py index b411d34e..3c1cad31 100644 --- a/honeybee_radiance_postprocess/ies/lm.py +++ b/honeybee_radiance_postprocess/ies/lm.py @@ -1,28 +1,14 @@ """Functions for IES LM post-processing.""" from typing import Tuple, Union -from pathlib import Path from collections import defaultdict -import json import itertools import numpy as np -from ladybug.analysisperiod import AnalysisPeriod -from ladybug.datatype.generic import GenericType -from ladybug.color import Colorset -from ladybug.datacollection import HourlyContinuousCollection -from ladybug.datatype.fraction import Fraction -from ladybug.datatype.time import Time -from ladybug.legend import LegendParameters -from ladybug.header import Header -from honeybee.model import Model -from honeybee.units import conversion_factor_to_meters -from honeybee_radiance.writer import _filter_by_pattern from honeybee_radiance.postprocess.annual import filter_schedule_by_hours -from ..metrics import da_array2d, ase_array2d from ..annual import schedule_to_hoys, occupancy_schedule_8_to_6 from ..results.annual_daylight import AnnualDaylight -from ..util import filter_array, recursive_dict_merge +from ..util import filter_array from ..dynamic import DynamicSchedule, ApertureGroupSchedule from .lm_schedule import shd_trans_schedule_descending, states_schedule_descending @@ -124,7 +110,13 @@ def dynamic_schedule_direct_illuminance( for grid_info in grids_info: grid_count = grid_info['count'] - light_paths = [lp[0] for lp in grid_info['light_path']] + light_paths = [] + for lp in grid_info['light_path']: + for _lp in lp: + if _lp == '__static_apertures__' and len(lp) > 1: + pass + else: + light_paths.append(_lp) shade_transmittances, shd_trans_dict = ( shade_transmittance_per_light_path( diff --git a/honeybee_radiance_postprocess/leed/leed.py b/honeybee_radiance_postprocess/leed/leed.py index 3615a9d4..1a3a297c 100644 --- a/honeybee_radiance_postprocess/leed/leed.py +++ b/honeybee_radiance_postprocess/leed/leed.py @@ -340,7 +340,13 @@ def leed_states_schedule( for grid_info in grids_info: grid_count = grid_info['count'] - light_paths = [lp[0] for lp in grid_info['light_path']] + light_paths = [] + for lp in grid_info['light_path']: + for _lp in lp: + if _lp == '__static_apertures__' and len(lp) > 1: + pass + else: + light_paths.append(_lp) shade_transmittances, shd_trans_dict = ( shade_transmittance_per_light_path( @@ -525,7 +531,13 @@ def leed_option_one( pass_ase_grids = [] ase_hr_pct = [] for (grid_info, grid_area) in zip(grids_info, grid_areas): - light_paths = [lp[0] for lp in grid_info['light_path']] + light_paths = [] + for lp in grid_info['light_path']: + for _lp in lp: + if _lp == '__static_apertures__' and len(lp) > 1: + pass + else: + light_paths.append(_lp) arrays = [] # combine direct array for all light paths for light_path in light_paths: @@ -558,7 +570,13 @@ def leed_option_one( pass_sda_blinds_up_grids = [] pass_sda_blinds_down_grids = [] for grid_info in grids_info: - light_paths = [lp[0] for lp in grid_info['light_path']] + light_paths = [] + for lp in grid_info['light_path']: + for _lp in lp: + if _lp == '__static_apertures__' and len(lp) > 1: + pass + else: + light_paths.append(_lp) 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()] diff --git a/honeybee_radiance_postprocess/results/results.py b/honeybee_radiance_postprocess/results/results.py index bf217ae4..8a680026 100644 --- a/honeybee_radiance_postprocess/results/results.py +++ b/honeybee_radiance_postprocess/results/results.py @@ -1188,7 +1188,13 @@ def _filter_grid_states(self, grid_info, states: DynamicSchedule = None) -> Dyna Returns: dict: A filtered states dictionary. """ - light_paths = [elem for lp in grid_info['light_path'] for elem in lp] + light_paths = [] + for lp in grid_info['light_path']: + for _lp in lp: + if _lp == '__static_apertures__' and len(lp) > 1: + pass + else: + light_paths.append(_lp) if states: states = states.filter_by_identifiers(light_paths) else: diff --git a/honeybee_radiance_postprocess/well/well.py b/honeybee_radiance_postprocess/well/well.py index 655ad550..d548d1c3 100644 --- a/honeybee_radiance_postprocess/well/well.py +++ b/honeybee_radiance_postprocess/well/well.py @@ -1,9 +1,7 @@ """Functions for WELL post-processing.""" from typing import Tuple, Union from pathlib import Path -from collections import defaultdict import json -import itertools import numpy as np from ladybug.analysisperiod import AnalysisPeriod @@ -239,7 +237,13 @@ def well_annual_daylight( l01_pass_sda_blinds_up_grids = [] l01_pass_sda_blinds_down_grids = [] for grid_info in grids_info: - light_paths = [lp[0] for lp in grid_info['light_path']] + light_paths = [] + for lp in grid_info['light_path']: + for _lp in lp: + if _lp == '__static_apertures__' and len(lp) > 1: + pass + else: + light_paths.append(_lp) base_zero_array = np.apply_along_axis(filter_array, 1, np.zeros( (grid_info['count'], len(results.sun_up_hours))), occ_mask) arrays_blinds_up = [base_zero_array.copy()]