Skip to content

Commit 19664be

Browse files
committed
format and docstring edits
1 parent 811dcf7 commit 19664be

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

pvlib/pvsystem.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ def get_irradiance(self, solar_zenith, solar_azimuth, dni, ghi, dhi,
312312
dni_extra=None, airmass=None, albedo=None,
313313
model='haydavies', **kwargs):
314314
"""
315-
Uses the :py:func:`irradiance.get_total_irradiance` function to
315+
Uses :py:func:`pvlib.irradiance.get_total_irradiance` to
316316
calculate the plane of array irradiance components on the tilted
317317
surfaces defined by each array's ``surface_tilt`` and
318318
``surface_azimuth``.
@@ -339,19 +339,20 @@ def get_irradiance(self, solar_zenith, solar_azimuth, dni, ghi, dhi,
339339
Irradiance model.
340340
341341
kwargs
342-
Extra parameters passed to :func:`irradiance.get_total_irradiance`.
342+
Extra parameters passed to
343+
:py:func:`pvlib.irradiance.get_total_irradiance`.
343344
344345
Notes
345346
-----
346-
Each of `dni`, `ghi`, and `dni` parameters may be passed as a tuple
347+
Each of ``dni``, ``ghi``, and ``dni`` may be passed as a tuple
347348
of Series to provide different irradiance for each array in the system.
348349
If passed as a tuple of Series the tuple length must be the same
349350
as the number of Arrays. If not passed as a tuple then the same values
350351
are used for each Array.
351352
352-
Some sky irradiance models require `dni_extra`. For these models,
353-
if `dni_extra` is not provided and ``solar_zenith`` has a
354-
``DatetimeIndex``, then `dni_extra` is calculated.
353+
Some sky irradiance models require ``dni_extra``. For these models,
354+
if ``dni_extra`` is not provided and ``solar_zenith`` has a
355+
``DatetimeIndex``, then ``dni_extra`` is calculated.
355356
Otherwise, ``dni_extra=1367`` is assumed.
356357
357358
Returns
@@ -362,7 +363,7 @@ def get_irradiance(self, solar_zenith, solar_azimuth, dni, ghi, dhi,
362363
363364
See also
364365
--------
365-
pvlib.irradiance.get_total_irradiance
366+
:py:func:`pvlib.irradiance.get_total_irradiance`
366367
"""
367368
dni = self._validate_per_array(dni, system_wide=True)
368369
ghi = self._validate_per_array(ghi, system_wide=True)
@@ -1082,7 +1083,7 @@ def get_irradiance(self, solar_zenith, solar_azimuth, dni, ghi, dhi,
10821083
"""
10831084
Get plane of array irradiance components.
10841085
1085-
Uses the :py:func:`pvlib.irradiance.get_total_irradiance` function to
1086+
Uses :py:func:`pvlib.irradiance.get_total_irradiance` to
10861087
calculate the plane of array irradiance components for a surface
10871088
defined by ``self.surface_tilt`` and ``self.surface_azimuth``.
10881089
@@ -1119,9 +1120,9 @@ def get_irradiance(self, solar_zenith, solar_azimuth, dni, ghi, dhi,
11191120
11201121
Notes
11211122
-----
1122-
Some sky irradiance models require `dni_extra`. For these models,
1123-
if `dni_extra` is not provided and ``solar_zenith`` has a
1124-
``DatetimeIndex``, then `dni_extra` is calculated.
1123+
Some sky irradiance models require ``dni_extra``. For these models,
1124+
if ``dni_extra`` is not provided and ``solar_zenith`` has a
1125+
``DatetimeIndex``, then ``dni_extra`` is calculated.
11251126
Otherwise, ``dni_extra=1367`` is assumed.
11261127
11271128
See also
@@ -1132,8 +1133,8 @@ def get_irradiance(self, solar_zenith, solar_azimuth, dni, ghi, dhi,
11321133
albedo = self.albedo
11331134

11341135
# dni_extra is not needed for all models, but this is easier
1135-
if dni_extra is None and hasattr(solar_zenith, 'index') and \
1136-
isinstance(solar_zenith.index, pd.DatetimeIndex):
1136+
if (dni_extra is None and hasattr(solar_zenith, 'index') and
1137+
isinstance(solar_zenith.index, pd.DatetimeIndex)):
11371138
dni_extra = irradiance.get_extra_radiation(solar_zenith.index)
11381139
else:
11391140
# use the solar constant

pvlib/tests/test_pvsystem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1896,7 +1896,7 @@ def test_PVSystem_get_irradiance_float():
18961896
for k, v in irradiance.items():
18971897
assert np.isclose(v, expected[k], rtol=1e-6)
18981898

1899-
1899+
19001900
def test_PVSystem_get_irradiance_albedo(solar_pos):
19011901
system = pvsystem.PVSystem(surface_tilt=32, surface_azimuth=135)
19021902
irrads = pd.DataFrame({'dni': [900, 0], 'ghi': [600, 0], 'dhi': [100, 0],

0 commit comments

Comments
 (0)