-
Notifications
You must be signed in to change notification settings - Fork 297
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
Factorize header definitions between hrit_msg and native_msg. Fix a bug in header definition. #301
Conversation
…finition, all bytes are correct now. Add trailer reading to native_msg. Code clean-up.
Codecov Report
@@ Coverage Diff @@
## master #301 +/- ##
==========================================
+ Coverage 65.86% 66.34% +0.47%
==========================================
Files 118 119 +1
Lines 14336 14414 +78
==========================================
+ Hits 9443 9563 +120
+ Misses 4893 4851 -42
Continue to review full report at Codecov.
|
…um_base.py for hosting common reader utilities for EUMETSAT data.
satpy/readers/hrit_msg.py
Outdated
@@ -38,16 +38,20 @@ | |||
import numpy as np | |||
|
|||
from pyresample import geometry | |||
|
|||
from satpy.readers.eum_base import (make_time_cds, time_cds_short, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F401 'satpy.readers.eum_base.make_time_cds' imported but unused
satpy/readers/native_msg.py
Outdated
|
||
class CalibrationError(Exception): | ||
pass | ||
from satpy.readers.eum_base import make_time_cds, recarray2dict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F401 'satpy.readers.eum_base.make_time_cds' imported but unused
satpy/readers/native_msg.py
Outdated
class CalibrationError(Exception): | ||
pass | ||
from satpy.readers.eum_base import make_time_cds, recarray2dict | ||
from satpy.readers.msg_base import (SEVIRICalibrationHandler, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F401 'satpy.readers.msg_base.get_cds_time' imported but unused
satpy/readers/native_msg.py
Outdated
|
||
data15hd = self.header['15_DATA_HEADER'] | ||
sec15hd = self.header['15_SECONDARY_PRODUCT_HEADER'] | ||
|
||
utc = data15hd['ImageAcquisition']['PlannedAcquisitionTime'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F841 local variable 'utc' is assigned to but never used
satpy/readers/native_msg.py
Outdated
|
||
west = int(sec15hd['WestColumnSelectedRectangle']['Value']) | ||
east = int(sec15hd['EastColumnSelectedRectangle']['Value']) | ||
north = int(sec15hd["NorthLineSelectedRectangle"]['Value']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F841 local variable 'north' is assigned to but never used
satpy/readers/native_msg.py
Outdated
west = int(sec15hd['WestColumnSelectedRectangle']['Value']) | ||
east = int(sec15hd['EastColumnSelectedRectangle']['Value']) | ||
north = int(sec15hd["NorthLineSelectedRectangle"]['Value']) | ||
south = int(sec15hd["SouthLineSelectedRectangle"]['Value']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F841 local variable 'south' is assigned to but never used
make_time_cds_expanded) | ||
from satpy.readers.hrit_msg import HRITMSGPrologueFileHandler | ||
# make_time_cds_expanded) | ||
from satpy.readers.eum_base import make_time_cds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F401 'satpy.readers.eum_base.make_time_cds' imported but unused
[ x] Passes Fails on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job !
satpy/readers/hrit_goes.py
Outdated
@@ -49,6 +48,30 @@ class CalibrationError(Exception): | |||
logger = logging.getLogger('hrit_goes') | |||
|
|||
|
|||
def recarray2dict(arr): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function should be removed, right ?
satpy/readers/hrit_msg.py
Outdated
@@ -451,8 +116,6 @@ def __init__(self, filename, filename_info, filetype_info): | |||
(msg_hdr_map, | |||
msg_variable_length_headers, | |||
msg_text_headers)) | |||
|
|||
self.prologue = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instance attributes should be initialized in init
…m_base. Remove unittest for hrit_msg. Add unittest for recarray2dict in eum_base. Clean-up code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fix a bug in
hrit_msg
andnative_msg
header-definitions. Factorize header-definitions betweenhrit_msg
andnative_msg
. Add image trailer reading fornative_msg
. Clean-up code.git diff origin/master **/*py | flake8 --diff