satpy.tests.scene_tests.test_resampling module
Unit tests for resampling and crop-related functionality in scene.py.
- class satpy.tests.scene_tests.test_resampling.TestSceneAggregation[source]
Bases:
object
Test the scene’s aggregate method.
- class satpy.tests.scene_tests.test_resampling.TestSceneCrop[source]
Bases:
object
Test creating new Scenes by cropping an existing Scene.
- class satpy.tests.scene_tests.test_resampling.TestSceneResampling[source]
Bases:
object
Test resampling a Scene to another Scene object.
- _fake_resample_dataset(dataset, dest_area, **kwargs)[source]
Return copy of dataset pretending it was resampled.
- _fake_resample_dataset_force_20x20(dataset, dest_area, **kwargs)[source]
Return copy of dataset pretending it was resampled to (20, 20) shape.
- pytestmark = [Mark(name='usefixtures', args=('include_test_etc',), kwargs={})]
- test_comp_loading_after_resampling_existing_sensor()[source]
Test requesting a composite after resampling.
- test_comp_loading_after_resampling_new_sensor()[source]
Test requesting a composite after resampling when the sensor composites weren’t loaded before.
- test_comp_loading_multisensor_composite_created_user()[source]
Test that multisensor composite can be created manually.
Test that if the user has created datasets “manually”, that multi-sensor composites provided can still be read.
- test_comps_need_resampling_optional_mod_deps()[source]
Test that a composite with complex dependencies.
This is specifically testing the case where a compositor depends on multiple resolution prerequisites which themselves are composites. These sub-composites depend on data with a modifier that only has optional dependencies. This is a very specific use case and is the simplest way to present the problem (so far).
The general issue is that the Scene loading creates the “ds13” dataset which already has one modifier on it. The “comp27” composite requires resampling so its 4 prerequisites + the requested “ds13” (from the reader which includes mod1 modifier) remain. If the DependencyTree is not copied properly in this situation then the new Scene object will have the composite dependencies without resolution in its dep tree, but have the DataIDs with the resolution in the dataset dictionary. This all results in the Scene trying to regenerate composite dependencies that aren’t needed which fail.
- test_resample_multi_ancillary()[source]
Test that multiple ancillary variables are retained after resampling.
This test corresponds to GH#2329
- test_resample_reduce_data()[source]
Test that the Scene reducing data does not affect final output.
- test_resample_reduce_data_toggle(rs)[source]
Test that the Scene can be reduced or not reduced during resampling.