Skip to content

Update zenith and azimuth angle documentation #2485

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

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

OmarBahamida
Copy link

@OmarBahamida OmarBahamida commented Jun 17, 2025

- Add detailed definitions for solar angles with range constraints
- Clarify pvlib's east-of-north convention for azimuth angles
- Add cross-references between related terms using :term: directive
- Add coordinate system conventions for latitude/longitude
- Enhance existing angle definitions with usage notes and examples

This commit addresses issue pvlib#2448 by migrating angle definitions and
conventions from parameter descriptions to the nomenclature page.

(cherry picked from commit 16435c7)
- Created test_solar_angles.py to verify solar angle calculations
- Tests zenith, azimuth, and elevation angles for different times of day
- Uses New York City as example location on spring equinox
- Verifies angles are within expected ranges and follow correct patterns

(cherry picked from commit f202c5d)
…s/test_solarposition.py

- Deleted the standalone test_solar_angles.py file.
- Added a new test function, test_solar_angles_spring_equinox, to tests/test_solarposition.py.
- The new test verifies solar angles for New York City on the spring equinox, ensuring angles are within expected ranges and follow correct patterns.

(cherry picked from commit 9963629)
@echedey-ls
Copy link
Contributor

One quick note @OmarBahamida , that also relates to your other open PR #2486; when you opened the pull request, a template with a checklist must have been already there. Please add it again to the top of your pull request message body and mark items as required (not all may apply).

Pull request template

<!-- 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. -->

 - [ ] Closes #xxxx
 - [ ] I am familiar with the [contributing guidelines](https://pvlib-python.readthedocs.io/en/latest/contributing/index.html)
 - [ ] Tests added
 - [ ] Updates entries in [`docs/sphinx/source/reference`](https://github.com/pvlib/pvlib-python/blob/main/docs/sphinx/source/reference) for API changes.
 - [ ] 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` ``).
 - [ ] New code is fully documented. Includes [numpydoc](https://numpydoc.readthedocs.io/en/latest/format.html) compliant docstrings, examples, and comments where necessary.
 - [ ] Pull request is nearly complete and ready for detailed review.
 - [ ] Maintainer: Appropriate GitHub Labels (including `remote-data`) and Milestone are assigned to the Pull Request and linked Issue.

<!-- Brief description of the problem and proposed solution (if not already fully described in the issue linked to above): -->

@RDaxini
Copy link
Member

RDaxini commented Jul 21, 2025

@OmarBahamida are you still working on this? If it helps, I'd be happy to push some final revisions to this branch according to the previous reviews.
It would also be great if you updated the PR description (see earlier comment) and name to make it easier to find/reference in future if needed.
Thanks for your work.

@OmarBahamida
Copy link
Author

OmarBahamida commented Jul 22, 2025

@RDaxini I really appreciate your offer, but at the moment I'm not able to continue working on this PR, so please feel free to make any final updates. Thank you so much for your help and the thoughtful reviews

@RDaxini
Copy link
Member

RDaxini commented Jul 22, 2025

How do you push changes to someone else's branch/PR? I found the PR on github desktop, made and committed the required changes to finalize this PR, but I wasn't able to push the commits.
@cwhanse? I noticed you did this with #2486

@mikofski
Copy link
Member

@RDaxini open a PR to this PR & @cwhanse can merge it

@cwhanse
Copy link
Member

cwhanse commented Jul 22, 2025

@RDaxini I have maintainer privilege so I can short-circuit the "PR to a PR" process: clone the submitter's repository, checkout the branch, edit and commit then push back to the submitter's remote branch.

@RDaxini RDaxini changed the title Fix2448 Update zenith and azimuth angle documentation Jul 22, 2025
@RDaxini RDaxini marked this pull request as draft July 22, 2025 22:25
@RDaxini RDaxini marked this pull request as ready for review July 22, 2025 22:27
@RDaxini
Copy link
Member

RDaxini commented Jul 22, 2025

Ready for review

@kandersolar
Copy link
Member

The docs build complains:

/home/docs/checkouts/readthedocs.org/user_builds/pvlib-python/checkouts/2485/docs/sphinx/source/user_guide/extras/nomenclature.rst:158: WARNING: term not in glossary: 'solar_elevation'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Glossary update: surface/solar zenith/azimuth angles, and others
7 participants