Skip to content

Commit 692132d

Browse files
committed
Merge branch 'main' into move-test-files
2 parents 76e9fe1 + 9fb2eb3 commit 692132d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+35937
-35364
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- Thank you for your contribution! The following items must be addressed before the code can be merged. Please don't hesitate to ask for help if you're unsure of how to accomplish any of the items. Feel free to remove checklist items that are not relevant to your change. -->
22

33
- [ ] Closes #xxxx
4-
- [ ] I am familiar with the [contributing guidelines](https://pvlib-python.readthedocs.io/en/latest/contributing.html)
4+
- [ ] I am familiar with the [contributing guidelines](https://pvlib-python.readthedocs.io/en/latest/contributing/index.html)
55
- [ ] Tests added
66
- [ ] Updates entries in [`docs/sphinx/source/reference`](https://github.com/pvlib/pvlib-python/blob/main/docs/sphinx/source/reference) for API changes.
77
- [ ] Adds description and name entries in the appropriate "what's new" file in [`docs/sphinx/source/whatsnew`](https://github.com/pvlib/pvlib-python/tree/main/docs/sphinx/source/whatsnew) for all changes. Includes link to the GitHub Issue with `` :issue:`num` `` or this Pull Request with `` :pull:`num` ``. Includes contributor name and/or GitHub username (link with `` :ghuser:`user` ``).

docs/examples/shading/plot_martinez_shade_loss.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
import pandas as pd
4848
import numpy as np
4949
import matplotlib.pyplot as plt
50-
from matplotlib.dates import ConciseDateFormatter
50+
from matplotlib.dates import DateFormatter
5151

5252
pitch = 4 # meters
5353
width = 1.5 # meters
@@ -235,10 +235,6 @@
235235
ax1.plot(times, shade_losses, label=k, linestyle=linestyle)
236236
ax1.legend(loc="upper center")
237237
ax1.grid()
238-
ax1.set_xlabel("Time")
239-
ax1.xaxis.set_major_formatter(
240-
ConciseDateFormatter("%H:%M", tz="Europe/Madrid")
241-
)
242238
ax1.set_ylabel(r"$P_{out}$ losses")
243239
ax1.set_title("Per module")
244240

@@ -248,9 +244,7 @@
248244
ax2.legend(loc="upper center")
249245
ax2.grid()
250246
ax2.set_xlabel("Time")
251-
ax2.xaxis.set_major_formatter(
252-
ConciseDateFormatter("%H:%M", tz="Europe/Madrid")
253-
)
247+
ax2.xaxis.set_major_formatter(DateFormatter("%H:%M", tz="Europe/Madrid"))
254248
ax2.set_ylabel(r"$P_{out}$ losses")
255249
ax2.set_title("Per row")
256250
fig.tight_layout()

docs/sphinx/source/conf.py

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,30 @@
5656
'sphinx_gallery.gen_gallery',
5757
'sphinx_toggleprompt',
5858
'sphinx_favicon',
59+
'hoverxref.extension',
5960
]
6061

6162
mathjax3_config = {'chtml': {'displayAlign': 'left',
6263
'displayIndent': '2em'}}
6364

65+
# Example configuration for intersphinx: refer to the Python standard library.
66+
intersphinx_mapping = {
67+
'python': ('https://docs.python.org/3/', None),
68+
'numpy': ('https://numpy.org/doc/stable/', None),
69+
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
70+
'pandas': ('https://pandas.pydata.org/pandas-docs/stable', None),
71+
'matplotlib': ('https://matplotlib.org/stable', None),
72+
}
73+
74+
# Enable hover tooltips
75+
hoverxref_auto_ref = True
76+
hoverxref_roles = [
77+
"class", "meth", "func", "ref", "term", "obj", "mod", "data"
78+
]
79+
hoverxref_role_types = dict.fromkeys(hoverxref_roles, "tooltip")
80+
hoverxref_domains = ["py"]
81+
hoverxref_intersphinx = list(intersphinx_mapping.keys())
82+
6483
napoleon_use_rtype = False # group rtype on same line together with return
6584

6685
# Add any paths that contain templates here, relative to this directory.
@@ -357,15 +376,6 @@ def setup(app):
357376
# If true, do not generate a @detailmenu in the "Top" node's menu.
358377
# texinfo_no_detailmenu = False
359378

360-
# Example configuration for intersphinx: refer to the Python standard library.
361-
intersphinx_mapping = {
362-
'python': ('https://docs.python.org/3/', None),
363-
'numpy': ('https://numpy.org/doc/stable/', None),
364-
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
365-
'pandas': ('https://pandas.pydata.org/pandas-docs/stable', None),
366-
'matplotlib': ('https://matplotlib.org/stable', None),
367-
}
368-
369379
ipython_warning_is_error = False
370380

371381
# suppress "WARNING: Footnote [1] is not referenced." messages

docs/sphinx/source/contributing/how_to_contribute_new_code.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,7 @@ We strongly recommend using virtual environments for development.
153153
Virtual environments make it easier to switch between different
154154
versions of software. This `scientific-python.org guide
155155
<https://learn.scientific-python.org/development/tutorials/dev-environment/>`_
156-
is a good reference for virtual environments. The pvlib-python `installation
157-
user guide <https://pvlib-python.readthedocs.io/en/stable/user_guide/
158-
installation.html#set-up-a-virtual-environment>`_ also provides instructions on
156+
is a good reference for virtual environments. The pvlib-python
157+
:ref:`installation guide <setupenvironment>` also provides instructions on
159158
setting up a virtual environment. If this is your first pull request, don't
160159
worry about using a virtual environment.

docs/sphinx/source/contributing/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _contributing:
2+
13
============
24
Contributing
35
============

docs/sphinx/source/contributing/style_guide.rst

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,30 @@ the ``docs/readthedocs.org:pvlib-python`` link within the checks
7070
status box at the bottom of the pull request.
7171

7272

73-
.. _references:
73+
.. _documentation-units:
74+
75+
Parameter names and units
76+
-------------------------
77+
78+
When specifying parameters and their units, please follow these guidelines:
79+
80+
- Use the recommended parameter name and units listed in the :ref:`nomenclature` where applicable.
81+
- Enclose units in square brackets after the parameter description, e.g., ``Air temperature. [°C]``.
82+
- Use unicode superscripts symbols for exponents, e.g. ``m⁻²``.
83+
84+
- Numbers: ````, ``¹``, ``²``, ``³``, ````, ````, ````, ````, ````, ````
85+
- Negative exponent: ````
86+
- Degree symbol: ``°``
87+
88+
- Link to a brief description in the :ref:`nomenclature` section if it exists, via the sphinx role ``:term:`glossary_term```. For example, to document ``dni`` use:
89+
90+
.. code-block:: rst
91+
92+
dni : numeric
93+
Direct normal irradiance, see :term:`dni`. [Wm⁻²]
94+
95+
96+
.. _reference_style:
7497

7598
References
7699
----------

docs/sphinx/source/reference/airmass_atmospheric.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Airmass and atmospheric models
1111
atmosphere.get_relative_airmass
1212
atmosphere.pres2alt
1313
atmosphere.alt2pres
14+
atmosphere.tdew_from_rh
15+
atmosphere.rh_from_tdew
1416
atmosphere.gueymard94_pw
1517
atmosphere.first_solar_spectral_correction
1618
atmosphere.bird_hulstrom80_aod_bb

docs/sphinx/source/reference/tracking.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
Tracking
44
========
55

6-
Functions
7-
---------
8-
96
.. autosummary::
107
:toctree: generated/
118

docs/sphinx/source/reference/transformer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Transformer losses
44
==================
55

6-
Methods to account for losses in transformers
6+
Functions to account for losses in transformers
77

88
.. autosummary::
99
:toctree: generated/

docs/sphinx/source/user_guide/nomenclature.rst

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,21 @@ There is a convention on consistent variable names throughout the library:
102102
Photocurrent
103103

104104
poa_diffuse
105-
Total diffuse irradiation in plane. Sum of ground and sky diffuse.
105+
Total diffuse irradiance in plane [Wm⁻²]. Sum of ground and sky diffuse
106+
components of global irradiance.
106107

107108
poa_direct
108-
Direct/beam irradiation in plane
109+
Direct/beam irradiance in plane [Wm⁻²].
109110

110111
poa_global
111-
Global irradiation in plane. sum of diffuse and beam projection.
112+
Global irradiance in plane. Sum of diffuse and beam projection [Wm⁻²].
112113

113114
poa_ground_diffuse
114-
In plane ground reflected irradiation
115+
In plane ground reflected irradiance [Wm⁻²].
115116

116117
poa_sky_diffuse
117-
Diffuse irradiation in plane from scattered light in the atmosphere
118-
(without ground reflected irradiation)
118+
Diffuse irradiance in plane from scattered light in the atmosphere
119+
(without ground reflected irradiance) [Wm⁻²].
119120

120121
precipitable_water
121122
Total precipitable water contained in a column of unit cross section
@@ -142,6 +143,13 @@ There is a convention on consistent variable names throughout the library:
142143
solar_zenith
143144
Zenith angle of the sun in degrees
144145

146+
spectra
147+
spectra_components
148+
Spectral irradiance (components) [Wm⁻²nm⁻¹]. The amount of energy
149+
incident on a unit area per unit time and per unit
150+
wavelength. As with broadband irradiance, global spectral irradiance
151+
is composed of direct and diffuse components.
152+
145153
surface_azimuth
146154
Azimuth angle of the surface
147155

@@ -161,10 +169,6 @@ There is a convention on consistent variable names throughout the library:
161169
temp_module
162170
Temperature of the module
163171

164-
transposition_factor
165-
The gain ratio of the radiation on inclined plane to global horizontal
166-
irradiation: :math:`\frac{poa\_global}{ghi}`
167-
168172
tz
169173
Timezone
170174

docs/sphinx/source/user_guide/singlediode.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ diode model equation.
2424

2525
.. math::
2626
27-
I = I_L - I_0 \left(\exp \left(\frac{V + I R_s}{n Ns V_{th}} \right) - 1 \right)
27+
I = I_L - I_0 \left(\exp \left(\frac{V + I R_s}{n N_s V_{th}} \right) - 1 \right)
2828
- \frac{V + I R_s}{R_{sh}}
2929
3030
Lambert W-function is the inverse of the function
@@ -36,8 +36,8 @@ a form that can be expressed as a Lambert W-function.
3636

3737
.. math::
3838
39-
z = \frac{R_s I_0}{n Ns V_{th} \left(1 + \frac{R_s}{R_{sh}} \right)} \exp \left(
40-
\frac{R_s \left( I_L + I_0 \right) + V}{n Ns V_{th} \left(1 + \frac{R_s}{R_{sh}}\right)}
39+
z = \frac{R_s I_0}{n N_s V_{th} \left(1 + \frac{R_s}{R_{sh}} \right)} \exp \left(
40+
\frac{R_s \left( I_L + I_0 \right) + V}{n N_s V_{th} \left(1 + \frac{R_s}{R_{sh}}\right)}
4141
\right)
4242
4343
Then the module current can be solved using the Lambert W-function,
@@ -46,7 +46,7 @@ Then the module current can be solved using the Lambert W-function,
4646
.. math::
4747
4848
I = \frac{I_L + I_0 - \frac{V}{R_{sh}}}{1 + \frac{R_s}{R_{sh}}}
49-
- \frac{n Ns V_{th}}{R_s} W \left(z \right)
49+
- \frac{n N_s V_{th}}{R_s} W \left(z \right)
5050
5151
5252
Bishop's Algorithm
@@ -60,7 +60,7 @@ by a zero diode voltage and an estimate of open circuit voltage given by
6060

6161
.. math::
6262
63-
V_{oc, est} = n Ns V_{th} \log \left( \frac{I_L}{I_0} + 1 \right)
63+
V_{oc, est} = n N_s V_{th} \log \left( \frac{I_L}{I_0} + 1 \right)
6464
6565
We know that :math:`V_d = 0` corresponds to a voltage less than zero, and
6666
we can also show that when :math:`V_d = V_{oc, est}`, the resulting
@@ -73,24 +73,24 @@ between 0 and :math:`V_{oc, est}` will always find any desired condition in the
7373

7474
.. math::
7575
76-
I = I_L - I_0 \left(\exp \left(\frac{V_{oc, est}}{n Ns V_{th}} \right) - 1 \right)
76+
I = I_L - I_0 \left(\exp \left(\frac{V_{oc, est}}{n N_s V_{th}} \right) - 1 \right)
7777
- \frac{V_{oc, est}}{R_{sh}} \newline
7878
79-
I = I_L - I_0 \left(\exp \left(\frac{n Ns V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{n Ns V_{th}} \right) - 1 \right)
80-
- \frac{n Ns V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
79+
I = I_L - I_0 \left(\exp \left(\frac{n N_s V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{n N_s V_{th}} \right) - 1 \right)
80+
- \frac{n N_s V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
8181
8282
I = I_L - I_0 \left(\exp \left(\log \left(\frac{I_L}{I_0} + 1 \right) \right) - 1 \right)
83-
- \frac{n Ns V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
83+
- \frac{n N_s V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
8484
8585
I = I_L - I_0 \left(\frac{I_L}{I_0} + 1 - 1 \right)
86-
- \frac{n Ns V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
86+
- \frac{n N_s V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
8787
8888
I = I_L - I_0 \left(\frac{I_L}{I_0} \right)
89-
- \frac{n Ns V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
89+
- \frac{n N_s V_{th} \log \left(\frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
9090
91-
I = I_L - I_L - \frac{n Ns V_{th} \log \left( \frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
91+
I = I_L - I_L - \frac{n N_s V_{th} \log \left( \frac{I_L}{I_0} + 1 \right)}{R_{sh}} \newline
9292
93-
I = - \frac{n Ns V_{th} \log \left( \frac{I_L}{I_0} + 1 \right)}{R_{sh}}
93+
I = - \frac{n N_s V_{th} \log \left( \frac{I_L}{I_0} + 1 \right)}{R_{sh}}
9494
9595
References
9696
----------
@@ -111,4 +111,4 @@ Clifford W. Hansen, Sandia `Report SAND2015-2065
111111

112112
[4] "Computer simulation of the effects of electrical mismatches in
113113
photovoltaic cell interconnection circuits" JW Bishop, Solar Cell (1988)
114-
:doi:`10.1016/0379-6787(88)90059-2`
114+
:doi:`10.1016/0379-6787(88)90059-2`

docs/sphinx/source/whatsnew.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ What's New
66

77
These are new features and improvements of note in each release.
88

9+
.. include:: whatsnew/v0.11.3.rst
910
.. include:: whatsnew/v0.11.2.rst
1011
.. include:: whatsnew/v0.11.1.rst
1112
.. include:: whatsnew/v0.11.0.rst

0 commit comments

Comments
 (0)