Repository navigation
Use offset parameter in equation_of_time_pvcdrom and declination_cooper69 - #2911
Open
chenyi6758-source wants to merge 3 commits into
Open
chenyi6758-source wants to merge 3 commits into
chenyi6758-source wants to merge 3 commits into
Conversation
Member
|
Thanks @chenyi6758-source , can you pls add a note & your name to what’s new |
AdamRJensen
reviewed
Oct 19, 2026
| # day angle relative to Vernal Equinox, typically March 22 (day number 81) | ||
| bday = \ | ||
| _calculate_simple_day_angle(dayofyear) - (2.0 * np.pi / 365.0) * 80.0 | ||
| bday = _calculate_simple_day_angle(dayofyear, offset=81) |
Member
There was a problem hiding this comment.
Why is offset=81 and not offset=80 as in the original code?
Member
There was a problem hiding this comment.
_calculate_simple_day_angle(dayofyear, offset=1) is the function signature, this is its implementation:
return (2. * np.pi / 365.) * (dayofyear - offset). Both offsets must be added for mathematical equivalence, I've checked that. I haven't checked against the original source.
Added new enhancement details and fixed formatting issues.
Contributor
Author
|
Added a whatsnew note under Enhancements in v0.16.2. My name is already in the Contributors section (added with #2869), so no change needed there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2902.
_calculate_simple_day_anglealready takes anoffsetparameter, so use it directly instead of adding/subtracting the equivalent multiples of 2*pi/365 afterwards. No behavior change: max difference over a full year is 2.4e-14 minutes forequation_of_time_pvcdromand 7e-16 rad fordeclination_cooper69.Verified locally:
tests/test_solarposition.pypasses (60 passed, 21 skipped).