satpy.tests.test_composites module
Tests for compositors in composites/__init__.py.
- class satpy.tests.test_composites.TestAddBands(methodName='runTest')[source]
Bases:
TestCase
Test case for the add_bands function.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- _classSetupFailed = False
- _class_cleanups = []
- class satpy.tests.test_composites.TestBackgroundCompositor[source]
Bases:
object
Test case for the background compositor.
- class satpy.tests.test_composites.TestCategoricalDataCompositor(methodName='runTest')[source]
Bases:
TestCase
Test composiotor for recategorization of categorical data.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- _classSetupFailed = False
- _class_cleanups = []
- class satpy.tests.test_composites.TestCloudCompositorCommonMask[source]
Bases:
object
Test the CloudCompositorCommonMask.
- class satpy.tests.test_composites.TestCloudCompositorWithoutCloudfree[source]
Bases:
object
Test the CloudCompositorWithoutCloudfree.
- test_bad_indata()[source]
Test the CloudCompositorWithoutCloudfree composite generation without status.
- test_call_bad_optical_conditions()[source]
Test the CloudCompositorWithoutCloudfree composite generation.
- class satpy.tests.test_composites.TestColorizeCompositor(methodName='runTest')[source]
Bases:
TestCase
Test the ColorizeCompositor.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- _classSetupFailed = False
- _class_cleanups = []
- class satpy.tests.test_composites.TestColormapCompositor(methodName='runTest')[source]
Bases:
TestCase
Test the ColormapCompositor.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- _classSetupFailed = False
- _class_cleanups = []
- class satpy.tests.test_composites.TestDayNightCompositor(methodName='runTest')[source]
Bases:
TestCase
Test DayNightCompositor.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- _classSetupFailed = False
- _class_cleanups = []
- test_day_only_area_with_alpha()[source]
Test compositor with day portion with alpha_band when SZA data is not provided.
- test_day_only_area_with_alpha_and_missing_data()[source]
Test compositor with day portion with alpha_band when SZA data is not provided and there is missing data.
- test_day_only_area_without_alpha()[source]
Test compositor with day portion without alpha_band when SZA data is not provided.
- test_day_only_sza_with_alpha()[source]
Test compositor with day portion with alpha band when SZA data is included.
- test_day_only_sza_without_alpha()[source]
Test compositor with day portion without alpha band when SZA data is included.
- test_daynight_area()[source]
Test compositor both day and night portions when SZA data is not provided.
- test_daynight_sza()[source]
Test compositor with both day and night portions when SZA data is included.
- test_night_only_area_with_alpha()[source]
Test compositor with night portion with alpha band when SZA data is not provided.
- test_night_only_area_without_alpha()[source]
Test compositor with night portion without alpha band when SZA data is not provided.
- class satpy.tests.test_composites.TestDifferenceCompositor(methodName='runTest')[source]
Bases:
TestCase
Test case for the difference compositor.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- _classSetupFailed = False
- _class_cleanups = []
- class satpy.tests.test_composites.TestEnhance2Dataset(methodName='runTest')[source]
Bases:
TestCase
Test the enhance2dataset utility.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- _classSetupFailed = False
- _class_cleanups = []
- class satpy.tests.test_composites.TestFillingCompositor(methodName='runTest')[source]
Bases:
TestCase
Test case for the filling compositor.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- _classSetupFailed = False
- _class_cleanups = []
- class satpy.tests.test_composites.TestGenericCompositor(methodName='runTest')[source]
Bases:
TestCase
Test generic compositor.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- _classSetupFailed = False
- _class_cleanups = []
- class satpy.tests.test_composites.TestHighCloudCompositor[source]
Bases:
object
Test HighCloudCompositor.
- test_high_cloud_compositor_dtype()[source]
Test that the datatype is not altered by the compositor.
- class satpy.tests.test_composites.TestInferMode(methodName='runTest')[source]
Bases:
TestCase
Test the infer_mode utility.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- _classSetupFailed = False
- _class_cleanups = []
- class satpy.tests.test_composites.TestInlineComposites(methodName='runTest')[source]
Bases:
TestCase
Test inline composites.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- _classSetupFailed = False
- _class_cleanups = []
- class satpy.tests.test_composites.TestLongitudeMaskingCompositor(methodName='runTest')[source]
Bases:
TestCase
Test case for the LongitudeMaskingCompositor compositor.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- _classSetupFailed = False
- _class_cleanups = []
- class satpy.tests.test_composites.TestLowCloudCompositor[source]
Bases:
object
Test LowCloudCompositor.
- class satpy.tests.test_composites.TestLuminanceSharpeningCompositor(methodName='runTest')[source]
Bases:
TestCase
Test luminance sharpening compositor.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- _classSetupFailed = False
- _class_cleanups = []
- class satpy.tests.test_composites.TestMaskingCompositor[source]
Bases:
object
Test case for the simple masking compositor.
- reference_data(test_data, test_ct_data)[source]
Get reference data to use in masking compositor tests.
- test_call_named_fields(conditions_v2, test_data, test_ct_data, reference_data, reference_alpha)[source]
Test with named fields.
- test_call_named_fields_string(conditions_v2, test_data, test_ct_data, reference_data, reference_alpha)[source]
Test with named fields which are as a string in the mask attributes.
- class satpy.tests.test_composites.TestMatchDataArrays[source]
Bases:
object
Test the utility method ‘match_data_arrays’.
- test_almost_equal_geo_coordinates()[source]
Test that coordinates that are almost-equal still match.
See https://github.com/pytroll/satpy/issues/2668 for discussion.
Various operations like cropping and resampling can cause geo-coordinates (y, x) to be very slightly unequal due to floating point precision. This test makes sure that even in those cases we can still generate composites from DataArrays with these coordinates.
- class satpy.tests.test_composites.TestMultiFiller(methodName='runTest')[source]
Bases:
TestCase
Test case for the MultiFiller compositor.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- _classSetupFailed = False
- _class_cleanups = []
- class satpy.tests.test_composites.TestNaturalEnhCompositor(methodName='runTest')[source]
Bases:
TestCase
Test NaturalEnh compositor.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- _classSetupFailed = False
- _class_cleanups = []
- class satpy.tests.test_composites.TestPaletteCompositor(methodName='runTest')[source]
Bases:
TestCase
Test the PaletteCompositor.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- _classSetupFailed = False
- _class_cleanups = []
- class satpy.tests.test_composites.TestPrecipCloudsCompositor(methodName='runTest')[source]
Bases:
TestCase
Test the PrecipClouds compositor.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- _classSetupFailed = False
- _class_cleanups = []
- class satpy.tests.test_composites.TestRatioSharpenedCompositors[source]
Bases:
object
Test RatioSharpenedRGB and SelfSharpendRGB compositors.
- test_ratio_sharpening(high_resolution_band, neutral_resolution_band, exp_r, exp_g, exp_b)[source]
Test RatioSharpenedRGB by different groups of high_resolution_band and neutral_resolution_band.
- class satpy.tests.test_composites.TestRealisticColors[source]
Bases:
object
Test the SEVIRI Realistic Colors compositor.
- class satpy.tests.test_composites.TestSandwichCompositor[source]
Bases:
object
Test sandwich compositor.
- class satpy.tests.test_composites.TestSingleBandCompositor(methodName='runTest')[source]
Bases:
TestCase
Test the single-band compositor.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- _classSetupFailed = False
- _class_cleanups = []
- class satpy.tests.test_composites.TestStaticImageCompositor(methodName='runTest')[source]
Bases:
TestCase
Test case for the static compositor.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- _classSetupFailed = False
- _class_cleanups = []
- satpy.tests.test_composites._enhance2dataset(dataset, convert_p=False)[source]
Mock the enhance2dataset to return the original data.
- satpy.tests.test_composites.fake_dataset_pair(fake_area)[source]
Return a fake pair of 2×2 datasets.
- satpy.tests.test_composites.test_bad_sensor_yaml_configs(tmp_path)[source]
Test composite YAML file with no sensor isn’t loaded.
But the bad YAML also shouldn’t crash composite configuration loading.