satpy.tests.test_modifiers module

Tests for modifiers in modifiers/__init__.py.

class satpy.tests.test_modifiers.TestNIREmissivePartFromReflectance(methodName='runTest')[source]

Bases: TestCase

Test the NIR Emissive part from reflectance 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 = []
test_compositor(calculator, apply_modifier_info, sza)[source]

Test the NIR emissive part from reflectance compositor.

class satpy.tests.test_modifiers.TestNIRReflectance(methodName='runTest')[source]

Bases: TestCase

Test NIR reflectance 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 = []
fake_refl_from_tbs(sun_zenith, da_nir, da_tb11, tb_ir_co2=None)[source]

Fake refl_from_tbs.

setUp()[source]

Set up the test case for the NIRReflectance compositor.

test_masking_limit_default_value_is_not_none(calculator, apply_modifier_info, sza)[source]

Check that sun_zenith_threshold is not None.

test_no_sunz_no_co2(calculator, apply_modifier_info, sza)[source]

Test NIR reflectance compositor with minimal parameters.

test_no_sunz_with_co2(calculator, apply_modifier_info, sza)[source]

Test NIR reflectance compositor provided extra co2 info.

test_provide_masking_limit(calculator, apply_modifier_info, sza)[source]

Test NIR reflectance compositor provided sunz and a sunz threshold.

test_provide_sunz_and_threshold(calculator, apply_modifier_info, sza)[source]

Test NIR reflectance compositor provided sunz and a sunz threshold.

test_provide_sunz_no_co2(calculator, apply_modifier_info, sza)[source]

Test NIR reflectance compositor provided only sunz.

test_sunz_threshold_default_value_is_not_none(calculator, apply_modifier_info, sza)[source]

Check that sun_zenith_threshold is not None.

class satpy.tests.test_modifiers.TestPSPAtmosphericalCorrection(methodName='runTest')[source]

Bases: TestCase

Test the pyspectral-based atmospheric correction modifier.

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_call()[source]

Test atmospherical correction.

class satpy.tests.test_modifiers.TestPSPRayleighReflectance[source]

Bases: object

Test the pyspectral-based Rayleigh correction modifier.

_create_test_data(name, wavelength, resolution)[source]
_get_angles_prereqs_and_opts(as_optionals)[source]
_make_data_area()[source]

Create test area definition and data.

test_rayleigh_corrector(name, wavelength, resolution, aerosol_type, reduce_lim_low, reduce_lim_high, reduce_strength, exp_mean, exp_unique)[source]

Test PSPRayleighReflectance with fake data.

test_rayleigh_with_angles(as_optionals)[source]

Test PSPRayleighReflectance with angles provided.

class satpy.tests.test_modifiers.TestSunZenithCorrector[source]

Bases: object

Test case for the zenith corrector.

test_basic_default_not_provided(sunz_ds1, as_32bit)[source]

Test default limits when SZA isn’t provided.

test_basic_default_provided(data_arr, sunz_sza)[source]

Test default limits when SZA is provided.

test_basic_lims_not_provided(sunz_ds1)[source]

Test custom limits when SZA isn’t provided.

test_basic_lims_provided(data_arr, sunz_sza)[source]

Test custom limits when SZA is provided.

test_imcompatible_areas(sunz_ds2, sunz_sza)[source]

Test sunz correction on incompatible areas.

class satpy.tests.test_modifiers.TestSunZenithReducer[source]

Bases: object

Test case for the sun zenith reducer.

classmethod setup_class()[source]

Initialze SunZenithReducer classes that shall be tested.

test_custom_settings(sunz_ds1, sunz_sza)[source]

Test custom settings with sza data available.

test_default_settings(sunz_ds1, sunz_sza)[source]

Test default settings with sza data available.

test_invalid_max_sza(sunz_ds1, sunz_sza)[source]

Test invalid max_sza with sza data available.

satpy.tests.test_modifiers._get_ds1(attrs)[source]
satpy.tests.test_modifiers._shared_sunz_attrs(area_def)[source]
satpy.tests.test_modifiers._sunz_area_def()[source]

Get fake area for testing sunz generation.

satpy.tests.test_modifiers._sunz_bigger_area_def()[source]

Get area that is twice the size of ‘sunz_area_def’.

satpy.tests.test_modifiers._sunz_stacked_area_def()[source]

Get fake stacked area for testing sunz generation.

satpy.tests.test_modifiers.sunz_ds1()[source]

Generate fake dataset for sunz tests.

satpy.tests.test_modifiers.sunz_ds1_stacked()[source]

Generate fake dataset for sunz tests.

satpy.tests.test_modifiers.sunz_ds2()[source]

Generate larger fake dataset for sunz tests.

satpy.tests.test_modifiers.sunz_sza()[source]

Generate fake solar zenith angle data array for testing.