Repository navigation
Use offset parameter in equation_of_time_pvcdrom and declination_cooper69 - #2911
chenyi6758-source wants to merge 3 commits into
Conversation
|
Thanks @chenyi6758-source , can you pls add a note & your name to what’s new |
| # 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) |
There was a problem hiding this comment.
Why is offset=81 and not offset=80 as in the original code?
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.
|
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. |
|
@chenyi6758-source as with #2869 (comment), edit the first PR comment to include our PR checklist. It must be included in every PR. |
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).