Fix latlon_to_xy longitude scaling bug and update scaling tests (Fixes #2614)#2700
Closed
muien5080 wants to merge 1 commit intopvlib:mainfrom
Closed
Fix latlon_to_xy longitude scaling bug and update scaling tests (Fixes #2614)#2700muien5080 wants to merge 1 commit intopvlib:mainfrom
muien5080 wants to merge 1 commit intopvlib:mainfrom
Conversation
1590ff7 to
c3d80be
Compare
Member
|
@muien5080 please put the PR template back in your leading comment block, so we maintainers can use that checklist. Thanks. |
Author
|
Template restored. |
Member
|
Closing this PR as the contributor did not follow instructions. |
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.
Fix incorrect longitude scaling in latlon_to_xy where the NumPy array construction previously misapplied scaling factors, causing longitude to be multiplied by the latitude conversion factor.
Fixes #2614
Changes:
Correct scaling vector construction:
np.array([m_per_deg_lat, m_per_deg_lon])
Ensure longitude scaling depends on mean latitude
Update expected coordinate values in test_scaling.py
Update expected variability reduction (VR) values affected by corrected geometry
Validation:
test_scaling.py passes
Full test suite passes locally:
1415 passed
111 skipped
2x failed
No new warnings introduced
Checklist:
Tests added or updated
Documentation update (not required)
Code passes flake8
All tests pass locally
Linked to relevant issue