Skip to content

Commit

Permalink
Degradation Integral exponential term fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobin Ford committed Dec 27, 2024
1 parent 9000035 commit 4f9e116
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 357 deletions.
4 changes: 2 additions & 2 deletions pvdeg/degradation.py
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ def degradation(
C=C
)

# @njit
@njit
def deg(
wavelengths: np.ndarray,
irr: np.ndarray,
Expand All @@ -1001,8 +1001,8 @@ def deg(
# inner integral
# wavelength d lambda
irr_weighted = irr * np.exp(-C2 * wavelengths) # weight irradiances
irr_weighted *= wav_bin # multiply instantanous irradiance by bin size for rectangular integration
irr_pow = irr_weighted ** p # dependence on irradiance
irr_weighted *= wav_bin # multiply instantanous irradiance by bin size for rectangular integration
wavelength_integral = np.sum(irr_pow, axis=1) # sum over wavelengths for integration

# outer integral
Expand Down
Loading

0 comments on commit 4f9e116

Please sign in to comment.