Skip to content
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

Fix glitches in cosine_of_solar_zenith_angle #1110

Closed
aulemahal opened this issue Jun 17, 2022 · 0 comments · Fixed by #1399
Closed

Fix glitches in cosine_of_solar_zenith_angle #1110

aulemahal opened this issue Jun 17, 2022 · 0 comments · Fixed by #1399
Assignees
Labels
bug Something isn't working
Milestone

Comments

@aulemahal
Copy link
Collaborator

aulemahal commented Jun 17, 2022

The new cosine_of_solar_zenith_angle, introduced in #1062, has some issues. The polar regions (with no sunset/rise) are not correctly handled and there are some glitches from unknown sources. Some are documented in the PR and should be fixable with a few corrections inspired from PyWBGT.

@aulemahal aulemahal added the bug Something isn't working label Jun 17, 2022
@aulemahal aulemahal added this to the v0.38 milestone Jun 17, 2022
@aulemahal aulemahal self-assigned this Jun 17, 2022
@Zeitsperre Zeitsperre modified the milestones: v0.38, v0.39 Aug 30, 2022
@tlogan2000 tlogan2000 modified the milestones: v0.39, v0.40 Oct 11, 2022
@Zeitsperre Zeitsperre modified the milestones: v0.40, v0.41 Dec 13, 2022
@Zeitsperre Zeitsperre modified the milestones: v0.41, v0.42 Feb 27, 2023
@Zeitsperre Zeitsperre modified the milestones: v0.42, Summer 2023 Mar 31, 2023
aulemahal added a commit that referenced this issue Jun 21, 2023
<!--Please ensure the PR fulfills the following requirements! -->
<!-- If this is your first PR, make sure to add your details to the
AUTHORS.rst! -->
### Pull Request Checklist:
- [x] This PR addresses an already opened issue (for bug fixes /
features)
    - This PR fixes #1110
- [x] Tests for the changes have been added (for bug fixes / features)
- [x] (If applicable) Documentation has been added / updated (for bug
fixes / features)
- [x] CHANGES.rst has been updated (with summary of main changes)
- [x] Link to issue (:issue:`number`) and pull request (:pull:`number`)
has been added

### What kind of change does this PR introduce?
Refactor of the function so we can use a ufunc, making it easier to
implement the different cases.

Earlier version was not handling the cyclical nature of angles correctly
and had issues in the polar regions.

### Does this PR introduce a breaking change?
Yes, the output has changed. I think it is now correct. The signature
has also changed.

### Other information:
PyWGBT was used as a comparison.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants