Skip to content

Commit 582b956

Browse files
authored
Fix iam.martin_ruiz equation in docs #1561 (#1599)
* Fix martin_ruiz eq in docs #1561 * Add whatsnew entry
1 parent eefc35c commit 582b956

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

docs/sphinx/source/whatsnew/v0.9.4.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ Testing
2727
~~~~~~~
2828
* Corrected a flawed test for :py:func:`~pvlib.irradiance.get_ground_diffuse` (:issue:`1569`, :pull:`1575`)
2929

30+
3031
Documentation
3132
~~~~~~~~~~~~~
32-
33+
* Fixed equation in :py:func:`pvlib.iam.martin_ruiz` docstring (:issue:`1561`, :pull:`1599`)
3334

3435
Benchmarking
3536
~~~~~~~~~~~~~
@@ -48,3 +49,4 @@ Contributors
4849
* Marcus Boumans (:ghuser:`bowie2211`)
4950
* Karel De Brabandere (:ghuser:`kdebrab`)
5051
* Naman Priyadarshi (:ghuser:`Naman-Priyadarshi`)
52+
* Echedey Luis (:ghuser:`echedey-ls`)

pvlib/iam.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def martin_ruiz(aoi, a_r=0.16):
227227
228228
.. math::
229229
230-
IAM = \frac{1 - \exp(-\cos(\frac{aoi}{a_r}))}
230+
IAM = \frac{1 - \exp(-\frac{\cos(aoi)}{a_r})}
231231
{1 - \exp(\frac{-1}{a_r})}
232232
233233
which is presented as :math:`AL(\alpha) = 1 - IAM` in equation 4 of [1]_,
@@ -353,7 +353,6 @@ def martin_ruiz_diffuse(surface_tilt, a_r=0.16, c1=0.4244, c2=None):
353353
# avoid undefined results for horizontal or upside-down surfaces
354354
zeroang = 1e-06
355355

356-
357356
surface_tilt = np.where(surface_tilt == 0, zeroang, surface_tilt)
358357
surface_tilt = np.where(surface_tilt == 180, 180 - zeroang, surface_tilt)
359358

0 commit comments

Comments
 (0)