Skip to content

Commit

Permalink
docs(metrics): ASE docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkelkp committed Jan 9, 2025
1 parent e1c4519 commit b9bfd4c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions honeybee_radiance_postprocess/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,16 @@ def ase_array2d(
Defaults to 1000.
Returns:
A NumPy float of the ASE as a percentage (decimal).
A Tuple with two values.
- ase: NumPy float of the ASE as a percentage (decimal).
- h_above: 1D NumPy array of the number of hours above the direct
threshold.
"""
check_array_dim(array, 2)
h_above = (array > direct_threshold).sum(axis=1)
ase = (h_above > occ_hours).sum() / array.shape[0] * 100
ase = (h_above >= occ_hours).sum() / array.shape[0] * 100

return ase, h_above

Expand Down

0 comments on commit b9bfd4c

Please sign in to comment.