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

Consistent platform id attribute across NAT + HRIT SEVIRI readers #721

Merged
merged 1 commit into from Apr 12, 2019
Merged

Consistent platform id attribute across NAT + HRIT SEVIRI readers #721

merged 1 commit into from Apr 12, 2019

Conversation

simonrp84
Copy link
Member

@simonrp84 simonrp84 commented Apr 12, 2019

Bugfix
Currently, the SEVIRI L1B Native reader will crash, as it is unable to calibrate IR channels:
AttributeError: 'NativeMSGFileHandler' object has no attribute 'platform_id'
This is because the Native reader stores platform_id inside self.mda whereas the calibration routine expects it as self.platform_id. The HRIT reader stores this attribute as self.platform_id.

This PR updates the Native reader to store the attribute as self.platform_id, thus making both SEVIRI readers consistent and preventing the AttributeError from occurring.

[edit] The method described in issue #722 is a better solution to this.

  • Tests passed
  • Passes git diff origin/master -- "*py" | flake8 --diff

…HRIT reader, allows calibration of the data.
@codecov
Copy link

codecov bot commented Apr 12, 2019

Codecov Report

Merging #721 into master will increase coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #721      +/-   ##
==========================================
+ Coverage   80.01%   80.02%   +<.01%     
==========================================
  Files         147      147              
  Lines       21498    21498              
==========================================
+ Hits        17202    17203       +1     
+ Misses       4296     4295       -1
Impacted Files Coverage Δ
satpy/readers/seviri_l1b_native.py 61.33% <66.66%> (ø) ⬆️
satpy/scene.py 89.89% <0%> (+0.18%) ⬆️

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 88c0f63...da3f4dd. Read the comment docs.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.005%) to 80.021% when pulling da3f4dd on simonrp84:seviri_native_cal into 88c0f63 on pytroll:master.

@djhoese djhoese added the bug label Apr 12, 2019
Copy link
Member

@djhoese djhoese left a comment

Choose a reason for hiding this comment

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

If @sjoro is fine with this then so am I. (sounds like it from what I got from slack)

@djhoese djhoese changed the title Consistent platform id attirbute across NAT + HRIT SEVIRI data Consistent platform id attribute across NAT + HRIT SEVIRI readers Apr 12, 2019
@djhoese djhoese merged commit fe26b67 into pytroll:master Apr 12, 2019
@sjoro
Copy link
Collaborator

sjoro commented Apr 12, 2019

looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants