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

Feature new olcil2 datasets #438

Merged
merged 20 commits into from Oct 2, 2018
Merged

Feature new olcil2 datasets #438

merged 20 commits into from Oct 2, 2018

Conversation

johannesocean
Copy link
Contributor

@johannesocean johannesocean commented Oct 2, 2018

This adds support for new datasets to the olci l2 reader

  • Tests added
  • Tests passed
  • Passes git diff origin/master **/*py | flake8 --diff
  • Fully documented

class BitFlags(object):
"""Manipulate flags stored bitwise.
"""
flag_list = ['INVALID',u'WATER',u'LAND',u'CLOUD',u'SNOW_ICE',
Copy link
Contributor

Choose a reason for hiding this comment

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

E231 missing whitespace after ','

"""Manipulate flags stored bitwise.
"""
flag_list = ['INVALID',u'WATER',u'LAND',u'CLOUD',u'SNOW_ICE',
u'INLAND_WATER',u'TIDAL',u'COSMETIC',u'SUSPECT',
Copy link
Contributor

Choose a reason for hiding this comment

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

E231 missing whitespace after ','

"""
flag_list = ['INVALID',u'WATER',u'LAND',u'CLOUD',u'SNOW_ICE',
u'INLAND_WATER',u'TIDAL',u'COSMETIC',u'SUSPECT',
u'HISOLZEN',u'SATURATED',u'MEGLINT',u'HIGHGLINT',
Copy link
Contributor

Choose a reason for hiding this comment

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

E231 missing whitespace after ','

flag_list = ['INVALID',u'WATER',u'LAND',u'CLOUD',u'SNOW_ICE',
u'INLAND_WATER',u'TIDAL',u'COSMETIC',u'SUSPECT',
u'HISOLZEN',u'SATURATED',u'MEGLINT',u'HIGHGLINT',
u'WHITECAPS',u'ADJAC',u'WV_FAIL',u'PAR_FAIL',
Copy link
Contributor

Choose a reason for hiding this comment

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

E231 missing whitespace after ','

u'INLAND_WATER',u'TIDAL',u'COSMETIC',u'SUSPECT',
u'HISOLZEN',u'SATURATED',u'MEGLINT',u'HIGHGLINT',
u'WHITECAPS',u'ADJAC',u'WV_FAIL',u'PAR_FAIL',
u'AC_FAIL',u'OC4ME_FAIL',u'OCNN_FAIL',
Copy link
Contributor

Choose a reason for hiding this comment

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

E231 missing whitespace after ','

def getbitmask(self, wqsf, items=[]):
""" """
items = ["INVALID","SNOW_ICE","INLAND_WATER","SUSPECT",
"AC_FAIL","CLOUD","HISOLZEN","OCNN_FAIL",
Copy link
Contributor

Choose a reason for hiding this comment

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

E231 missing whitespace after ','

""" """
items = ["INVALID","SNOW_ICE","INLAND_WATER","SUSPECT",
"AC_FAIL","CLOUD","HISOLZEN","OCNN_FAIL",
"CLOUD_MARGIN","CLOUD_AMBIGUOUS","LOWRW","LAND"]
Copy link
Contributor

Choose a reason for hiding this comment

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

E231 missing whitespace after ','


# mask = reduce(np.logical_or, [bflags[item] for item in items])
# landmask = bflags[u'LAND']
# return mask, landmask
Copy link
Contributor

Choose a reason for hiding this comment

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

W291 trailing whitespace

# mask = reduce(np.logical_or, [bflags[item] for item in items])
# landmask = bflags[u'LAND']
# return mask, landmask

Copy link
Contributor

Choose a reason for hiding this comment

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

W293 blank line contains whitespace

# landmask = bflags[u'LAND']
# return mask, landmask


Copy link
Contributor

Choose a reason for hiding this comment

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

W293 blank line contains whitespace

class BitFlags(object):
"""Manipulate flags stored bitwise.
"""
flag_list = ['INVALID','WATER','LAND','CLOUD','SNOW_ICE',
Copy link
Contributor

Choose a reason for hiding this comment

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

E231 missing whitespace after ','

"""Manipulate flags stored bitwise.
"""
flag_list = ['INVALID','WATER','LAND','CLOUD','SNOW_ICE',
'INLAND_WATER','TIDAL','COSMETIC','SUSPECT',
Copy link
Contributor

Choose a reason for hiding this comment

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

E231 missing whitespace after ','

"""
flag_list = ['INVALID','WATER','LAND','CLOUD','SNOW_ICE',
'INLAND_WATER','TIDAL','COSMETIC','SUSPECT',
'HISOLZEN','SATURATED','MEGLINT','HIGHGLINT',
Copy link
Contributor

Choose a reason for hiding this comment

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

E231 missing whitespace after ','

flag_list = ['INVALID','WATER','LAND','CLOUD','SNOW_ICE',
'INLAND_WATER','TIDAL','COSMETIC','SUSPECT',
'HISOLZEN','SATURATED','MEGLINT','HIGHGLINT',
'WHITECAPS','ADJAC','WV_FAIL','PAR_FAIL',
Copy link
Contributor

Choose a reason for hiding this comment

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

E231 missing whitespace after ','

'INLAND_WATER','TIDAL','COSMETIC','SUSPECT',
'HISOLZEN','SATURATED','MEGLINT','HIGHGLINT',
'WHITECAPS','ADJAC','WV_FAIL','PAR_FAIL',
'AC_FAIL','OC4ME_FAIL','OCNN_FAIL',
Copy link
Contributor

Choose a reason for hiding this comment

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

E231 missing whitespace after ','

'KDM_FAIL',
'Extra_2',

'CLOUD_AMBIGUOUS','CLOUD_MARGIN','BPAC_ON','WHITE_SCATT',
Copy link
Contributor

Choose a reason for hiding this comment

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

E231 missing whitespace after ','

'Extra_2',

'CLOUD_AMBIGUOUS','CLOUD_MARGIN','BPAC_ON','WHITE_SCATT',
'LOWRW','HIGHRW']
Copy link
Contributor

Choose a reason for hiding this comment

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

E231 missing whitespace after ','

class BitFlags(object):
"""Manipulate flags stored bitwise.
"""
flag_list = ['INVALID', 'WATER', 'LAND', 'CLOUD', 'SNOW_ICE',
Copy link
Contributor

Choose a reason for hiding this comment

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

W291 trailing whitespace

"""Manipulate flags stored bitwise.
"""
flag_list = ['INVALID', 'WATER', 'LAND', 'CLOUD', 'SNOW_ICE',
'INLAND_WATER', 'TIDAL', 'COSMETIC', 'SUSPECT',
Copy link
Contributor

Choose a reason for hiding this comment

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

W291 trailing whitespace

"""
flag_list = ['INVALID', 'WATER', 'LAND', 'CLOUD', 'SNOW_ICE',
'INLAND_WATER', 'TIDAL', 'COSMETIC', 'SUSPECT',
'HISOLZEN', 'SATURATED', 'MEGLINT', 'HIGHGLINT',
Copy link
Contributor

Choose a reason for hiding this comment

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

W291 trailing whitespace

flag_list = ['INVALID', 'WATER', 'LAND', 'CLOUD', 'SNOW_ICE',
'INLAND_WATER', 'TIDAL', 'COSMETIC', 'SUSPECT',
'HISOLZEN', 'SATURATED', 'MEGLINT', 'HIGHGLINT',
'WHITECAPS', 'ADJAC', 'WV_FAIL', 'PAR_FAIL',
Copy link
Contributor

Choose a reason for hiding this comment

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

W291 trailing whitespace

'INLAND_WATER', 'TIDAL', 'COSMETIC', 'SUSPECT',
'HISOLZEN', 'SATURATED', 'MEGLINT', 'HIGHGLINT',
'WHITECAPS', 'ADJAC', 'WV_FAIL', 'PAR_FAIL',
'AC_FAIL', 'OC4ME_FAIL', 'OCNN_FAIL',
Copy link
Contributor

Choose a reason for hiding this comment

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

W291 trailing whitespace

'AC_FAIL', 'OC4ME_FAIL', 'OCNN_FAIL',

'Extra_1',
'KDM_FAIL',
Copy link
Contributor

Choose a reason for hiding this comment

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

W291 trailing whitespace


'Extra_1',
'KDM_FAIL',
'Extra_2',
Copy link
Contributor

Choose a reason for hiding this comment

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

W291 trailing whitespace

'KDM_FAIL',
'Extra_2',

'CLOUD_AMBIGUOUS', 'CLOUD_MARGIN', 'BPAC_ON', 'WHITE_SCATT',
Copy link
Contributor

Choose a reason for hiding this comment

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

W291 trailing whitespace


def getbitmask(self, wqsf, items=[]):
""" """
items = ["INVALID", "SNOW_ICE", "INLAND_WATER", "SUSPECT",
Copy link
Contributor

Choose a reason for hiding this comment

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

W291 trailing whitespace

def getbitmask(self, wqsf, items=[]):
""" """
items = ["INVALID", "SNOW_ICE", "INLAND_WATER", "SUSPECT",
"AC_FAIL", "CLOUD", "HISOLZEN", "OCNN_FAIL",
Copy link
Contributor

Choose a reason for hiding this comment

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

W291 trailing whitespace

@codecov
Copy link

codecov bot commented Oct 2, 2018

Codecov Report

Merging #438 into master will increase coverage by 0.07%.
The diff coverage is 86.2%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #438      +/-   ##
==========================================
+ Coverage   72.86%   72.94%   +0.07%     
==========================================
  Files         133      132       -1     
  Lines       17582    17546      -36     
==========================================
- Hits        12812    12799      -13     
+ Misses       4770     4747      -23
Impacted Files Coverage Δ
satpy/tests/reader_tests/__init__.py 97.22% <100%> (ø) ⬆️
satpy/readers/nc_olci.py 42.52% <70.37%> (+19.8%) ⬆️
satpy/tests/reader_tests/test_nc_olci.py 93.22% <93.22%> (ø)
satpy/tests/reader_tests/test_viirs_flood.py
satpy/readers/viirs_edr_flood.py

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 cdd66dc...00bd857. Read the comment docs.

@coveralls
Copy link

coveralls commented Oct 2, 2018

Coverage Status

Coverage increased (+0.2%) to 73.078% when pulling 00bd857 on JohannesSMHI:feature-new-olcil2-datasets into cdd66dc on pytroll:master.

Copy link
Member

@mraspaud mraspaud 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 in general.

@@ -396,6 +396,15 @@ REGION: baws {
AREA_EXTENT: (-475617, 5324430, 924383, 6724430)
};

REGION: baws_merc {
Copy link
Member

Choose a reason for hiding this comment

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

Please remove your custom areas from this file. This file format is on it's way out anyway, and for custom area definition, we believe it's better to have them in a local file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Roger that!

"""
Arguments:
- `value`: an array
- `meaning`: a dict
Copy link
Member

Choose a reason for hiding this comment

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

the documentation doesn't match the function prototype, please fix it or remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

@mraspaud mraspaud mentioned this pull request Oct 2, 2018
3 tasks
@mraspaud mraspaud self-assigned this Oct 2, 2018
@mraspaud mraspaud added enhancement code enhancements, features, improvements component:readers labels Oct 2, 2018
@mraspaud mraspaud added this to the v0.10 milestone Oct 2, 2018
@mraspaud mraspaud merged commit 4e1e149 into pytroll:master Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:readers enhancement code enhancements, features, improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants