-
Notifications
You must be signed in to change notification settings - Fork 303
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
Update MultiScene to work with xarray/dask #322
Conversation
satpy/multiscene.py
Outdated
scn[dataset_id] = blend_function(datasets) | ||
common_datasets = self.shared_dataset_ids | ||
for ds_id in common_datasets: | ||
datasets = [scn[ds_id] for scn in self.scenes if ds_id in scn] |
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.
F812 list comprehension redefines 'scn' from line 72
Codecov Report
@@ Coverage Diff @@
## master #322 +/- ##
==========================================
+ Coverage 68.17% 68.73% +0.55%
==========================================
Files 120 121 +1
Lines 14923 15134 +211
==========================================
+ Hits 10174 10402 +228
+ Misses 4749 4732 -17
Continue to review full report at Codecov.
|
satpy/tests/test_multiscene.py
Outdated
def test_init_empty(self): | ||
"""Test creating a multiscene with no children.""" | ||
from satpy import MultiScene | ||
mscn = MultiScene() |
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 'mscn' is assigned to but never used
satpy/tests/test_multiscene.py
Outdated
"""Test creating a multiscene with children.""" | ||
from satpy import MultiScene | ||
scenes = _create_test_scenes() | ||
mscn = MultiScene(scenes) |
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 'mscn' is assigned to but never used
satpy/tests/test_multiscene.py
Outdated
|
||
bigger_area = _create_test_area(shape=(20, 40)) | ||
scenes[0]['ds4'] = _create_test_dataset('ds4', shape=(20, 40), | ||
area=bigger_area) |
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.
E127 continuation line over-indented for visual indent
|
||
area = _create_test_area() | ||
scenes = _create_test_scenes(area=area) | ||
ds1_id = DatasetID(name='ds1') |
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 'ds1_id' is assigned to but never used
area = _create_test_area() | ||
scenes = _create_test_scenes(area=area) | ||
ds1_id = DatasetID(name='ds1') | ||
ds2_id = DatasetID(name='ds2') |
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 'ds2_id' is assigned to but never used
scenes = _create_test_scenes(area=area) | ||
ds1_id = DatasetID(name='ds1') | ||
ds2_id = DatasetID(name='ds2') | ||
ds3_id = DatasetID(name='ds3') |
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 'ds3_id' is assigned to but never used
ds1_id = DatasetID(name='ds1') | ||
ds2_id = DatasetID(name='ds2') | ||
ds3_id = DatasetID(name='ds3') | ||
ds4_id = DatasetID(name='ds4') |
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 'ds4_id' is assigned to but never used
satpy/tests/test_multiscene.py
Outdated
@mock.patch('satpy.multiscene.get_enhanced_image', _fake_get_enhanced_image) | ||
def test_save_mp4(self): | ||
"""Save a series of fake scenes to an mp4 video.""" | ||
from satpy import MultiScene, DatasetID |
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.DatasetID' imported but unused
Will likely mock it in the future
I did not have time so I am not implementing the feature discussed in #310. I'll do that in a future PR. |
This PR udpates the MultiScene to work with xarray and dask. I added a few useful properties and would like to add at least one helper method to it for creating GIFs or movies using the
imageio
library (see #157).If I have time I'd also like to add the functionality discussed in #310. I marked that issue as being for v0.10, but if it is straight forward I wouldn't mind it showing up in v0.9 as an experiment feature.
I need to add documentation and maybe an example notebook for various multiscene operations. I might add it to the regular sphinx docs with the title ending in "EXPERIMENTAL" until it has been further evaluated after SciPy 2018.
git diff origin/master **/*py | flake8 --diff