1.5.1.1.4.1.5. polar2grid.filters.resample_coverage module

Filter classes dealing with resampling output coverage.

class polar2grid.filters.resample_coverage.ResampleCoverageFilter(product_filter_criteria: dict = True, target_area: Optional[Union[SwathDefinition, AreaDefinition]] = None, coverage_fraction: Optional[float] = None)[source]

Bases: BaseFilter

Remove any DataArrays that would not have any results if resampled to the target area.

This filter defaults to checking all products. Pass product_filter_critera=None to disable checking for all products. See BaseFilter for other options.

_filter_data_array(data_arr: DataArray, _cache: dict)[source]

Check if this DataArray should be removed.

Returns:

True if it meets the condition and does not have enough day data and should therefore be removed. False otherwise meaning it should be kept.

_get_and_cache_coverage_fraction(source_data: DataArray, source_area: Union[SwathDefinition, AreaDefinition], cache: dict) float[source]
polar2grid.filters.resample_coverage._get_intersection_coverage(source_polygon: SphPolygon, target_polygon: SphPolygon) float[source]

Get fraction of output grid that will be filled with input data.