Skip to content

Commit

Permalink
refact(method): add ev to edgps calc output
Browse files Browse the repository at this point in the history
  • Loading branch information
taoning committed Nov 1, 2024
1 parent 6098220 commit 7bec4fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frads/eplus.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ def calculate_wpi(self, zone: str, cfs_name: Dict[str, str]) -> np.ndarray:
sensor_name, cfs_name, date_time, dni, dhi
)

def calculate_edgps(self, zone: str, cfs_name: Dict[str, str]) -> float:
def calculate_edgps(self, zone: str, cfs_name: Dict[str, str]) -> tuple[float,float]:
"""Calculate enhanced simplified daylight glare probability in a zone.
The view is positioned at the center of the zone with direction facing
the windows, weighted by the window area.
Expand Down
4 changes: 2 additions & 2 deletions frads/methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@ def calculate_edgps(
dhi: float,
ambient_bounce: int = 0,
save_hdr: Optional[Union[str, Path]] = None,
) -> float:
) -> tuple[float,float]:
"""Calculate enhanced simplified daylight glare probability (EDGPs) for a view.
Args:
Expand Down Expand Up @@ -1296,7 +1296,7 @@ def calculate_edgps(
res = pr.evalglare(hdr, fast=1, correction_mode="l-", ev=ev.item())
edgps = float(res)
os.remove(octree)
return edgps
return edgps, ev.item()

def save_matrices(self):
"""Saves the view window matrices, sensor window matrices, and daylight matrices
Expand Down

0 comments on commit 7bec4fe

Please sign in to comment.