Skip to content

Commit

Permalink
add spectra and spectra_components to nomenclature page (#2264)
Browse files Browse the repository at this point in the history
* Update variables_style_rules.csv

* Update v0.11.2.rst

* not sure what happened here after merge with main

* Update v0.11.2.rst

* update whatsnew and glossary page

* Update spectrl2.py

* Update irradiance.py

* typo

* update spectrl2.py and spectrum irradiance.py

* grammar -- periods before/after units(?)

* Apply suggestions from code review

Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>

* Update v0.11.2.rst

* fix whatsnew formatting

* formatting attempt #2

---------

Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
  • Loading branch information
RDaxini and kandersolar authored Nov 5, 2024
1 parent a6995c3 commit afdcdd4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
7 changes: 7 additions & 0 deletions docs/sphinx/source/user_guide/nomenclature.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions docs/sphinx/source/whatsnew/v0.11.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
~~~~~~~
Expand Down
3 changes: 2 additions & 1 deletion pvlib/spectrum/irradiance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion pvlib/spectrum/spectrl2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit afdcdd4

Please sign in to comment.