Add solar azimuth angle trigonometry#1848
Conversation
Greptile SummaryThis PR adds two new public utilities,
Important Files Changed
Reviews (2): Last reviewed commit: "Azimuth comment improvements" | Re-trigger Greptile |
| Parameters | ||
| ---------- | ||
| time : datetime.datetime, float, np.ndarray or torch.Tensor | ||
| Time in UTC. |
There was a problem hiding this comment.
I recognize the same flaw in documentation comes from the original cos zenith function, but can we clarify the expected units across these different input types? datetime is self-documenting but raw floats are just numbers so here and in cos zenith we should say what the numbers indicate -- and same for ndarrays/tensors of numbers. Also, are ndarrays of numpy datetimes accepted/handled, or just raw float ndarrays?
PhysicsNeMo Pull Request
Description
zenith_azimuth_anglesandzenith_azimuth_angles_from_timestamptophysicsnemo.utils.cos_zenith. These return sin/cos of both solar zenith and azimuth angles, rather than just the zenith angle. They follow the existing dual numpy/torch implementation.Existing functionality is unaffected.
Checklist
Dependencies
Review Process
All PRs are reviewed by the PhysicsNeMo team before merging.
Depending on which files are changed, GitHub may automatically assign a maintainer for review.
We are also testing AI-based code review tools (e.g., Greptile), which may add automated comments with a confidence score.
This score reflects the AI’s assessment of merge readiness and is not a qualitative judgment of your work, nor is
it an indication that the PR will be accepted / rejected.
AI-generated feedback should be reviewed critically for usefulness.
You are not required to respond to every AI comment, but they are intended to help both authors and reviewers.
Please react to Greptile comments with 👍 or 👎 to provide feedback on their accuracy.