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 sunz_corrected modifier adding unnecessary x and y coordinates #593

Merged
merged 2 commits into from
Jan 27, 2019

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Jan 25, 2019

See #587 for details. This is a replacement for that PR.

In summary, the sunz_corrected modifier was adding new x and y coordinates to the SZA data it was creating. This happened because my_data_arr['y'] will create a new data array even if the 'y' coordinate doesn't exist. The value would be a range representing the indexes of the array. The way this was being used was adding y/x coordinates to the dataset when the original array didn't have them. This would then add these coordinates to the input data and pass it on to the DayNightCompositor. The DayNightCompositor would then get confused if it had y/x for one dataset and no coordinates for the other. This PR makes it so those coordinates are only added if they already existed in the input data to the sunz_corrected modifier.

@djhoese
Copy link
Member Author

djhoese commented Jan 25, 2019

I should have also mentioned this "fixes" (I think) the caching of the SZA data so that it is reused even if the SZA was provided by the reader.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.005%) to 77.584% when pulling bf4a79e on djhoese:bugfix-sunz-corrected-coords into 5c5f0c5 on pytroll:master.

@coveralls
Copy link

coveralls commented Jan 25, 2019

Coverage Status

Coverage increased (+0.02%) to 77.595% when pulling 4377291 on djhoese:bugfix-sunz-corrected-coords into 5c5f0c5 on pytroll:master.

@codecov
Copy link

codecov bot commented Jan 25, 2019

Codecov Report

Merging #593 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #593      +/-   ##
==========================================
+ Coverage   77.57%   77.59%   +0.01%     
==========================================
  Files         136      136              
  Lines       19179    19192      +13     
==========================================
+ Hits        14879    14892      +13     
  Misses       4300     4300
Impacted Files Coverage Δ
satpy/composites/__init__.py 64.36% <100%> (+0.2%) ⬆️
satpy/tests/compositor_tests/__init__.py 99.15% <100%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c5f0c5...4377291. Read the comment docs.

Copy link
Member

@pnuu pnuu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, and works.

@djhoese djhoese merged commit 02d9e91 into pytroll:master Jan 27, 2019
@djhoese djhoese deleted the bugfix-sunz-corrected-coords branch January 27, 2019 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DayNightCompositor does not work with eg overview_sun as the day part
3 participants