Skip to content

Commit 9af2420

Browse files
RDaxinicwhanse
andauthored
Apply suggestions from code review
Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
1 parent 9b6b8bb commit 9af2420

1 file changed

Lines changed: 37 additions & 41 deletions

File tree

pvlib/irradiance.py

Lines changed: 37 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def aoi_projection(surface_tilt, surface_azimuth, solar_zenith, solar_azimuth):
174174
Panel tilt from horizontal. See :term:`surface_tilt`. [°]
175175
176176
surface_azimuth : numeric
177-
Panel azimuth from north. See :term:`surface_azimuth`. [°]
177+
Panel azimuth. See :term:`surface_azimuth`. [°]
178178
179179
solar_zenith : numeric
180180
Solar zenith angle. See :term:`solar_zenith`. [°]
@@ -217,7 +217,7 @@ def aoi(surface_tilt, surface_azimuth, solar_zenith, solar_azimuth):
217217
surface_tilt : numeric
218218
Panel tilt from horizontal. See :term:`surface_tilt`. [°]
219219
surface_azimuth : numeric
220-
Panel azimuth from north. See :term:`surface_azimuth`. [°]
220+
Panel azimuth. See :term:`surface_azimuth`. [°]
221221
solar_zenith : numeric
222222
Solar zenith angle. See :term:`solar_zenith`. [°]
223223
solar_azimuth : numeric
@@ -251,7 +251,7 @@ def beam_component(surface_tilt, surface_azimuth, solar_zenith, solar_azimuth,
251251
surface_tilt : numeric
252252
Panel tilt from horizontal. See :term:`surface_tilt`. [°]
253253
surface_azimuth : numeric
254-
Panel azimuth from north. See :term:`surface_azimuth`. [°]
254+
Panel azimuth. See :term:`surface_azimuth`. [°]
255255
solar_zenith : numeric
256256
Solar zenith angle. See :term:`solar_zenith`. [°]
257257
solar_azimuth : numeric
@@ -299,7 +299,7 @@ def get_total_irradiance(surface_tilt, surface_azimuth,
299299
surface_tilt : numeric
300300
Panel tilt from horizontal. See :term:`surface_tilt`. [°]
301301
surface_azimuth : numeric
302-
Panel azimuth from north. See :term:`surface_azimuth`. [°]
302+
Panel azimuth. See :term:`surface_azimuth`. [°]
303303
solar_zenith : numeric
304304
Solar zenith angle. See :term:`solar_zenith`. [°]
305305
solar_azimuth : numeric
@@ -380,7 +380,7 @@ def get_sky_diffuse(surface_tilt, surface_azimuth,
380380
surface_tilt : numeric
381381
Panel tilt from horizontal. See :term:`surface_tilt`. [°]
382382
surface_azimuth : numeric
383-
Panel azimuth from north. See :term:`surface_azimuth`. [°]
383+
Panel azimuth. See :term:`surface_azimuth`. [°]
384384
solar_zenith : numeric
385385
Solar zenith angle. See :term:`solar_zenith`. [°]
386386
solar_azimuth : numeric
@@ -477,7 +477,7 @@ def poa_components(aoi, dni, poa_sky_diffuse, poa_ground_diffuse):
477477
----------
478478
aoi : numeric
479479
Angle of incidence of solar rays with respect to the module
480-
surface, from :func:`aoi`. See :term:`aoi`. [°]
480+
surface. See :term:`aoi`. [°]
481481
482482
dni : numeric
483483
Direct normal irradiance, as measured from a TMY file or
@@ -488,7 +488,7 @@ def poa_components(aoi, dni, poa_sky_diffuse, poa_ground_diffuse):
488488
calculated by a diffuse irradiance translation function. [Wm⁻²]
489489
490490
poa_ground_diffuse : numeric
491-
Ground reflected irradiance in the plane of the modules,
491+
Ground-reflected irradiance in the plane of the modules,
492492
as calculated by an albedo model (eg. :func:`grounddiffuse`). [Wm⁻²]
493493
494494
Returns
@@ -546,8 +546,8 @@ def get_ground_diffuse(surface_tilt, ghi, albedo=.25, surface_type=None):
546546
Global horizontal irradiance. See :term:`ghi`. [Wm⁻²]
547547
548548
albedo : numeric, default 0.25
549-
Ground surface albedo., typically 0.1-0.4 for surfaces on Earth
550-
(land), may increase over snow, ice, etc. May also be known as
549+
Ground surface albedo., typically 0.1-0.4 for bare or vegetated ground,
550+
may increase over snow, ice, etc. May also be known as
551551
the reflection coefficient. Must be >=0 and <=1. Will be
552552
overridden if ``surface_type`` is supplied. See :term:`albedo`.
553553
[unitless]
@@ -651,7 +651,7 @@ def klucher(surface_tilt, surface_azimuth, dhi, ghi, solar_zenith,
651651
Panel tilt from horizontal. See :term:`surface_tilt`. [°]
652652
653653
surface_azimuth : numeric
654-
Panel azimuth from north. See :term:`surface_azimuth`. [°]
654+
Panel azimuth. See :term:`surface_azimuth`. [°]
655655
656656
dhi : numeric
657657
Diffuse horizontal irradiance, must be >=0. See :term:`dhi`. [Wm⁻²]
@@ -751,7 +751,7 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
751751
Panel tilt from the horizontal. See :term:`surface_tilt`. [°]
752752
753753
surface_azimuth : numeric
754-
Panel azimuth from north. See :term:`surface_azimuth`. [°]
754+
Panel azimuth. See :term:`surface_azimuth`. [°]
755755
756756
dhi : numeric
757757
Diffuse horizontal irradiance, see :term:`dhi`. [Wm⁻²]
@@ -890,7 +890,7 @@ def reindl(surface_tilt, surface_azimuth, dhi, dni, ghi, dni_extra,
890890
Panel tilt from the horizontal. See :term:`surface_tilt`. [°]
891891
892892
surface_azimuth : numeric
893-
Panel azimuth from north. See :term:`surface_azimuth`. [°]
893+
Panel azimuth. See :term:`surface_azimuth`. [°]
894894
895895
dhi : numeric
896896
Diffuse horizontal irradiance, see :term:`dhi`. [Wm⁻²]
@@ -1058,10 +1058,10 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
10581058
See :term:`surface_azimuth`. [°]
10591059
10601060
dhi : numeric
1061-
Diffuse horizontal irradiancm, must be >=0. [Wm⁻²]
1061+
Diffuse horizontal irradiance, must be >=0. [Wm⁻²]
10621062
10631063
dni : numeric
1064-
Direct normal irradiancm, must be >=0. [Wm⁻²]
1064+
Direct normal irradiance, must be >=0. [Wm⁻²]
10651065
10661066
10671067
dni_extra : numeric
@@ -1322,10 +1322,10 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
13221322
See :term:`surface_azimuth`. [°]
13231323
13241324
dhi : numeric
1325-
Diffuse horizontal irradiancm, must be >=0. [Wm⁻²]
1325+
Diffuse horizontal irradiance, must be >=0. [Wm⁻²]
13261326
13271327
dni : numeric
1328-
Direct normal irradiancm, must be >=0. [Wm⁻²]
1328+
Direct normal irradiance, must be >=0. [Wm⁻²]
13291329
13301330
13311331
dni_extra : numeric
@@ -1340,7 +1340,7 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
13401340
See :term:`solar_azimuth`. [°]
13411341
13421342
airmass : numeric, optional
1343-
Relative (not pressure-corrected) airmass values. If AM is a
1343+
Relative (not pressure-corrected) airmass values. If ``airmass`` is a
13441344
DataFrame it must be of the same size as all other DataFrame
13451345
inputs. AM must be >=0 (careful using the 1/sec(z) model of AM
13461346
generation). [unitless]
@@ -1373,7 +1373,7 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
13731373
1990 Perez model using the ``'allsitescomposite1990'`` coefficient set.
13741374
Deviations between the two are very small, as demonstrated in [1]_.
13751375
Other coefficient sets are not supported because the 1990 set is
1376-
based on the largest and most diverse set of empirical data
1376+
based on the largest and most diverse set of empirical data.
13771377
13781378
References
13791379
----------
@@ -1537,7 +1537,7 @@ def ghi_from_poa_driesse_2023(surface_tilt, surface_azimuth,
15371537
Panel tilt from horizontal. See :term:`surface_tilt`. [°]
15381538
15391539
surface_azimuth : numeric
1540-
Panel azimuth from north. See :term:`surface_azimuth`. [°]
1540+
Panel azimuth. See :term:`surface_azimuth`. [°]
15411541
15421542
solar_zenith : numeric
15431543
Solar zenith angle. See :term:`solar_zenith`. [°]
@@ -1561,7 +1561,7 @@ def ghi_from_poa_driesse_2023(surface_tilt, surface_azimuth,
15611561
Ground surface albedo. See :term:`albedo`. [unitless]
15621562
15631563
xtol : numeric, default 0.01
1564-
Convergence criterion. The estimated GHI will be within xtol of the
1564+
Convergence criterion. The estimated GHI will be within ``xtol`` of the
15651565
true value. Must be positive. [Wm⁻²]
15661566
15671567
full_output : boolean, default False
@@ -1693,11 +1693,11 @@ def clearness_index(ghi, solar_zenith, extra_radiation, min_cos_zenith=0.065,
16931693
16941694
min_cos_zenith : numeric, default 0.065
16951695
Minimum value of cos(zenith) to allow when calculating global
1696-
clearness index `kt`. Equivalent to zenith = 86.273°.
1696+
clearness index ``kt``. Equivalent to zenith = 86.273°.
16971697
16981698
max_clearness_index : numeric, default 2.0
16991699
Maximum value of the clearness index. The default, 2.0, allows
1700-
for over-irradiance events typically seen in sub-hourly data
1700+
for over-irradiance events typically seen in sub-hourly data.
17011701
NREL's SRRL Fortran code used 0.82 for hourly data.
17021702
17031703
Returns
@@ -1812,7 +1812,7 @@ def disc(ghi, solar_zenith, datetime_or_doy, pressure=101325,
18121812
18131813
min_cos_zenith : numeric, default 0.065
18141814
Minimum value of cos(zenith) to allow when calculating global
1815-
clearness index `kt`. Equivalent to zenith = 86.273°.
1815+
clearness index ``kt``. Equivalent to zenith = 86.273°.
18161816
18171817
max_zenith : numeric, default 87
18181818
Maximum value of zenith to allow in DNI calculation. DNI will be
@@ -1951,9 +1951,7 @@ def dirint(ghi, solar_zenith, times, pressure=101325., use_delta_kt_prime=True,
19511951
times : DatetimeIndex
19521952
19531953
pressure : float or array-like, default 101325.0
1954-
The site air pressure. Pressure may be measured or an
1955-
average pressure may be calculated from site altitude. See
1956-
:term:`pressure`. [Pa]
1954+
Air pressure. See :term:`pressure`. [Pa]
19571955
19581956
use_delta_kt_prime : bool, default True
19591957
If True, indicates that the stability index delta_kt_prime is
@@ -1972,7 +1970,7 @@ def dirint(ghi, solar_zenith, times, pressure=101325., use_delta_kt_prime=True,
19721970
19731971
min_cos_zenith : numeric, default 0.065
19741972
Minimum value of cos(zenith) to allow when calculating global
1975-
clearness index `kt`. Equivalent to zenith = 86.273°. [°]
1973+
clearness index Kt. Equivalent to zenith = 86.273°. [°]
19761974
19771975
max_zenith : numeric, default 87
19781976
Maximum value of zenith to allow in DNI calculation. DNI will be
@@ -2219,9 +2217,7 @@ def dirindex(ghi, ghi_clear, dni_clear, zenith, times, pressure=101325.,
22192217
times : DatetimeIndex
22202218
22212219
pressure : float or array-like, default 101325.0
2222-
The site air pressure. Pressure may be measured or an
2223-
average pressure may be calculated from site altitude. See
2224-
:term:`pressure`. [Pa]
2220+
Air pressure. See :term:`pressure`. [Pa]
22252221
22262222
use_delta_kt_prime : bool, default True
22272223
If True, indicates that the stability index delta_kt_prime is
@@ -2655,7 +2651,7 @@ def erbs(ghi, zenith, datetime_or_doy, min_cos_zenith=0.065, max_zenith=87):
26552651
clearness index `kt`. Equivalent to zenith = 86.273°.
26562652
max_zenith : numeric, default 87
26572653
Maximum value of zenith to allow in DNI calculation. DNI will be
2658-
set to 0 for times with zenith values greater than `max_zenith`. [°]
2654+
set to 0 for times with zenith values greater than ``max_zenith``. [°]
26592655
26602656
Returns
26612657
-------
@@ -2750,7 +2746,7 @@ def erbs_driesse(ghi, zenith, datetime_or_doy=None, dni_extra=None,
27502746
datetime_or_doy : int, float, array or pd.DatetimeIndex, optional
27512747
Day of year or array of days of year e.g.
27522748
pd.DatetimeIndex.dayofyear, or pd.DatetimeIndex.
2753-
Either datetime_or_doy or dni_extra must be provided.
2749+
Either ``datetime_or_doy`` or ``dni_extra`` must be provided.
27542750
27552751
dni_extra : numeric, optional
27562752
Extraterrestrial normal irradiance.
@@ -2760,11 +2756,11 @@ def erbs_driesse(ghi, zenith, datetime_or_doy=None, dni_extra=None,
27602756
27612757
min_cos_zenith : numeric, default 0.065
27622758
Minimum value of cos(zenith) to allow when calculating global
2763-
clearness index `kt`. Equivalent to zenith = 86.273°.
2759+
clearness index Kt. Equivalent to zenith = 86.273°.
27642760
27652761
max_zenith : numeric, default 87
27662762
Maximum value of zenith to allow in DNI calculation. DNI will be
2767-
set to 0 for times with zenith values greater than `max_zenith`. [°]
2763+
set to 0 for times with zenith values greater than ``max_zenith``. [°]
27682764
27692765
Returns
27702766
-------
@@ -2877,7 +2873,7 @@ def orgill_hollands(ghi, zenith, datetime_or_doy, dni_extra=None,
28772873
datetime_or_doy : int, float, array or pd.DatetimeIndex, optional
28782874
Day of year or array of days of year e.g.
28792875
pd.DatetimeIndex.dayofyear, or pd.DatetimeIndex.
2880-
Either datetime_or_doy or dni_extra must be provided.
2876+
Either ``datetime_or_doy`` or ``dni_extra`` must be provided.
28812877
28822878
dni_extra : numeric, optional
28832879
Extraterrestrial normal irradiance.
@@ -2887,11 +2883,11 @@ def orgill_hollands(ghi, zenith, datetime_or_doy, dni_extra=None,
28872883
28882884
min_cos_zenith : numeric, default 0.065
28892885
Minimum value of cos(zenith) to allow when calculating global
2890-
clearness index `kt`. Equivalent to zenith = 86.273°.
2886+
clearness index Kt. Equivalent to zenith = 86.273°.
28912887
28922888
max_zenith : numeric, default 87
28932889
Maximum value of zenith to allow in DNI calculation. DNI will be
2894-
set to 0 for times with zenith values greater than `max_zenith`. [°]
2890+
set to 0 for times with zenith values greater than ``max_zenith``. [°]
28952891
28962892
Returns
28972893
-------
@@ -2992,7 +2988,7 @@ def boland(ghi, solar_zenith, datetime_or_doy, a_coeff=8.645, b_coeff=0.613,
29922988
29932989
max_zenith : numeric, default 87
29942990
Maximum value of zenith to allow in DNI calculation. DNI will be
2995-
set to 0 for times with zenith values greater than `max_zenith`. [°]
2991+
set to 0 for times with zenith values greater than ``max_zenith``. [°]
29962992
29972993
Returns
29982994
-------
@@ -3781,12 +3777,12 @@ def complete_irradiance(solar_zenith,
37813777
solar_zenith : series
37823778
Solar zenith angle, with datetime index.
37833779
Angles must be >=0° and <=180°. Must have the same datetime index
3784-
as ``ghi``, ``dhi``, and ``dni`` series, when available.
3780+
as ``ghi``, ``dhi``, and ``dni``, when available.
37853781
See :term:`solar_zenith`. [°]
37863782
37873783
ghi : Series, optional
37883784
Pandas series of dni data [Wm⁻²], with datetime index. Must have the
3789-
same datetime index as dni, dhi, and zenith series, when available.
3785+
same datetime index as ``dni``, ``dhi``, and ``zenith``, when available.
37903786
See :term:`ghi`. [Wm⁻²]
37913787
37923788
dhi : Series, optional
@@ -3796,7 +3792,7 @@ def complete_irradiance(solar_zenith,
37963792
37973793
dni : Series, optional
37983794
Pandas series of dni data [Wm⁻²], with datetime index. Must have the
3799-
same datetime index as ghi, dhi, and zenith series, when available.
3795+
same datetime index as ``ghi``, ``dhi``, and ``zenith``, when available.
38003796
See :term:`dni`. [Wm⁻²]
38013797
38023798
dni_clear : Series, optional

0 commit comments

Comments
 (0)