Skip to content

Commit

Permalink
fix(receiver): catch edge cases in translation
Browse files Browse the repository at this point in the history
  • Loading branch information
mostaphaRoudsari committed Feb 14, 2022
1 parent 06912e4 commit 6aac3da
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion honeybee_radiance_folder/folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"""
import json
import warnings
import os
import re
import shutil
Expand Down Expand Up @@ -591,7 +592,7 @@ def combined_receivers(self, folder='receiver', auto_mtx_path=False):
A dictionary containing grid identifiers as keys and the receiver rad files
as values.
"""
grids = self.grid_data_all()
grids = self.grid_data_all() or []

apt_group_folder = self.aperture_group_folder(full=False)

Expand All @@ -606,6 +607,14 @@ def combined_receivers(self, folder='receiver', auto_mtx_path=False):

# find the light_path for each grid
for grid in grids:
if not 'light_path' in grid:
# The light-path for this grid is not set
# This grid will be ignored for 3/5 phase studies
warnings.warn(
'%s sensor grid has no light-path. It will not be included in three '
'or five phase studies.' % grid['name']
)
continue
light_path = grid['light_path']
# remove the static windows
# another way is to check for the ones which has a mtx file.
Expand Down

0 comments on commit 6aac3da

Please sign in to comment.