satpy.tests.modifier_tests.test_angles module

Tests for the angles in modifiers.

class satpy.tests.modifier_tests.test_angles.TestAngleGeneration[source]

Bases: object

Test the angle generation utility functions.

static _check_cache_and_clear(tmp_path, exp_num_zarr)[source]
static _check_cached_result(results, exp_zarr_chunks)[source]
test_cache_get_angles(input_func, num_normalized_chunks, exp_zarr_chunks, input2_func, exp_equal_sun, exp_num_zarr, force_bad_glob, tmp_path)[source]

Test get_angles when caching is enabled.

test_cached_no_chunks_fails(tmp_path)[source]

Test that trying to pass non-dask arrays and no chunks fails.

test_cached_result_numpy_fails(tmp_path)[source]

Test that trying to cache with non-dask arrays fails.

test_caching_with_array_in_args_does_not_warn_when_caching_is_not_enabled(tmp_path, recwarn)[source]

Test that trying to cache with non-dask arrays fails.

test_caching_with_array_in_args_warns(tmp_path)[source]

Test that trying to cache with non-dask arrays fails.

test_get_angles(input_func, exp_calls)[source]

Test sun and satellite angle calculation.

test_get_angles_satpos_preference(forced_preference)[source]

Test that ‘actual’ satellite position is used for generating sensor angles.

test_no_cache_dir_fails(tmp_path)[source]

Test that ‘cache_dir’ not being set fails.

test_relative_azimuth_calculation()[source]

Test relative azimuth calculation.

test_solazi_correction()[source]

Test that solar azimuth angles are corrected into the right range.

satpy.tests.modifier_tests.test_angles._angle_cache_area_def()[source]
satpy.tests.modifier_tests.test_angles._angle_cache_stacked_area_def()[source]
satpy.tests.modifier_tests.test_angles._assert_allclose_if(expect_equal, arr1, arr2)[source]
satpy.tests.modifier_tests.test_angles._diff_sat_pos_datetime(orig_data)[source]
satpy.tests.modifier_tests.test_angles._get_angle_test_data(area_def: AreaDefinition | StackedAreaDefinition | None = None, chunks: int | tuple | None = 2, shape: tuple = (5, 5), dims: tuple | None = None) DataArray[source]
satpy.tests.modifier_tests.test_angles._get_angle_test_data_odd_chunks()[source]
satpy.tests.modifier_tests.test_angles._get_angle_test_data_odd_chunks2()[source]
satpy.tests.modifier_tests.test_angles._get_angle_test_data_rgb()[source]
satpy.tests.modifier_tests.test_angles._get_angle_test_data_rgb_nodims()[source]
satpy.tests.modifier_tests.test_angles._get_stacked_angle_test_data()[source]
satpy.tests.modifier_tests.test_angles._glob_reversed(pat)[source]

Behave like glob but force results to be in the wrong order.

satpy.tests.modifier_tests.test_angles._mock_glob_if(mock_glob)[source]
satpy.tests.modifier_tests.test_angles._similar_sat_pos_datetime(orig_data, lon_offset=0.04)[source]