1.5.1.1.8.1.1. polar2grid.resample._resample_scene module

Helper functions for resampling Satpy Scenes.

class polar2grid.resample._resample_scene.AreaDefResolver(input_scene, grid_configs)[source]

Bases: object

_freeze_area_if_dynamic(area_def: SwathDefinition | AreaDefinition, **kwargs) SwathDefinition | AreaDefinition[source]
get_frozen_area(area_name: str | None, **kwargs) SwathDefinition | AreaDefinition | None[source]
has_dynamic_extents(area_name: str | None) bool[source]
polar2grid.resample._resample_scene._areas_to_resample(areas_to_resample: List[AreaDefinition | str | None] | None, resampler: str | None, default_target: AreaDefinition | str | None) List[AreaDefinition | str | None][source]
polar2grid.resample._resample_scene._crs_equal(a, b)[source]

Compare two projection dictionaries for “close enough” equality.

polar2grid.resample._resample_scene._default_grid(resampler, is_polar2grid)[source]
polar2grid.resample._resample_scene._filter_and_resample_scene_to_single_area(area_name: str, area_def: SwathDefinition | AreaDefinition | None, grid_coverage: float, has_dynamic_extents: bool, input_scene: Scene, data_ids_to_resample: list, rs: str, resample_kwargs: dict, preserve_resolution: bool) Scene | None[source]
polar2grid.resample._resample_scene._filter_scene_with_grid_coverage(area_name: str, area_def: SwathDefinition | AreaDefinition, resampler: str, coverage_threshold: float, has_dynamic_extents: bool, scene_to_resample: Scene, data_ids: list)[source]
polar2grid.resample._resample_scene._get_area_def_from_name(area_name: str | None, input_scene: Scene, grid_manager: GridManager, yaml_areas: list) SwathDefinition | AreaDefinition | None[source]
polar2grid.resample._resample_scene._get_default_resampler(resampler, area_name, area_def, input_scene)[source]
polar2grid.resample._resample_scene._get_groups_to_resample(resampler: str, input_scene: Scene, is_polar2grid: bool, user_resample_kwargs: dict) dict[source]
polar2grid.resample._resample_scene._get_legacy_and_yaml_areas(grid_configs: list[str, ...]) tuple[GridManager, dict[str, AreaDefinition]][source]
polar2grid.resample._resample_scene._get_preserve_resolution(preserve_resolution, resampler, areas_to_resample)[source]

Determine if we should preserve native resolution products.

Preserving native resolution should only happen if:

  1. The ‘native’ resampler is used

  2. At least one of the areas provided to resampling are ‘MIN’ or ‘MAX’

  3. The user didn’t ask to not preserve it.

polar2grid.resample._resample_scene._hashable_kwargs(kwargs)[source]
polar2grid.resample._resample_scene._is_native_grid(grid, max_native_area)[source]

Check if the current grid is in the native data projection.

polar2grid.resample._resample_scene._products_to_preserve_resolution(preserve_resolution, wishlist, scene_to_resample)[source]
polar2grid.resample._resample_scene._redict_hashable_kwargs(kwargs_tuple)[source]
polar2grid.resample._resample_scene._resample_scene_to_single_area(scene_to_resample: Scene, area_name: str, area_def: SwathDefinition | AreaDefinition, rs: str, data_ids: list, resample_kwargs: dict, preserve_resolution: bool) Scene | None[source]
polar2grid.resample._resample_scene.resample_scene(input_scene: Scene, areas_to_resample: List[AreaDefinition | str | None], grid_configs: list[str, ...], resampler: str | None, antimeridian_mode: str = 'modify_crs', preserve_resolution: bool = True, grid_coverage: float | None = None, is_polar2grid: bool = True, **resample_kwargs) list[tuple[Scene, set]][source]

Resample a single Scene to multiple target areas.