satpy.tests.modifier_tests.test_parallax module
Tests related to parallax correction.
- class satpy.tests.modifier_tests.test_parallax.TestForwardParallax[source]
Bases:
object
Test the forward parallax function with various inputs.
- test_get_parallax_corrected_lonlats_clearsky()[source]
Test parallax correction for clearsky case (returns NaN).
- test_get_parallax_corrected_lonlats_cloudy_slant()[source]
Test parallax correction for fully cloudy scene (not SSP).
- test_get_parallax_corrected_lonlats_cloudy_ssp(lat, lon, resolution)[source]
Test parallax correction for fully cloudy scene at SSP.
- test_get_parallax_corrected_lonlats_horizon()[source]
Test that exception is raised if satellites exactly at the horizon.
Test the rather unlikely case of a satellite elevation of exactly 0
- test_get_parallax_corrected_lonlats_mixed()[source]
Test parallax correction for mixed cloudy case.
- class satpy.tests.modifier_tests.test_parallax.TestParallaxCorrectionClass[source]
Bases:
object
Test that the ParallaxCorrection class is behaving sensibly.
- test_correct_area_clearsky(sat_pos, ar_pos, resolution, caplog)[source]
Test that ParallaxCorrection doesn’t change clearsky geolocation.
- test_correct_area_clearsky_different_resolutions(res1, res2)[source]
Test clearsky correction when areas have different resolutions.
- test_correct_area_cloudy_partly_shifted()[source]
Test cloudy correction when areas overlap only partly.
- test_correct_area_no_orbital_parameters(caplog, fake_tle)[source]
Test ParallaxCorrection when CTH has no orbital parameters.
Some CTH products, such as NWCSAF-GEO, do not include information on satellite location directly. Rather, they include platform name, sensor, start time, and end time, that we have to use instead.
- test_correct_area_partlycloudy(daskify)[source]
Test ParallaxCorrection for partly cloudy situation.
- class satpy.tests.modifier_tests.test_parallax.TestParallaxCorrectionModifier[source]
Bases:
object
Test that the parallax correction modifier works correctly.
- _get_fake_cloud_datasets(test_area, cth, use_dask)[source]
Return datasets for BT and CTH for fake cloud.
- test_area(request)[source]
Produce test area for parallax correction unit tests.
Produce test area for the modifier-interface parallax correction unit tests.
- test_modifier_interface_cloud_moves_to_observer(cth, use_dask, test_area)[source]
Test that a cloud moves to the observer.
With the modifier interface, use a high resolution area and test that pixels are moved in the direction of the observer and not away from it.
- test_parallax_modifier_interface_with_cloud()[source]
Test the modifier interface with a cloud.
Test corresponds to a real bug encountered when using CTH data from NWCSAF-GEO, which created strange speckles in Africa (see https://github.com/pytroll/satpy/pull/1904#issuecomment-1011161623 for an example). Create fake CTH corresponding to NWCSAF-GEO area and BT corresponding to full disk SEVIRI, and test that no strange speckles occur.
- class satpy.tests.modifier_tests.test_parallax.TestParallaxCorrectionSceneLoad[source]
Bases:
object
Test that scene load interface works as expected.
- test_double_load(fake_scene, conf_file, fake_tle)[source]
Test that loading corrected and uncorrected works correctly.
When the modifier
__call__
method fails to callself.apply_modifier_info(new, old)
and the original and parallax-corrected dataset are requested at the same time, the DataArrays differ but the underlying dask arrays have object identity, which in turn leads to both being parallax corrected. This unit test confirms that there is no such object identity.
- satpy.tests.modifier_tests.test_parallax._get_attrs(lat, lon, height=35000)[source]
Get attributes for datasets in fake scene.