satpy.tests.multiscene_tests.test_blend module

Unit tests for blending datasets with the Multiscene object.

class satpy.tests.multiscene_tests.test_blend.TestBlendFuncs[source]

Bases: object

Test individual functions used for blending.

datasets_and_weights()[source]

X-Array datasets with area definition plus weights for input to tests.

test_blend_function_stack(datasets_and_weights)[source]

Test the ‘stack’ function.

test_blend_function_stack_weighted(datasets_and_weights, line, column)[source]

Test the ‘stack_weighted’ function.

test_blend_two_scenes_bad_blend_type(multi_scene_and_weights, groups)[source]

Test exception is raised when bad ‘blend_type’ is used.

test_blend_two_scenes_using_stack(multi_scene_and_weights, groups, scene1_with_weights, scene2_with_weights)[source]

Test blending two scenes by stacking them on top of each other using function ‘stack’.

test_blend_two_scenes_using_stack_weighted(multi_scene_and_weights, groups, scene1_with_weights, scene2_with_weights, blend_func, exp_result_func)[source]

Test stacking two scenes using weights.

Here we test that the start and end times can be combined so that they describe the start and times of the entire data series. We also test the various types of weighted stacking functions (ex. select, blend).

test_timeseries(datasets_and_weights)[source]

Test the ‘timeseries’ function.

class satpy.tests.multiscene_tests.test_blend.TestTemporalRGB[source]

Bases: object

Test the temporal RGB blending method.

static _assert_results(res, expected_start_time, expected_result)[source]
expected_result()[source]

Return the expected result arrays.

nominal_data()[source]

Return the input arrays for the nominal use case.

test_extra_datasets(nominal_data, expected_result)[source]

Test that only the first three arrays affect the usage.

test_nominal(nominal_data, expected_result)[source]

Test that nominal usage with 3 datasets works.

satpy.tests.multiscene_tests.test_blend._check_stacked_metadata(data_arr: DataArray, exp_name: str) None[source]
satpy.tests.multiscene_tests.test_blend._get_expected_stack_blend(scene1: Scene, scene2: Scene) DataArray[source]
satpy.tests.multiscene_tests.test_blend._get_expected_stack_select(scene1: Scene, scene2: Scene) DataArray[source]
satpy.tests.multiscene_tests.test_blend.cloud_type_data_array1(test_area, data_type, image_mode)[source]

Get DataArray for cloud type in the first test Scene.

satpy.tests.multiscene_tests.test_blend.cloud_type_data_array2(test_area, data_type, image_mode)[source]

Get DataArray for cloud type in the second test Scene.

satpy.tests.multiscene_tests.test_blend.data_type(request)[source]

Get array data type of the DataArray being tested.

satpy.tests.multiscene_tests.test_blend.groups()[source]

Get group definitions for the MultiScene.

satpy.tests.multiscene_tests.test_blend.image_mode(request)[source]

Get image mode of the main DataArray being tested.

satpy.tests.multiscene_tests.test_blend.multi_scene_and_weights(scene1_with_weights, scene2_with_weights)[source]

Create small multi-scene for testing.

satpy.tests.multiscene_tests.test_blend.scene1_with_weights(cloud_type_data_array1, test_area)[source]

Create first test scene with a dataset of weights.

satpy.tests.multiscene_tests.test_blend.scene2_with_weights(cloud_type_data_array2, test_area)[source]

Create second test scene.

satpy.tests.multiscene_tests.test_blend.test_area()[source]

Get area definition used by test DataArrays.