Skip to content

Commit eef913a

Browse files
committed
Update return types of PVSystem methods
Some methods now return tuples.
1 parent 1dcda05 commit eef913a

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

pvlib/pvsystem.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def _infer_cell_type(self):
294294

295295
@_unwrap_single_value
296296
def get_aoi(self, solar_zenith, solar_azimuth):
297-
"""Get the angle of incidence on the system.
297+
"""Get the angle of incidence on the Array(s) in the system.
298298
299299
Parameters
300300
----------
@@ -305,7 +305,7 @@ def get_aoi(self, solar_zenith, solar_azimuth):
305305
306306
Returns
307307
-------
308-
aoi : Series
308+
aoi : Series or tuple of Series
309309
The angle of incidence
310310
"""
311311

@@ -346,7 +346,7 @@ def get_irradiance(self, solar_zenith, solar_azimuth, dni, ghi, dhi,
346346
347347
Returns
348348
-------
349-
poa_irradiance : DataFrame
349+
poa_irradiance : DataFrame or tuple of DataFrame
350350
Column names are: ``total, beam, sky, ground``.
351351
"""
352352
dni = self._validate_per_array(dni, system_wide=True)
@@ -381,7 +381,7 @@ def get_iam(self, aoi, iam_model='physical'):
381381
'martin_ruiz' and 'sapm'.
382382
Returns
383383
-------
384-
iam : numeric
384+
iam : numeric or tuple of numeric
385385
The AOI modifier.
386386
387387
Raises
@@ -563,7 +563,8 @@ def sapm_celltemp(self, poa_global, temp_air, wind_speed):
563563
564564
Returns
565565
-------
566-
numeric, values in degrees C.
566+
numeric or tuple of numeric
567+
values in degrees C.
567568
"""
568569
poa_global = self._validate_per_array(poa_global)
569570
temp_air = self._validate_per_array(temp_air, system_wide=True)
@@ -608,7 +609,7 @@ def sapm_spectral_loss(self, airmass_absolute):
608609
609610
Returns
610611
-------
611-
F1 : numeric
612+
F1 : numeric or tuple of numeric
612613
The SAPM spectral loss coefficient.
613614
"""
614615
return tuple(
@@ -641,7 +642,7 @@ def sapm_effective_irradiance(self, poa_direct, poa_diffuse,
641642
642643
Returns
643644
-------
644-
effective_irradiance : numeric
645+
effective_irradiance : numeric or tuple of numeric
645646
The SAPM effective irradiance. [W/m2]
646647
"""
647648
poa_direct = self._validate_per_array(poa_direct)
@@ -675,7 +676,8 @@ def pvsyst_celltemp(self, poa_global, temp_air, wind_speed=1.0):
675676
676677
Returns
677678
-------
678-
numeric, values in degrees C.
679+
numeric or tuple of numeric
680+
values in degrees C.
679681
"""
680682
poa_global = self._validate_per_array(poa_global)
681683
temp_air = self._validate_per_array(temp_air, system_wide=True)
@@ -714,7 +716,8 @@ def faiman_celltemp(self, poa_global, temp_air, wind_speed=1.0):
714716
715717
Returns
716718
-------
717-
numeric, values in degrees C.
719+
numeric or tuple of numeric
720+
values in degrees C.
718721
"""
719722
poa_global = self._validate_per_array(poa_global)
720723
temp_air = self._validate_per_array(temp_air, system_wide=True)
@@ -747,7 +750,7 @@ def fuentes_celltemp(self, poa_global, temp_air, wind_speed):
747750
748751
Returns
749752
-------
750-
temperature_cell : pandas Series
753+
temperature_cell : Series or tuple of Series
751754
The modeled cell temperature [C]
752755
753756
Notes
@@ -807,7 +810,7 @@ def first_solar_spectral_loss(self, pw, airmass_absolute):
807810
808811
Returns
809812
-------
810-
modifier: array-like
813+
modifier: array-like or tuple of array-like
811814
spectral mismatch factor (unitless) which can be multiplied
812815
with broadband irradiance reaching a module's cells to estimate
813816
effective irradiance, i.e., the irradiance that is converted to
@@ -896,7 +899,7 @@ def scale_voltage_current_power(self, data):
896899
897900
Returns
898901
-------
899-
scaled_data: DataFrame
902+
scaled_data: DataFrame or tuple of DataFrame
900903
A scaled copy of the input data.
901904
"""
902905
data = self._validate_per_array(data)

0 commit comments

Comments
 (0)