Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor docstring params #1790

Closed
wants to merge 12 commits into from
8 changes: 4 additions & 4 deletions pvlib/atmosphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def bird_hulstrom80_aod_bb(aod380, aod500):
aod_bb : numeric
Broadband AOD. [unitless]

See also
See Also
--------
pvlib.atmosphere.kasten96_lt

Expand Down Expand Up @@ -407,7 +407,7 @@ def kasten96_lt(airmass_absolute, precipitable_water, aod_bb):
lt : numeric
Linke turbidity. [unitless]

See also
See Also
--------
pvlib.atmosphere.bird_hulstrom80_aod_bb
pvlib.atmosphere.angstrom_aod_at_lambda
Expand Down Expand Up @@ -488,7 +488,7 @@ def angstrom_aod_at_lambda(aod0, lambda0, alpha=1.14, lambda1=700.0):
aod1 : numeric
AOD at desired wavelength ``lambda1``. [unitless]

See also
See Also
--------
pvlib.atmosphere.angstrom_alpha

Expand Down Expand Up @@ -528,7 +528,7 @@ def angstrom_alpha(aod1, lambda1, aod2, lambda2):
Angstrom :math:`\alpha` exponent for wavelength in
``(lambda1, lambda2)``. [unitless]

See also
See Also
--------
pvlib.atmosphere.angstrom_aod_at_lambda
"""
Expand Down
4 changes: 2 additions & 2 deletions pvlib/bifacial/infinite_sheds.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def get_irradiance_poa(surface_tilt, surface_azimuth, solar_zenith,
Photovoltaic Specialists Conference (PVSC), 2019, pp. 1282-1287.
:doi:`10.1109/PVSC40753.2019.8980572`.

See also
See Also
--------
get_irradiance
"""
Expand Down Expand Up @@ -518,7 +518,7 @@ def get_irradiance(surface_tilt, surface_azimuth, solar_zenith, solar_azimuth,
Photovoltaic Specialists Conference (PVSC), 2019, pp. 1282-1287.
:doi:`10.1109/PVSC40753.2019.8980572`.

See also
See Also
--------
get_irradiance_poa
"""
Expand Down
42 changes: 21 additions & 21 deletions pvlib/bifacial/pvfactors.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,58 +23,58 @@ def pvfactors_timeseries(

Parameters
----------
solar_azimuth: numeric
solar_azimuth : numeric
Sun's azimuth angles using pvlib's azimuth convention (deg)
solar_zenith: numeric
solar_zenith : numeric
Sun's zenith angles (deg)
surface_azimuth: numeric
surface_azimuth : numeric
Azimuth angle of the front surface of the PV modules, using pvlib's
convention (deg)
surface_tilt: numeric
surface_tilt : numeric
Tilt angle of the PV modules, going from 0 to 180 (deg)
axis_azimuth: float
axis_azimuth : float
Azimuth angle of the rotation axis of the PV modules, using pvlib's
convention (deg). This is supposed to be fixed for all timestamps.
When modeling fixed-tilt arrays, set this value to be 90 degrees
clockwise from ``surface_azimuth``.
timestamps: datetime or DatetimeIndex
timestamps : datetime or DatetimeIndex
List of simulation timestamps
dni: numeric
dni : numeric
Direct normal irradiance (W/m2)
dhi: numeric
dhi : numeric
Diffuse horizontal irradiance (W/m2)
gcr: float
gcr : float
Ground coverage ratio of the pv array
pvrow_height: float
pvrow_height : float
Height of the pv rows, measured at their center (m)
pvrow_width: float
pvrow_width : float
Width of the pv rows in the considered 2D plane (m)
albedo: float
albedo : float
Ground albedo
n_pvrows: int, default 3
n_pvrows : int, default 3
Number of PV rows to consider in the PV array
index_observed_pvrow: int, default 1
index_observed_pvrow : int, default 1
Index of the PV row whose incident irradiance will be returned. Indices
of PV rows go from 0 to n_pvrows-1.
rho_front_pvrow: float, default 0.03
rho_front_pvrow : float, default 0.03
Front surface reflectivity of PV rows
rho_back_pvrow: float, default 0.05
rho_back_pvrow : float, default 0.05
Back surface reflectivity of PV rows
horizon_band_angle: float, default 15
horizon_band_angle : float, default 15
Elevation angle of the sky dome's diffuse horizon band (deg)

Returns
-------
poa_front: numeric
poa_front : numeric
Calculated incident irradiance on the front surface of the PV modules
(W/m2)
poa_back: numeric
poa_back : numeric
Calculated incident irradiance on the back surface of the PV modules
(W/m2)
poa_front_absorbed: numeric
poa_front_absorbed : numeric
Calculated absorbed irradiance on the front surface of the PV modules
(W/m2), after AOI losses
poa_back_absorbed: numeric
poa_back_absorbed : numeric
Calculated absorbed irradiance on the back surface of the PV modules
(W/m2), after AOI losses

Expand Down
4 changes: 2 additions & 2 deletions pvlib/bifacial/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,11 @@ def vf_row_ground_2d_integ(surface_tilt, gcr, x0=0, x1=1):
= 0, surface facing horizon = 90. [degree]
gcr : numeric
Ratio of the row slant length to the row spacing (pitch). [unitless]
x0 : numeric, default 0.
x0 : numeric, default 0
Position on the row's slant length, as a fraction of the slant length.
x0=0 corresponds to the bottom of the row. x0 should be less than x1.
[unitless]
x1 : numeric, default 1.
x1 : numeric, default 1
Position on the row's slant length, as a fraction of the slant length.
x1 should be greater than x0. [unitless]

Expand Down
8 changes: 4 additions & 4 deletions pvlib/clearsky.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def ineichen(apparent_zenith, airmass_absolute, linke_turbidity,
DataFrame/OrderedDict contains the columns/keys
``'dhi', 'dni', 'ghi'``.

See also
See Also
--------
lookup_linke_turbidity
pvlib.location.Location.get_clearsky
Expand Down Expand Up @@ -159,7 +159,7 @@ def lookup_linke_turbidity(time, latitude, longitude, filepath=None,

longitude : float or int

filepath : None or string, default None
filepath : string, optional
The path to the ``.h5`` file.

interp_turbidity : bool, default True
Expand Down Expand Up @@ -673,7 +673,7 @@ def detect_clearsky(measured, clearsky, times=None, window_length=10,
Time series of measured GHI. [W/m2]
clearsky : array or Series
Time series of the expected clearsky GHI. [W/m2]
times : DatetimeIndex or None, default None.
times : DatetimeIndex, optional
Times of measured and clearsky values. If None the index of measured
will be used.
window_length : int, default 10
Expand Down Expand Up @@ -909,7 +909,7 @@ def bird(zenith, airmass_relative, aod380, aod500, precipitable_water,
DataFrame/OrderedDict contains the columns/keys
``'dhi', 'dni', 'ghi', 'direct_horizontal'`` in [W/m^2].

See also
See Also
--------
pvlib.atmosphere.bird_hulstrom80_aod_bb
pvlib.atmosphere.get_relative_airmass
Expand Down
4 changes: 2 additions & 2 deletions pvlib/iam.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def martin_ruiz_diffuse(surface_tilt, a_r=0.16, c1=0.4244, c2=None):

Parameters
----------
surface_tilt: float or array-like, default 0
surface_tilt : float or array-like, default 0
Surface tilt angles in decimal degrees.
The tilt angle is defined as degrees from horizontal
(e.g. surface facing up = 0, surface facing horizon = 90)
Expand Down Expand Up @@ -514,7 +514,7 @@ def sapm(aoi, module, upper=None):
A dict or Series with the SAPM IAM model parameters.
See the :py:func:`sapm` notes section for more details.

upper : None or float, default None
upper : float, optional
Upper limit on the results.

Returns
Expand Down
22 changes: 11 additions & 11 deletions pvlib/inverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def sandia(v_dc, p_dc, inverter):

.. [2] System Advisor Model web page. https://sam.nrel.gov.

See also
See Also
--------
pvlib.pvsystem.retrieve_sam
'''
Expand Down Expand Up @@ -182,7 +182,7 @@ def sandia_multi(v_dc, p_dc, inverter):
Efficiency Of Inverters With Multiple Inputs", 49th IEEE Photovoltaic
Specialist Conference, Philadelphia, PA, USA. June 2022.

See also
See Also
--------
pvlib.inverter.sandia
'''
Expand Down Expand Up @@ -273,7 +273,7 @@ def adr(v_dc, p_dc, inverter, vtol=0.10):
of Photovoltaic Inverters", 33rd IEEE Photovoltaic Specialist
Conference (PVSC), June 2008

See also
See Also
--------
pvlib.inverter.sandia
pvlib.pvsystem.retrieve_sam
Expand Down Expand Up @@ -354,17 +354,17 @@ def pvwatts(pdc, pdc0, eta_inv_nom=0.96, eta_inv_ref=0.9637):
----------
pdc : numeric
DC power. Same unit as ``pdc0``.
pdc0: numeric
pdc0 : numeric
DC input limit of the inverter. Same unit as ``pdc``.
eta_inv_nom: numeric, default 0.96
eta_inv_nom : numeric, default 0.96
Nominal inverter efficiency. [unitless]
eta_inv_ref: numeric, default 0.9637
eta_inv_ref : numeric, default 0.9637
Reference inverter efficiency. PVWatts defines it to be 0.9637
and is included here for flexibility. [unitless]

Returns
-------
power_ac: numeric
power_ac : numeric
AC power. Same unit as ``pdc0``.

Notes
Expand Down Expand Up @@ -422,17 +422,17 @@ def pvwatts_multi(pdc, pdc0, eta_inv_nom=0.96, eta_inv_ref=0.9637):
pdc : tuple, list or array of numeric
DC power on each MPPT input of the inverter. If type is array, must
be 2d with axis 0 being the MPPT inputs. Same unit as ``pdc0``.
pdc0: numeric
pdc0 : numeric
Total DC power limit of the inverter. Same unit as ``pdc``.
eta_inv_nom: numeric, default 0.96
eta_inv_nom : numeric, default 0.96
Nominal inverter efficiency. [unitless]
eta_inv_ref: numeric, default 0.9637
eta_inv_ref : numeric, default 0.9637
Reference inverter efficiency. PVWatts defines it to be 0.9637
and is included here for flexibility. [unitless]

Returns
-------
power_ac: numeric
power_ac : numeric
AC power. Same unit as ``pdc0``.

See Also
Expand Down
34 changes: 17 additions & 17 deletions pvlib/iotools/bsrn.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,29 +74,29 @@ def get_bsrn(station, start, end, username, password,

Parameters
----------
station: str
station : str
3-letter BSRN station abbreviation
start: datetime-like
start : datetime-like
First day of the requested period
end: datetime-like
end : datetime-like
Last day of the requested period
username: str
username : str
username for accessing the BSRN FTP server
password: str
password : str
password for accessing the BSRN FTP server
logical_records: list or tuple, default: ('0100',)
logical_records : list or tuple, default ('0100',)
List of the logical records (LR) to parse. Options include: '0100',
'0300', and '0500'.
save_path: str or path-like, optional
save_path : str or path-like, optional
If specified, a directory path of where to save each monthly file.

Returns
-------
data: DataFrame
data : DataFrame
timeseries data from the BSRN archive, see
:func:`pvlib.iotools.read_bsrn` for fields. An empty DataFrame is
returned if no data was found for the time period.
metadata: dict
metadata : dict
metadata for the last available monthly file.

Raises
Expand Down Expand Up @@ -219,19 +219,19 @@ def parse_bsrn(fbuf, logical_records=('0100',)):

Parameters
----------
fbuf: file-like buffer
fbuf : file-like buffer
Buffer of a BSRN station-to-archive data file
logical_records: list or tuple, default: ('0100',)
logical_records : list or tuple, default ('0100',)
List of the logical records (LR) to parse. Options include: '0100',
'0300', and '0500'.

Returns
-------
data: DataFrame
data : DataFrame
timeseries data from the BSRN archive, see
:func:`pvlib.iotools.read_bsrn` for fields. An empty DataFrame is
returned if the specified logical records were not found.
metadata: dict
metadata : dict
Dictionary containing metadata (primarily from LR0004).

See Also
Expand Down Expand Up @@ -377,19 +377,19 @@ def read_bsrn(filename, logical_records=('0100',)):

Parameters
----------
filename: str or path-like
filename : str or path-like
Name or path of a BSRN station-to-archive data file
logical_records: list or tuple, default: ('0100',)
logical_records : list or tuple, default ('0100',)
List of the logical records (LR) to parse. Options include: '0100',
'0300', and '0500'.

Returns
-------
data: DataFrame
data : DataFrame
A DataFrame with the columns as described below. For a more extensive
description of the variables, consult [2]_. An empty DataFrame is
returned if the specified logical records were not found.
metadata: dict
metadata : dict
Dictionary containing metadata (primarily from LR0004).

Notes
Expand Down
6 changes: 3 additions & 3 deletions pvlib/iotools/crn.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ def read_crn(filename, map_variables=True):

Parameters
----------
filename: str, path object, or file-like
filename : str, path object, or file-like
filepath or url to read for the fixed-width file.
map_variables: boolean, default: True
map_variables : boolean, default True
When true, renames columns of the Dataframe to pvlib variable names
where applicable. See variable :const:`VARIABLE_MAP`.

Returns
-------
data: Dataframe
data : Dataframe
A dataframe with DatetimeIndex and all of the variables in the
file.

Expand Down
4 changes: 2 additions & 2 deletions pvlib/iotools/epw.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def read_epw(filename, coerce_year=None):
filename : String
Can be a relative file path, absolute file path, or url.

coerce_year : None or int, default None
coerce_year : int, optional
If supplied, the year of the data will be set to this value. This can
be a useful feature because EPW data is composed of data from
different years.
Expand Down Expand Up @@ -247,7 +247,7 @@ def parse_epw(csvdata, coerce_year=None):
csvdata : file-like buffer
a file-like buffer containing data in the EPW format

coerce_year : None or int, default None
coerce_year : int, optional
If supplied, the year of the data will be set to this value. This can
be a useful feature because EPW data is composed of data from
different years.
Expand Down
Loading