Skip to content

Commit f586ac3

Browse files
committed
Change more instances of tilt to slope and update descriptions/depr. versions
1 parent 60ced5f commit f586ac3

7 files changed

Lines changed: 49 additions & 50 deletions

File tree

docs/examples/solar-tracking/plot_single_axis_tracking_on_sloped_terrain.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
# ---------------
7878
#
7979
# Now, let's plot the simple case where the tracker axes are at right angles
80-
# to the direction of the slope. In this case, the cross-axis tilt angle
80+
# to the direction of the slope. In this case, the cross-axis slope angle
8181
# is the same as the slope of the terrain and the tracker axis itself is
8282
# horizontal.
8383

@@ -110,7 +110,7 @@
110110

111111
# tracker rotation is undefined at night
112112
backtracking_position = tracker_data['tracker_theta'].fillna(0)
113-
label = 'cross-axis tilt: {}°'.format(cross_axis_slope)
113+
label = 'cross-axis slope: {}°'.format(cross_axis_slope)
114114
backtracking_position.plot(label=label, ax=ax)
115115

116116
plt.legend()
@@ -129,8 +129,8 @@
129129
# with north-south axes on terrain that slopes down to the south-south-east.
130130
# Assuming the axes are installed parallel to the ground, the northern ends
131131
# of the axes will be higher than the southern ends. But because the slope
132-
# isn't purely parallel or perpendicular to the axes, the axis tilt and
133-
# cross-axis tilt angles are not immediately obvious. We can use pvlib
132+
# isn't purely parallel or perpendicular to the axes, the axis slope and
133+
# cross-axis slope angles are not immediately obvious. We can use pvlib
134134
# to calculate them for us:
135135

136136
# terrain slopes 10 degrees downward to the south-south-east. note: because
@@ -140,15 +140,15 @@
140140
slope_tilt = 10
141141
axis_azimuth = 180 # tracker axis is still N-S
142142

143-
# calculate the tracker axis tilt, assuming that the axis follows the terrain:
143+
# calculate the tracker axis slope, assuming that the axis follows the terrain:
144144
axis_slope = tracking.calc_axis_slope(slope_azimuth, slope_tilt, axis_azimuth)
145145

146-
# calculate the cross-axis tilt:
146+
# calculate the cross-axis slope:
147147
cross_axis_slope = tracking.calc_cross_axis_slope(slope_azimuth, slope_tilt,
148148
axis_azimuth, axis_slope)
149149

150-
print('Axis tilt:', '{:0.01f}°'.format(axis_slope))
151-
print('Cross-axis tilt:', '{:0.01f}°'.format(cross_axis_slope))
150+
print('Axis slope:', '{:0.01f}°'.format(axis_slope))
151+
print('Cross-axis slope:', '{:0.01f}°'.format(cross_axis_slope))
152152

153153
# %%
154154
# And now we can pass use these values to generate the tracker curve as
@@ -167,7 +167,7 @@
167167
backtracking_position = tracker_data['tracker_theta'].fillna(0)
168168
backtracking_position.plot()
169169

170-
title_template = 'Axis tilt: {:0.01f}° Cross-axis tilt: {:0.01f}°'
170+
title_template = 'Axis slope: {:0.01f}° Cross-axis slope: {:0.01f}°'
171171
plt.title(title_template.format(axis_slope, cross_axis_slope))
172172
plt.show()
173173

docs/sphinx/source/user_guide/extras/nomenclature.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,15 @@ There is a convention on consistent variable names throughout the library:
6969

7070
cross_axis_slope
7171
Cross-axis slope angle. [°]
72+
7273
The angle, relative to horizontal, of the line between the axes of two
7374
adjacent trackers, in the plane perpendicular to the tracker axes.
7475
Cross-axis slope should be specified using a right-handed convention.
75-
76-
For example, trackers with axis azimuth of 180° (N-S rotation axis)
76+
77+
For example, trackers whose axis azimuth is 180° (N-S rotation axis)
7778
will have a negative cross-axis slope if the tracker axes plane slopes
78-
down to the east and positive cross-axis slope if the tracker axes plane
79-
slopes up to the east.
79+
down to the east and positive cross-axis slope if the tracker axes
80+
plane slopes down to the west.
8081

8182
.. figure:: ../../_images/Anderson_Mikofski_2020_Fig4.png
8283
:alt: Two rows of modules, tracker coordinate system and cross-axis slope of the second row w.r.t. the leftmost.

docs/sphinx/source/whatsnew/v0.15.2.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,17 @@ Breaking Changes
1010

1111
Deprecations
1212
~~~~~~~~~~~~
13+
* Rename ``axis_tilt`` and ``cross_axis_tilt`` to ``axis_slope`` and ``cross_axis_slope`` all through the project, while keeping backwards-compatibility. Affects:
1314

15+
- :py:func:`pvlib.shading.shaded_fraction1d` parameters ``cross_axis_tilt`` and ``axis_tilt``
16+
- :py:func:`pvlib.shading.projected_solar_zenith_angle` parameter ``axis_tilt``
17+
- :py:func:`pvlib.tracking.singleaxis` parameters ``cross_axis_tilt`` and ``axis_tilt``
18+
- :py:func:`pvlib.tracking.calc_surface_orientation` parameter ``axis_tilt``
19+
- :py:func:`!pvlib.tracking.calc_axis_tilt` function is renamed to :py:func:`~pvlib.tracking.calc_axis_slope`
20+
- :py:func:`!pvlib.tracking.calc_cross_axis_tilt` function is renamed to :py:func:`~pvlib.tracking.calc_cross_axis_slope`, and its parameter ``axis_tilt``
21+
- :py:class:`pvlib.pvsystem.SingleAxisTrackerMount` dataclass fields ``axis_tilt`` and ``cross_axis_tilt``
22+
23+
(:issue:`2334`, :pull:`2543`)
1424

1525
Bug fixes
1626
~~~~~~~~~

pvlib/pvsystem.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,7 +1473,7 @@ class SingleAxisTrackerMount(AbstractMount):
14731473
The tilt of the axis of rotation (i.e, the y-axis defined by
14741474
axis_azimuth) with respect to horizontal. [degrees]
14751475
1476-
.. versionchanged:: 0.14.0
1476+
.. versionchanged:: 0.16.0
14771477
Renamed from ``axis_tilt`` to ``axis_slope``.
14781478
14791479
axis_azimuth : float, default 180
@@ -1510,10 +1510,9 @@ class SingleAxisTrackerMount(AbstractMount):
15101510
provided, a gcr of 2/7 is default. gcr must be <=1. [unitless]
15111511
15121512
cross_axis_slope : float, default 0.0
1513-
In degrees :math:`^{\circ}`.
1514-
See :term:`cross_axis_slope`.
1513+
See :term:`cross_axis_slope`. [degrees]
15151514
1516-
.. versionchanged:: 0.14.0
1515+
.. versionchanged:: 0.16.0
15171516
Renamed from ``cross_axis_tilt`` to ``cross_axis_slope``.
15181517
15191518
racking_model : str, optional

pvlib/shading.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,9 @@ def projected_solar_zenith_angle(solar_zenith, solar_azimuth,
265265
solar_azimuth : numeric
266266
Sun's azimuth in degrees.
267267
axis_slope : numeric
268-
Axis tilt angle in degrees. From horizontal plane to array plane.
268+
Axis slope angle in degrees. From horizontal plane to array plane.
269269
270-
.. versionchanged:: 0.14.0
270+
.. versionchanged:: 0.16.0
271271
Renamed from ``axis_tilt`` to ``axis_slope``
272272
273273
axis_azimuth : numeric
@@ -325,7 +325,7 @@ def projected_solar_zenith_angle(solar_zenith, solar_azimuth,
325325
"""
326326
# Assume the tracker reference frame is right-handed. Positive y-axis is
327327
# oriented along tracking axis; from north, the y-axis is rotated clockwise
328-
# by the axis azimuth and tilted from horizontal by the axis tilt. The
328+
# by the axis azimuth and tilted from horizontal by the axis slope. The
329329
# positive x-axis is 90 deg clockwise from the y-axis and parallel to
330330
# horizontal (e.g., if the y-axis is south, the x-axis is west); the
331331
# positive z-axis is normal to the x and y axes, pointed upward.
@@ -416,17 +416,16 @@ def shaded_fraction1d(
416416
axis_slope : numeric, default 0
417417
Tilt of the rows axis from horizontal. In degrees :math:`^{\circ}`.
418418
419-
.. versionchanged:: 0.14.0
419+
.. versionchanged:: 0.16.0
420420
Renamed from ``axis_tilt`` to ``axis_slope``
421421
422422
surface_to_axis_offset : numeric, default 0
423423
Distance between the rotating axis and the collector surface.
424424
May be used to account for a torque tube offset.
425425
cross_axis_slope : numeric, default 0
426-
In degrees :math:`^{\circ}`.
427-
See :term:`cross_axis_slope`.
426+
See :term:`cross_axis_slope`. In degrees :math:`^{\circ}`.
428427
429-
.. versionchanged:: 0.14.0
428+
.. versionchanged:: 0.16.0
430429
Renamed from ``cross_axis_tilt`` to ``cross_axis_slope``
431430
432431
shading_row_rotation : numeric, optional

pvlib/tracking.py

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,7 @@ def singleaxis(apparent_zenith, solar_azimuth,
9393
2/7 is default. ``gcr`` must be <=1.
9494
9595
cross_axis_slope : float, default 0.0
96-
The angle, relative to horizontal, of the line formed by the
97-
intersection between the slope containing the tracker axes and a plane
98-
perpendicular to the tracker axes. The cross-axis tilt should be
99-
specified using a right-handed convention. For example, trackers with
100-
``axis_azimuth`` of 180 degrees (heading south) will have a negative
101-
cross-axis tilt if the tracker axes plane slopes down to the east and
102-
positive cross-axis tilt if the tracker axes plane slopes down to the
103-
west. Use :func:`~pvlib.tracking.calc_cross_axis_tilt` to calculate
104-
``cross_axis_tilt``. [degrees]
96+
See :term:`cross_axis_slope`. [degrees]
10597
10698
.. versionchanged:: 0.16.0
10799
Renamed from ``cross_axis_tilt`` to ``cross_axis_slope``.
@@ -174,7 +166,7 @@ def singleaxis(apparent_zenith, solar_azimuth,
174166
# Account for backtracking
175167
if backtrack:
176168
# distance between rows in terms of rack lengths relative to cross-axis
177-
# tilt
169+
# slope
178170
axes_distance = 1/(gcr * cosd(cross_axis_slope))
179171

180172
# NOTE: account for rare angles below array, see GH 824
@@ -335,8 +327,8 @@ def calc_surface_orientation(tracker_theta, axis_slope=0, axis_azimuth=0):
335327

336328
def calc_axis_slope(slope_azimuth, slope_tilt, axis_azimuth):
337329
"""
338-
Calculate tracker axis tilt in the global reference frame when on a sloped
339-
plane. Axis tilt is the inclination of the tracker rotation axis with
330+
Calculate tracker axis slope in the global reference frame when on a sloped
331+
plane. Axis slope is the inclination of the tracker rotation axis with
340332
respect to horizontal, ranging from 0 degrees (horizontal axis) to 90
341333
degrees (vertical axis).
342334
@@ -386,7 +378,7 @@ def _calc_tracker_norm(ba, bg, dg):
386378
Parameters
387379
----------
388380
ba : float
389-
axis tilt [degrees]
381+
axis slope [degrees]
390382
bg : float
391383
ground tilt [degrees]
392384
dg : float
@@ -409,7 +401,7 @@ def _calc_tracker_norm(ba, bg, dg):
409401

410402
def _calc_beta_c(v, dg, ba):
411403
"""
412-
Calculate the cross-axis tilt angle.
404+
Calculate the cross-axis slope angle.
413405
414406
Parameters
415407
----------
@@ -418,12 +410,12 @@ def _calc_beta_c(v, dg, ba):
418410
dg : float
419411
delta gamma, difference between axis and ground azimuths [degrees]
420412
ba : float
421-
axis tilt [degrees]
413+
axis slope [degrees]
422414
423415
Returns
424416
-------
425417
beta_c : float
426-
cross-axis tilt angle [radians]
418+
cross-axis slope angle [radians]
427419
"""
428420
vnorm = np.sqrt(np.dot(v, v))
429421
beta_c = np.arcsin(
@@ -443,12 +435,12 @@ def calc_cross_axis_slope(
443435
intersection between the slope containing the tracker axes and a plane
444436
perpendicular to the tracker axes.
445437
446-
Use the cross-axis tilt to avoid row-to-row shade when backtracking on a
447-
slope not parallel with the axis azimuth. Cross-axis tilt should be
438+
Use the cross-axis slope to avoid row-to-row shade when backtracking on a
439+
slope not parallel with the axis azimuth. Cross-axis slope should be
448440
specified using a right-handed convention. For example, trackers with axis
449-
azimuth of 180 degrees (heading south) will have a negative cross-axis tilt
450-
if the tracker axes plane slopes down to the east and positive cross-axis
451-
tilt if the tracker axes plane slopes down to the west.
441+
azimuth of 180 degrees (heading south) will have a negative cross-axis
442+
slope if the tracker axes plane slopes down to the east and positive
443+
cross-axis slope if the tracker axes plane slopes down to the west.
452444
453445
.. versionchanged:: 0.16.0
454446
Renamed function ``calc_cross_axis_tilt`` to ``calc_cross_axis_slope``.
@@ -472,9 +464,7 @@ def calc_cross_axis_slope(
472464
Returns
473465
-------
474466
cross_axis_slope : float
475-
angle, relative to horizontal, of the line formed by the intersection
476-
between the slope containing the tracker axes and a plane perpendicular
477-
to the tracker axes [degrees]
467+
See :term:`cross_axis_slope`. [degrees]
478468
479469
See also
480470
--------

tests/test_tracking.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def test_calc_axis_slope():
394394
axis_slope = tracking.calc_axis_slope(
395395
slope_azimuth, slope_tilt, axis_azimuth=axis_azimuth)
396396
assert np.isclose(axis_slope, expected_axis_slope)
397-
# calculate cross-axis tilt and relative rotation
397+
# calculate cross-axis slope and relative rotation
398398
cross_axis_slope = tracking.calc_cross_axis_slope(
399399
slope_azimuth, slope_tilt, axis_azimuth, axis_slope)
400400
assert np.isclose(cross_axis_slope, expected_side_slope)
@@ -515,7 +515,7 @@ def test_calc_surface_orientation_types():
515515

516516

517517
def test_calc_surface_orientation_kwargs():
518-
# non-default axis tilt & azimuth
518+
# non-default axis slope & azimuth
519519
rotations = np.array([-10, 0, 10])
520520
expected_tilts = np.array([22.2687445, 20.0, 22.2687445])
521521
expected_azimuths = np.array([152.72683041, 180.0, 207.27316959])

0 commit comments

Comments
 (0)