Skip to content

add spectra and spectra_components to nomenclature page #2264

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

Merged
merged 16 commits into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/sphinx/source/user_guide/nomenclature.rst
Original file line number Diff line number Diff line change
@@ -142,6 +142,13 @@ There is a convention on consistent variable names throughout the library:
solar_zenith
Zenith angle of the sun in degrees

spectra
spectra_components
Spectral irradiance (components) [Wm⁻²nm⁻¹]. The amount of energy
incident on a unit area per unit time and per unit
wavelength. As with broadband irradiance, global spectral irradiance
is composed of direct and diffuse components.

surface_azimuth
Azimuth angle of the surface

4 changes: 4 additions & 0 deletions docs/sphinx/source/whatsnew/v0.11.2.rst
Original file line number Diff line number Diff line change
@@ -33,6 +33,10 @@ Documentation
page, using the sphinx glossary directive. (:issue:`1421`, :pull:`2234`)
* Explained how to write docstrings for new functions in :ref:`example-docstring`
(:discussion:`2081`, :pull:`2254`)
* Added the following variables to the :ref:`nomenclature` page:

- `spectra` and `spectra_components` (:issue:`2150`, :pull:`2264`)


Testing
~~~~~~~
3 changes: 2 additions & 1 deletion pvlib/spectrum/irradiance.py
Original file line number Diff line number Diff line change
@@ -189,7 +189,8 @@ def average_photon_energy(spectra):
----------
spectra : pandas.Series or pandas.DataFrame

Spectral irradiance, must be positive. [Wm⁻²nm⁻¹]
Spectral irradiance, must be positive [Wm⁻²nm⁻¹].
See :term:`spectra`.

A single spectrum must be a :py:class:`pandas.Series` with wavelength
[nm] as the index, while multiple spectra must be rows in a
3 changes: 2 additions & 1 deletion pvlib/spectrum/spectrl2.py
Original file line number Diff line number Diff line change
@@ -228,10 +228,11 @@ def spectrl2(apparent_zenith, aoi, surface_tilt, ground_albedo,
Returns
-------
spectra_components : dict
A dict of arrays. With the exception of `wavelength`, which has length
A dict of arrays. With the exception of `wavelength`, which has length
122, each array has shape (122, N) where N is the length of the
input ``apparent_zenith``. All values are spectral irradiance
with units Wm⁻²nm⁻¹, except for `wavelength`, which is in nanometers.
See :term:`spectra_components`.

* wavelength
* dni_extra
Loading