8000 Projected zenith convenience function by echedey-ls · Pull Request #1904 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

Projected zenith convenience function #1904

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
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
1e412ce
Function prototype
echedey-ls Nov 6, 2023
e4a95a3
Update shading.rst
echedey-ls Nov 6, 2023
54878db
Update shading.py
echedey-ls Nov 6, 2023
b79ebe6
Minimal test
echedey-ls Nov 6, 2023
c3c0e56
Implementation
echedey-ls Nov 8, 2023
5d4a2b4
Fix, fix, fix, fix & format
echedey-ls Nov 8, 2023
9ae5fa3
Format issues
echedey-ls Nov 8, 2023
f17379d
Extend tests (compare with singleaxis) & format with ruff
echedey-ls Nov 8, 2023
af3d27c
Format fixes
echedey-ls Nov 8, 2023
d36841a
Upgrade tests
echedey-ls Nov 9, 2023
19995e1
Array -> Axis
echedey-ls Nov 9, 2023
770e037
type
echedey-ls Nov 9, 2023
29bcef9
Whatsnew
echedey-ls Nov 9, 2023 8000
61c2e3b
xd
echedey-ls Nov 9, 2023
935cfd4
Merge branch 'main' into projected-solar-zenith-angle-issue1734
echedey-ls Nov 9, 2023
965b0b4
bruh
echedey-ls Nov 9, 2023
346d060
Minor Python optimization a la tracking.singleaxis
echedey-ls Nov 9, 2023
085d017
Comment and minor optimizations
echedey-ls Nov 9, 2023
79b5f4f
Typo found by Mikofski
echedey-ls Nov 9, 2023
dc1035a
Surface -> Axis
echedey-ls Nov 9, 2023
88cbfc0
Elevation -> Zenith
echedey-ls Nov 9, 2023
1afec94
Elev -> Zenith
echedey-ls Nov 9, 2023
4b2c0e5
Update shading.py
echedey-ls Jan 24, 2024
4612442
Update docstring
echedey-ls Jan 24, 2024
6372cb7
Add comments from `tracking.singleaxis`
echedey-ls Jan 24, 2024
3c9392b
Singleaxis implementation port & test addition, based on old pvlib.tr…
echedey-ls Jan 25, 2024
93998d8
Merge branch 'main' into projected-solar-zenith-angle-issue1734
echedey-ls Jan 25, 2024
337f7f1
Update v0.10.4.rst
echedey-ls Jan 25, 2024
0923109
Linter
echedey-ls Jan 25, 2024
6955f71
Code review
echedey-ls Jan 25, 2024
939b241
Add Fig 5 [1] (still gotta check the built output)
echedey-ls Jan 27, 2024
b0d6f66
Add caption, change size and describe in alternate text
echedey-ls Jan 27, 2024
3df2e71
rST fixes ?
echedey-ls Jan 27, 2024
428852c
Figures have captions, images do not
echedey-ls Jan 27, 2024
64c97c7
Merge branch 'main' into projected-solar-zenith-angle-issue1734
echedey-ls Feb 8, 2024
aed85a3
Flip arguments order
echedey-ls Feb 8, 2024
5d37fb3
I forgot :skull:
echedey-ls Feb 8, 2024
38c2d4d
Linter are you happy now?
echedey-ls Feb 8, 2024
23aaa2a
Remove port test and add edge cases test
echedey-ls Feb 9, 2024
2c0fa51
Update test_shading.py
echedey-ls Feb 9, 2024
5b49706
Indentation xd
echedey-ls Feb 9, 2024
1a68390
Update test_shading.py
echedey-ls Feb 9, 2024
58d853f
I forgot how to code
echedey-ls Feb 9, 2024
2ba4cf7
Align data
echedey-ls Feb 9, 2024
8325c37
Merge branch 'main' into projected-solar-zenith-angle-issue1734
echedey-ls Feb 24, 2024
f2fcc88
Merge branch 'main' into projected-solar-zenith-angle-issue1734
echedey-ls Feb 27, 2024
069688e
Docstring suggestion from Kevin
echedey-ls Feb 27, 2024
c249224
Update link to example?
echedey-ls Feb 27, 2024
f6c245f
Link, please work
echedey-ls Feb 27, 2024
b52f51d
Update shading.py
echedey-ls Feb 27, 2024
96ce603
Update shading.py
echedey-ls Feb 28, 2024
ff42463
Update shading.py
echedey-ls Feb 28, 2024
1c28e7f
Update shading.py
echedey-ls Feb 28, 2024
cd346e9
Update shading.py
echedey-ls Feb 28, 2024
796c7a9
Update shading.py
echedey-ls Feb 28, 2024
761750c
Update shading.py
echedey-ls Feb 28, 2024
2be29f2
Update shading.py
echedey-ls Feb 28, 2024
8beef55
Lintaaaaaaarrrgh
echedey-ls Feb 28, 2024
5e2be60
Update pvlib/shading.py
echedey-ls Mar 4, 2024
3c5308b
Merge branch 'main' into projected-solar-zenith-angle-issue1734
kandersolar Mar 8, 2024
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
Prev Previous commit
Next Next commit
Add comments from tracking.singleaxis
Co-Authored-By: Will Holmgren <william.holmgren@gmail.com>
Co-Authored-By: Mark Mikofski <bwana.marko@yahoo.com>
  • Loading branch information
@echedey-ls < 8000 a class="avatar avatar-user" style="width:20px;height:20px;" data-test-selector="commits-avatar-stack-avatar-link" data-hovercard-type="user" data-hovercard-url="/users/wholmgren/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/wholmgren"> @wholmgren @mikofski
3 people committed Jan 24, 2024
commit 6372cb7ebff57618f579c25a5983c0fefdf62e75
17 changes: 16 additions & 1 deletion pvlib/shading.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,15 @@ def projected_solar_zenith_angle(axis_tilt, axis_azimuth,
Progress in Photovoltaics: Research and Applications, vol. 19, no. 6,
pp. 747-753, 2011, :doi:`10.1002/pip.1085`.
"""
# Notation from [1], modified to use zenith instead of elevation
# Assume the tracker reference frame is right-handed. Positive y-axis is
# oriented along tracking axis; from north, the y-axis is rotated clockwise
# by the axis azimuth and tilted from horizontal by the axis tilt. The
# positive x-axis is 90 deg clockwise from the y-axis and parallel to
# horizontal (e.g., if the y-axis is south, the x-axis is west); the
# positive z-axis is normal to the x and y axes, pointed upward.

# Since elevation = 90 - zenith, sin(90-x) = cos(x) & cos(90-x) = sin(x):
# Notation from [1], modified to use zenith instead of elevation
# cos(elevation) = sin(zenith) and sin(elevation) = cos(zenith)
# Avoid recalculating these values
sind_solar_zenith = sind(solar_zenith)
Expand All @@ -295,6 +302,14 @@ def projected_solar_zenith_angle(axis_tilt, axis_azimuth,
+ sy * sind_axis_tilt * cosd_axis_azimuth
+ sz * cosd(axis_tilt)
)
# The ideal tracking angle wid is the rotation to place the sun position
# vector (xp, yp, zp) in the (x, z) plane, which is normal to the panel and
# contains the axis of rotation. wid = 0 indicates that the panel is
# horizontal. Here, our convention is that a clockwise rotation is
# positive, to view rotation angles in the same frame of reference as
# azimuth. For example, for a system with tracking axis oriented south, a
# rotation toward the east is negative, and a rotation to the west is
# positive. This is a right-handed rotation around the tracker y-axis.
# Eq. (5); angle between sun's beam and surface
theta_T = np.degrees(np.arctan2(sx_prime, sz_prime))
return theta_T
0