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

Add grouping parameters for the 'viirs_sdr' reader #816

Merged
merged 1 commit into from
Jun 12, 2019

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Jun 12, 2019

This allows someone to use the group_files utility function or MultiScene.from_files class method with a series of VIIRS SDR files and have them be sorted by orbit and platform. This differs from what would normally be done where only start_time and maybe platform would be used. I made the assumption that most people would want to group orbits together instead of individual granules and I wanted that to work by default. So as an example:

groups = group_files(self.noaa20_files + self.npp_files, reader='viirs_sdr')

Would give you two groups, one for the NOAA-20 files and one for the NPP files. You could also give it two orbits of either one of these platforms. You could get around this by doing something like:

        groups = group_files(self.noaa20_files + self.npp_files, reader='viirs_sdr',
                             time_threshold=60 * 60 * 2,
                             group_keys=('start_time', 'orbit', 'platform_shortname'))

I'm open to discussion of making the start_time version the default and requiring people to use time_threshold to get "chunks" of data.

  • Tests added and test suite added to parent suite
  • Tests passed
  • Passes flake8 satpy

@djhoese djhoese added enhancement code enhancements, features, improvements component:readers labels Jun 12, 2019
@djhoese djhoese added this to the v0.16 milestone Jun 12, 2019
@djhoese djhoese requested review from mraspaud and pnuu June 12, 2019 13:46
@djhoese djhoese self-assigned this Jun 12, 2019
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.

LGTM

@codecov
Copy link

codecov bot commented Jun 12, 2019

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #816      +/-   ##
==========================================
+ Coverage   83.72%   83.74%   +0.01%     
==========================================
  Files         165      165              
  Lines       24115    24139      +24     
==========================================
+ Hits        20190    20214      +24     
  Misses       3925     3925
Impacted Files Coverage Δ
satpy/tests/test_readers.py 98.46% <100%> (+0.09%) ⬆️

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 5b74266...14edc87. Read the comment docs.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 83.74% when pulling 14edc87 on djhoese:feature-viirs-sdr-groups into 5b74266 on pytroll:master.

@mraspaud mraspaud merged commit fa0e046 into pytroll:master Jun 12, 2019
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.

3 participants